Conversation
There was a problem hiding this comment.
Code Review
This pull request streamlines the repository's build, formatting, and dependency management systems. It simplifies the Makefile, updates python dependencies to use pinned versions of pyink and pylint, and significantly expands documentation for various model families like Wan 2.1/2.2, Flux, and LTX. Feedback on the changes suggests cleaning up temporary files in the Makefile upon target failure and using 'python3 -m pip' instead of 'pip' in setup.sh to ensure broader compatibility across different environments.
Perseus14
force-pushed
the
repo-hygiene-minor-fixes
branch
from
October 3, 2026 16:00
dfbb356 to
53d36af
Compare
No functional code changes. ruff/pyink pass unchanged; make deps_table_check_updated now passes. README (broken commands / wrong flags): - Fix `per_device_batch_size=.0.25` typo in the Wan 2.1 T2V inference command (fails float()). - Fix `gs:/` -> `gs://` in two output_dir args; remove a shell comment placed after a `\` continuation and a dangling trailing `\` in the Wan LoRA command. - Close the unterminated quote in `pip install "transformer_engine[jax]` and pin ==2.1.0 (as setup.sh). - Point `pip install -r requirements.txt` at the real generated requirements path (no root file). - Fix clone URL org (google -> AI-Hypercomputer). - `cudnn_te_flash` -> `cudnn_flash_te` (registered kernel name); replace non-existent `ici_fsdp_batch_parallelism` with `ici_data_parallelism`. - Remove duplicated `class_prompt=` from the Dreambooth command. - Fix Flux v6e block-size links (#L79-L89 / #L85-L95) and note flux_dev's block is already active. - v5p-128 -> v5p-256 for the 128-chip example (matches the earlier XPK example). - Correct remat policy mention, synthetic-data instructions, test-directory references, TOC (add Flux.2-Klein, Ulysses/Ring/Caching/Tile-size entries), What's-new ordering, and misc typos. docs/: - docs/README.md: drop dangling train_README.md link; index dgx_spark/profiling/metrics/attention docs. - profiling.md: replace Google-internal pantheon.corp.google.com URL with console.cloud.google.com. - first_run.md / run_maxdiffusion_via_xpk.md / data_README.md / dgx_spark.md: typos, wrong clone URL, stale "Tensorflow >= 2.12" requirement, pipeline count (5, add synthetic row). - configs/README.md: document all 22 configs (15 were missing) grouped by model family. Repo hygiene: - Remove stray 1.3 MB test_lightning.png from repo root (tests use tests/images/ copy). - Remove unused _typos.toml and .github/actions/setup-miniconda (uses deprecated actions/cache@v2). - Trim Makefile to targets that exist (diffusers-inherited targets referenced missing dirs/scripts). - Regenerate dependency_versions_table.py so it matches utils/update_dependency_table.py; fix its docstring. - .gitignore: narrow `.gemini/` to `.gemini/*` + `!.gemini/commands/` so the tracked review-command files are no longer shadowed; move Gemini.md entry. CI / tooling: - Workflows touched by this change must pass the org's zizmor security scan, which now enforces hash-pinning as a blanket policy. In the 7 touched workflow files: pin every third-party `uses:` to a commit SHA with a `# vX.Y.Z` comment (same SHAs/format as MaxText; versions are unchanged except where noted); add least-privilege `permissions: contents: read` to CPUTests/UnitTests/UploadDockerImages; replace `secrets: inherit` in gemini-dispatch.yml with the three secrets the called workflows actually use (declared on their workflow_call). - CPUTests.yml: checkout@v3/setup-python@v4 -> v5 (GitHub-hosted runner); fix `pend_to_end` typo. - UnitTests.yml: drop unused isort install and dead commented block referencing AddLabel.yml. - UploadDockerImages.yml: fix copy-pasted header comment. - pre-commit: stop excluding .github/ from whitespace/EOF hooks; normalize existing files. - code_style.sh: warn when local pyink != 23.10.0 (the CI/pre-commit version). - pyproject.toml: JAX-accurate description/keywords; quality/dev extras use pyink/pylint/ruff instead of unused black/isort/hf-doc-builder; ruff line-length aligned to 125. Scripts / Docker: - docker_build_dependency_image.sh: replace header copy-pasted from docker_upload_runner.sh. - maxdiffusion_gpu_dependencies.Dockerfile: dockerfile:1 syntax, typo, remove `RUN ls .` and duplicate WORKDIR. - setup.sh: remove dead commented block; fix "libtpu" in GPU log line. - unit_test_and_lint.sh: remove dead commented pylint line.
Perseus14
force-pushed
the
repo-hygiene-minor-fixes
branch
from
October 3, 2026 16:36
53d36af to
1fa74a3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mechanical repo-hygiene pass: broken README commands, stale/incorrect docs, dead files, and CI/tooling
inconsistencies. No functional code changes —
ruffandpyinkoutput is unchanged, andmake deps_table_check_updatednow passes.Single commit on purpose (AddPullReady requires it); 30 files, +438/−422.
README — commands that did not work as written
per_device_batch_size=.0.25→0.25(failsfloat());gs:/→gs://(×2); shell comment placed after a\continuation and a dangling trailing
\in the Wan LoRA command.pip install "transformer_engine[jax]— closed and pinned to==2.1.0(as insetup.sh).pip install -r requirements.txt→ the real generated path (there is no rootrequirements.txt); clone URL orggoogle→AI-Hypercomputer.cudnn_te_flash→cudnn_flash_te(registered kernel name); non-existentici_fsdp_batch_parallelism→ici_data_parallelism; duplicatedclass_prompt=removed from the Dreambooth command.#L79-L89/#L85-L95);v5p-128→v5p-256for the 128-chip example;remat-policy mention, synthetic-data instructions, test-directory references, TOC (Flux.2-Klein,
Ulysses/Ring/Caching/Tile-size), What's-new ordering, misc typos.
docs/
docs/README.md: drop danglingtrain_README.mdlink; index the dgx_spark/profiling/metrics/attention docs.profiling.md: replace a Google-internalpantheon.corp.google.comURL withconsole.cloud.google.com.first_run.md,run_maxdiffusion_via_xpk.md,data_README.md,dgx_spark.md: typos, wrong clone URL, stale"Tensorflow >= 2.12" requirement, pipeline count (5, add synthetic row).
src/maxdiffusion/configs/README.md: document all 22 configs (15 were missing), grouped by model family.Repo hygiene
test_lightning.pngfrom the repo root (tests use thetests/images/copy), unused_typos.toml, and.github/actions/setup-miniconda(uses deprecatedactions/cache@v2).Makefileto targets that exist (diffusers-inherited targets referenced missing dirs/scripts).dependency_versions_table.pyso it matchesutils/update_dependency_table.py; fix its docstring..gitignore: narrow.gemini/to.gemini/*+!.gemini/commands/so the tracked review-command files are nolonger shadowed.
CI / tooling
hash-pinning as a blanket policy, so the 7 touched workflow files had to be brought into compliance. These were
pre-existing findings, not regressions; the fixes mirror MaxText's (same SHAs and
# vX.Y.Zformat):unpinned-uses(×13, High/mandatory): every third-partyuses:pinned to a commit SHA. Versions unchangedexcept
run-gemini-cli@main→v0.1.22(a moving branch cannot be pinned by tag).excessive-permissions(×3, Medium): top-levelpermissions: contents: readadded toCPUTests.yml,UnitTests.yml,UploadDockerImages.yml(none of those jobs use the token for anything but checkout;image pushes use the runner's gcloud identity).
secrets-inherit(×2, Medium):gemini-dispatch.ymlpassesAPP_PRIVATE_KEY/GEMINI_API_KEY/GOOGLE_API_KEYexplicitly;
gemini-review.yml/gemini-invoke.ymldeclare them underworkflow_call.secrets(required: false).CPUTests.yml:checkout@v3/setup-python@v4→ v5 (GitHub-hosted runner); fixpend_to_endtypo.UnitTests.yml: drop unusedisortinstall and a dead commented block;UploadDockerImages.yml: fix header..github/from whitespace/EOF hooks; normalize existing files.code_style.sh: warn when local pyink ≠ 23.10.0 (the CI/pre-commit version).pyproject.toml: JAX-accurate description/keywords;quality/devextras use pyink/pylint/ruff instead of unusedblack/isort/hf-doc-builder; ruff line-length aligned to 125.
Scripts / Docker
docker_build_dependency_image.sh: header was copy-pasted fromdocker_upload_runner.sh.maxdiffusion_gpu_dependencies.Dockerfile:dockerfile:1syntax, typo, removeRUN ls .and duplicateWORKDIR.setup.sh: remove dead commented block; fix "libtpu" wording in the GPU log line.unit_test_and_lint.sh: remove dead commented pylint line.make deps_table_check_updatednow removes its temporarymd5sum.savedon failure too;setup.shusespython3 -m pip install uv(consistent with the rest of the script).Verification
ruff check .clean;pyink --checkclean (349 files); all workflow YAML andpyproject.tomlparse;bash -non every touched script;make deps_table_check_updatedpasses..mdfiles(scripted check); no trailing whitespace.
zizmor 1.25.2(the CI version) run locally with the CI job's ownzizmor-config.yamland flags(
--min-confidence medium, online + offline) over the 7 touched workflows: 0 findings (was 13 High + 5 Medium).Deliberately not changed
CPUTests.ymljob name "CPU tests" (may be a required status check).UnitTests.ymlaction versions (self-hosted TPU runners; v5 actions need Node 24) — only SHA-pinned at theversions it already used.
AddPullReady.yml/pypi_release.ymlare not touched by this PR, so the scan does not cover them, but they havethe same
unpinned-usesfindings (andAddPullReady.ymladangerous-triggersone) and will hit the same wallwhen next edited.
black==23.10, which conflicts with the generatedblack>=25.12and would breaksetup.sh).Follow-up
A second, stacked PR migrates the deployment docs from the deprecated XPK to Cluster Toolkit (
gcluster).