This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch unity-staging
in repository https://gitbox.apache.org/repos/asf/tvm.git

commit 4e6bc9a28c9221a7fed876160319d89a047df257
Author: Junru Shao <[email protected]>
AuthorDate: Sun May 7 10:07:26 2023 -0700

    [MERGE] Fix lint after lint image upgrade
---
 python/tvm/contrib/cutlass/build.py          | 2 +-
 python/tvm/contrib/tvmjs.py                  | 2 +-
 python/tvm/meta_schedule/tir_integration.py  | 4 ----
 python/tvm/relax/analysis/analysis.py        | 2 +-
 python/tvm/relax/block_builder.py            | 2 +-
 python/tvm/relax/frontend/torch/dynamo.py    | 2 +-
 python/tvm/relax/testing/relay_translator.py | 3 ++-
 python/tvm/relax/testing/runtime_builtin.py  | 2 ++
 python/tvm/relax/training/trainer.py         | 4 ++--
 python/tvm/relax/utils.py                    | 2 +-
 src/runtime/metal/metal_module.mm            | 1 -
 tests/lint/cppdocs.sh                        | 2 +-
 tests/lint/pylintrc                          | 4 +++-
 13 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/python/tvm/contrib/cutlass/build.py 
b/python/tvm/contrib/cutlass/build.py
index 3c9e8a9e0f..389dbf3e5c 100644
--- a/python/tvm/contrib/cutlass/build.py
+++ b/python/tvm/contrib/cutlass/build.py
@@ -783,7 +783,7 @@ class CutlassRelaxFunctionAnnotator(relax.PyExprMutator):
         elif _get_call_node(f.body, "relax.nn.attention_bias") is not None:
             op_attrs = _get_call_node(f.body, "relax.nn.attention_bias").attrs
         else:
-            raise ValueError(f"Cannot find call node for attention")
+            raise ValueError("Cannot find call node for attention")
         arg = {}
 
         if "stacked_attention" in op_type:
