-
Notifications
You must be signed in to change notification settings - Fork 355
[*.py] Resolve pylint w-class: W0102,W0107,W0212,W0221,W0223,W0237,W0404,W0611,W0612,W0621,W0622,W0631,W0707,W0718,W1201,W1203,W1309,W1514,W4901 ; [code_style.sh,.github/workflows/CPUTests.yml] Enable w-class #1749
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
Conversation
@@ -633,6 +633,9 @@ def tpu_flash_attention( | |||
axis_names_q = nn.logical_to_mesh_axes(self.flash_axis_names_q) | |||
axis_names_kv = nn.logical_to_mesh_axes(self.flash_axis_names_kv) | |||
|
|||
global global_block_q, global_block_kv, global_block_kv_compute, global_block_q_dkv, global_block_kv_dkv |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain the purpose of global here and below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was overriding variables that were set globally in the file; shadow variables.
Is it not intended for these to take over the global params? - The wording is confusing so I thought the author just forgot to make them global
. I can modify to rename all these variables instead if that's not desired.
@@ -44,7 +44,8 @@ def test_standalone_dataloader(self): | |||
( | |||
None, | |||
os.path.join(PKG_DIR, "configs", "base.yml"), | |||
"run_name=" + random_run_name, | |||
f"run_name={random_run_name}", | |||
# pylint: disable=f-string-without-interpolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets instead remove the "f" from the next line, and below too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shralex I got in trouble before when I removed the starting f
from f"base_output_directory=gs://runner-maxtext-logs"
. Apparently it's find/replaced internally?
…ystem ; [c_cdd/schema2tests.c] Separate test out to .h and .c
a93d7d8
into
AI-Hypercomputer:main
Description
Linting is fun?
Tests
N/A
Checklist
Before submitting this PR, please make sure (put X in square brackets):