This file provides project-specific guidance for Warp/Oz when working in this repository.
- This repo is a progressive learning path for Modular MAX’s Python Graph API (with benchmarks and tests).
- Dependency and environment management is done with Pixi (
pixi.toml,pixi.lock).
pixi installRun these from the repository root.
# Minimal examples
pixi run python examples/python/01_elementwise/elementwise_minimal.py
pixi run python examples/python/02_linear_layer/linear_layer_minimal.py
# Pixi tasks (full examples)
pixi run example-elementwise-cpu
pixi run example-elementwise-gpu
pixi run example-linear
pixi run example-mlp
pixi run example-cnn
pixi run example-distilbertpixi run test-pythonpixi run ruff-check
pixi run ruff-format
pixi run pre-commitpixi run benchmark-elementwise
pixi run benchmark-linear
pixi run benchmark-distilbert
pixi run benchmark-mlp
pixi run benchmark-cnn
pixi run benchmark-allMAX nightlies can introduce breaking changes. Prefer the scripted workflow:
python scripts/update_max_version.py- Python package code lives in
src/python/and is installed (editable) via Pixi. - Tests live in
tests/python/. - Benchmarks live in
benchmarks/.
- Use Ruff for Python formatting/linting (see
ruff.toml). - Prefer Australian English for documentation and comments.
- Keep
modularlocked inpixi.tomlunless you are intentionally updating it (use the script above). - Avoid committing large artefacts (models, benchmark outputs). The repo gitignores
models/,data/, andbenchmarks/*/results/.