Skip to content

[mojo-gpu-puzzles] Restore max dependency on stable; fix mojo-format hook#249

Closed
dunnoconnor wants to merge 2 commits into
stablefrom
dunnoconnor/sdlc-3716-resolve-stable-branch-test-failures-in-puzzles-17-22
Closed

[mojo-gpu-puzzles] Restore max dependency on stable; fix mojo-format hook#249
dunnoconnor wants to merge 2 commits into
stablefrom
dunnoconnor/sdlc-3716-resolve-stable-branch-test-failures-in-puzzles-17-22

Conversation

@dunnoconnor
Copy link
Copy Markdown
Member

Summary

  • Restore the max Python package dependency in pixi.toml on stable. It was dropped in c85c864 as "redundant", but max is not a transitive dep of mojo, so puzzles 17-22 (which import max.driver, max.engine, max.graph, max.experimental.torch) failed with No module named 'max'. Pinned to ==26.3.0 to match the build published on https://conda.modular.com/max; pixi.lock re-solved.
  • Fix the mojo-format pre-commit hook entry that did cd oss/mojo-gpu-puzzles && pixi run format. Pre-commit always runs hooks from the git repo root, which is the puzzles repo itself in any standalone clone — the cd failed and broke every commit. Drop it.

Fixes SDLC-3716.

Test plan

  • pixi install -e default succeeds; lockfile contains max-26.3.0 + max-core-26.3.0 for linux-64, linux-aarch64, osx-arm64.
  • pixi run -e default python -c "import max.driver, max.dtype, max.engine, max.graph, max.experimental.torch" succeeds.
  • pixi run -e default p17 and p20 get past the No module named 'max' failure (they now hit a separate, pre-existing TileTensor compile error in problems/p{17,20}/op/conv1d.mojo that should be addressed in its own PR).
  • git commit runs the pre-commit hooks cleanly (mojo-format, trailing-whitespace, end-of-file-fixer all pass).

Follow-ups

  • Mirror the hook fix into the monorepo source-of-truth at oss/mojo-gpu-puzzles/.pre-commit-config.yaml so the next copybara sync doesn't undo it.
  • Separate ticket for the TileTensor __getitem__ constraint errors surfaced once the import error was resolved.

…one clone

The hook ran `cd oss/mojo-gpu-puzzles && pixi run format`, which only
makes sense from the modular monorepo root. In the standalone
`mojo-gpu-puzzles` clone, pre-commit invokes hooks from the git repo
root (which IS the puzzles directory), so the `cd` failed. Drop it.
Puzzles 17-22 import the Python `max` package (max.driver, max.engine,
max.graph, etc.). Removing the `max` pin in c85c864 dropped it from the
solved environment because `max` is not a transitive dependency of
`mojo`, leaving those puzzles failing with `No module named 'max'`.

Re-add it, pinned to 26.3.0 to match the channel published at
https://conda.modular.com/max, and re-solve pixi.lock.

Fixes SDLC-3716.
@dunnoconnor dunnoconnor closed this May 8, 2026
@dunnoconnor dunnoconnor deleted the dunnoconnor/sdlc-3716-resolve-stable-branch-test-failures-in-puzzles-17-22 branch May 8, 2026 17:37
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.

1 participant