diff --git a/python/tvm/contrib/tvmjs.py b/python/tvm/contrib/tvmjs.py
index 6bee154e96..c146427a97 100644
--- a/python/tvm/contrib/tvmjs.py
+++ b/python/tvm/contrib/tvmjs.py
@@ -210,7 +210,7 @@ def dump_ndarray_cache(
     with open(nd_cache_json, "w") as outfile:
         json.dump({"metadata": meta_data, "records": records}, outfile, 
indent=4)
     print(
-        f"\nAll finished, %d total shards committed, record saved to %s"
+        "\nAll finished, %d total shards committed, record saved to %s"
         % (shard_manager.counter, nd_cache_json)
     )
 
diff --git a/python/tvm/meta_schedule/tir_integration.py 
b/python/tvm/meta_schedule/tir_integration.py
index 6d0af39923..36e89a11b4 100644
--- a/python/tvm/meta_schedule/tir_integration.py
+++ b/python/tvm/meta_schedule/tir_integration.py
@@ -175,7 +175,6 @@ def _tune_tir(
     task_scheduler: TaskScheduler.TaskSchedulerType = "round-robin",
     space: SpaceGenerator.SpaceGeneratorType = "post-order-apply",
     strategy: SearchStrategy.SearchStrategyType = "evolutionary",
-    task_name: str = "main",
     num_tuning_cores: Union[Literal["physical", "logical"], int] = "physical",
     seed: Optional[int] = None,
 ) -> Database:
@@ -209,8 +208,6 @@ def _tune_tir(
         The space generator.
     strategy : SearchStrategy.SearchStrategyType
         The search strategy.
-    task_name : str
-        The name of the task.
     num_tuning_cores : Union[Literal["physical", "logical"], int]
         The number of CPU cores to use during tuning.
     seed : Optional[int]
@@ -237,7 +234,6 @@ def _tune_tir(
         task_scheduler=task_scheduler,
         space=space,
         strategy=strategy,
-        task_name=task_name,
         num_tuning_cores=num_tuning_cores,
         seed=seed,
     )
diff --git a/python/tvm/relax/analysis/analysis.py 
b/python/tvm/relax/analysis/analysis.py
index 3db79ed8be..e3b3c288ef 100644
--- a/python/tvm/relax/analysis/analysis.py
+++ b/python/tvm/relax/analysis/analysis.py
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=no-else-return
+# pylint: disable=no-else-return, invalid-name
 # pylint: disable=unidiomatic-typecheck
 """
 This file contains the set of passes for Relax, which exposes an interface for
diff --git a/python/tvm/relax/block_builder.py 
b/python/tvm/relax/block_builder.py
index 2b9cdc5fe6..fb44a3bf43 100644
--- a/python/tvm/relax/block_builder.py
+++ b/python/tvm/relax/block_builder.py
@@ -14,7 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=no-else-return, invalid-name
+# pylint: disable=no-else-return, invalid-name, unused-argument
 """Developer API of constructing Relax AST."""
 
 from typing import Dict, List, Optional, Union, Any, Callable
diff --git a/python/tvm/relax/frontend/torch/dynamo.py 
b/python/tvm/relax/frontend/torch/dynamo.py
index 56eb257421..3015f77428 100644
--- a/python/tvm/relax/frontend/torch/dynamo.py
+++ b/python/tvm/relax/frontend/torch/dynamo.py
@@ -16,7 +16,7 @@
 # under the License.
 
 # pylint: disable=invalid-name, missing-function-docstring, not-callable
-# pylint: disable=import-outside-toplevel, unused-argument
+# pylint: disable=import-outside-toplevel, unused-argument, use-list-literal
 # mypy: ignore-errors
 """PyTorch Dynamo backend of Relax."""
 import functools
diff --git a/python/tvm/relax/testing/relay_translator.py 
b/python/tvm/relax/testing/relay_translator.py
index 46fdb7021d..b66a4f8434 100644
--- a/python/tvm/relax/testing/relay_translator.py
+++ b/python/tvm/relax/testing/relay_translator.py
@@ -14,7 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-# pylint: disable=unused-argument, invalid-name, no-else-return, 
too-many-nested-blocks
+# pylint: disable=unused-argument, invalid-name, no-else-return,
+# pylint: disable=too-many-nested-blocks, unused-variable
 """Relay to Relax translator."""
 
 from typing import Any, Dict, List, Optional
diff --git a/python/tvm/relax/testing/runtime_builtin.py 
b/python/tvm/relax/testing/runtime_builtin.py
index 1b04364e69..c161d4e6cf 100644
--- a/python/tvm/relax/testing/runtime_builtin.py
+++ b/python/tvm/relax/testing/runtime_builtin.py
@@ -14,6 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
+
+# pylint: disable=invalid-name
 """Testing utilities for runtime builtin functions."""
 from enum import IntEnum
 
diff --git a/python/tvm/relax/training/trainer.py 
b/python/tvm/relax/training/trainer.py
index fea2088d4e..d2c417a651 100644
--- a/python/tvm/relax/training/trainer.py
+++ b/python/tvm/relax/training/trainer.py
@@ -183,7 +183,7 @@ class Trainer:
                     raise ValueError(f"Parameter {key} is not found in the 
model")
                 self._params[self._param_name_to_pos[key]] = tvm.nd.array(val, 
self.device)
         else:
-            raise ValueError(f"The type of extern_params should be either list 
or dict")
+            raise ValueError("The type of extern_params should be either list 
or dict")
 
     def load_states(
         self,
@@ -217,7 +217,7 @@ class Trainer:
                     raise ValueError(f"Parameter {key} is not found in the 
model")
                 self._states[self._param_name_to_pos[key]] = tvm.nd.array(val, 
self.device)
         else:
-            raise ValueError(f"The type of extern_states should be either list 
or dict")
+            raise ValueError("The type of extern_states should be either list 
or dict")
 
     def export_params(self) -> Dict[str, NDArray]:
         """Export parameters to a dict (parameter name -> NDArray).
diff --git a/python/tvm/relax/utils.py b/python/tvm/relax/utils.py
index 3998fb8863..02dd941080 100644
--- a/python/tvm/relax/utils.py
+++ b/python/tvm/relax/utils.py
@@ -137,7 +137,7 @@ class _ArgsConverter:
         """
 
         if any([x in args_to_list_expr for x in args_to_expr]):
-            raise ValueError(f"`args_to_expr` and `args_to_list_expr` should 
be disjoint.")
+            raise ValueError("`args_to_expr` and `args_to_list_expr` should be 
disjoint.")
 
         def _convert(name: str, value: Any) -> Any:
             if value is None:
diff --git a/src/runtime/metal/metal_module.mm 
b/src/runtime/metal/metal_module.mm
index 6534d7c876..7e62412c72 100644
--- a/src/runtime/metal/metal_module.mm
+++ b/src/runtime/metal/metal_module.mm
@@ -286,7 +286,6 @@ TVM_REGISTER_GLOBAL("runtime.module.create_metal_module")
           source);
     });
 
-
 Module MetalModuleLoadBinary(void* strm) {
   dmlc::Stream* stream = static_cast<dmlc::Stream*>(strm);
   // version is reserved for future changes and
diff --git a/tests/lint/cppdocs.sh b/tests/lint/cppdocs.sh
index af5a98c513..00bb355551 100755
--- a/tests/lint/cppdocs.sh
+++ b/tests/lint/cppdocs.sh
@@ -25,7 +25,7 @@ trap cleanup EXIT
 
 make cppdoc 2>/tmp/$$.log.txt
 
-grep -v -E "ENABLE_PREPROCESSING|unsupported tag" < /tmp/$$.log.txt > 
/tmp/$$.logclean.txt || true
+grep -v -E "ENABLE_PREPROCESSING|unsupported tag|Inheritance graph" < 
/tmp/$$.log.txt > /tmp/$$.logclean.txt || true
 echo "---------Error Log----------"
 cat /tmp/$$.logclean.txt
 echo "----------------------------"
diff --git a/tests/lint/pylintrc b/tests/lint/pylintrc
index e646736a30..3b5e14d15b 100644
--- a/tests/lint/pylintrc
+++ b/tests/lint/pylintrc
@@ -120,7 +120,9 @@ disable=
     use-dict-literal,
     use-maxsplit-arg,
     useless-object-inheritance,
-    useless-suppression
+    useless-suppression,
+    use-list-literal,
+    arguments-renamed
 
 [REPORTS]
 

Reply via email to