Skip to content

[Pylint] fix pylint issues from test_random to test_tedd#16065

Merged
Hzfengsy merged 19 commits intoapache:mainfrom
tlopex:from-random-to-tedd
Nov 7, 2023
Merged

[Pylint] fix pylint issues from test_random to test_tedd#16065
Hzfengsy merged 19 commits intoapache:mainfrom
tlopex:from-random-to-tedd

Conversation

@tlopex
Copy link
Copy Markdown
Member

@tlopex tlopex commented Nov 3, 2023

According to #11414 , I fixed pylint issues for test_random, test_rocblas, test_rpc_proxy, test_rpc_server_device, test_rpc_tracker, test_sort, test_sparse, test_tedd in this PR.

Comment thread tests/python/contrib/test_tedd.py Outdated
B = te.compute((n, m, l), lambda bi, bj, bk: A[bi, bj, bk] + 1, name="B")
r = te.reduce_axis((0, m), "r")
C = te.compute(
op_l = te.var("op_l")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, it's good to keep those concise names. I guess these names can pass the pylint through the pylintrc.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I will change them later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Hzfengsy Well, those concise names would trigger C0103(invalid-name). Like the var "l", the info is Variable name "l" doesn't conform to '[a-z_][a-z0-9_]{2,30}$' pattern. Is it better to use pylint: disable=invalid-name ?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late reply, please feel free to disable invalid-name for the whole file

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, got it,

Comment thread tests/python/contrib/test_tedd.py Outdated
input_a = te.placeholder((n, m), name="input_a")
k = te.reduce_axis((0, m), "k")
B = te.compute((n,), lambda i: te.sum(A[i, k], axis=k), name="B")
input_b = te.compute((n,), lambda i: te.sum(input_a[i, k], axis=k), name="input_b")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@tlopex tlopex requested a review from Hzfengsy November 7, 2023 12:16
@Hzfengsy Hzfengsy merged commit 2f20264 into apache:main Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants