Skip to content

[*.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

Merged
merged 1 commit into from
May 20, 2025

Conversation

SamuelMarks
Copy link
Collaborator

Description

Linting is fun?

Tests

N/A

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed.

@@ -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
Copy link
Collaborator

@shralex shralex May 16, 2025

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

Copy link
Collaborator Author

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
Copy link
Collaborator

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

Copy link
Collaborator Author

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
@copybara-service copybara-service bot merged commit a93d7d8 into AI-Hypercomputer:main May 20, 2025
32 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants