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
The following commit(s) were added to refs/heads/unity-staging by this push:
new 8b752edc3e [MERGE] Fix lint after lint image upgrade
8b752edc3e is described below
commit 8b752edc3e6548e8437a1f4bd379ad90c160b3d8
Author: tqchen <[email protected]>
AuthorDate: Sun May 7 16:25:23 2023 -0400
[MERGE] Fix lint after lint image upgrade
---
python/tvm/contrib/cutlass/build.py | 2 +-
python/tvm/contrib/tvmjs.py | 2 +-
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 +-
tests/lint/pylintrc | 4 +++-
10 files changed, 15 insertions(+), 10 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/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/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]