[mojo-gpu-puzzles] Restore max dependency on stable; fix mojo-format hook#249
Closed
dunnoconnor wants to merge 2 commits into
Closed
Conversation
…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.
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
maxPython package dependency inpixi.tomlonstable. It was dropped in c85c864 as "redundant", butmaxis not a transitive dep ofmojo, so puzzles 17-22 (which importmax.driver,max.engine,max.graph,max.experimental.torch) failed withNo module named 'max'. Pinned to==26.3.0to match the build published onhttps://conda.modular.com/max;pixi.lockre-solved.mojo-formatpre-commit hook entry that didcd 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 — thecdfailed and broke every commit. Drop it.Fixes SDLC-3716.
Test plan
pixi install -e defaultsucceeds; lockfile containsmax-26.3.0+max-core-26.3.0forlinux-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 p17andp20get past theNo module named 'max'failure (they now hit a separate, pre-existing TileTensor compile error inproblems/p{17,20}/op/conv1d.mojothat should be addressed in its own PR).git commitruns the pre-commit hooks cleanly (mojo-format, trailing-whitespace, end-of-file-fixer all pass).Follow-ups
oss/mojo-gpu-puzzles/.pre-commit-config.yamlso the next copybara sync doesn't undo it.__getitem__constraint errors surfaced once the import error was resolved.