Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 19 commits into from Nov 7, 2023

Conversation

tlopex
Copy link
Contributor

@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.

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
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
Contributor 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
Contributor 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
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
Contributor Author

Choose a reason for hiding this comment

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

Okay, got it,

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
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
20 checks passed
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.

None yet

2 participants