NVIDIA-NeMo / NVIDIA-NeMo/nemo-platform
Pre-commit hooks bypass the mise-pinned uv
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 78
- Forks
- 23
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 578
Description
Follow-up to #1134, which routes the make targets through the uv pinned in mise.toml but leaves the pre-commit surface alone.
Problem
Five hooks in .pre-commit-config.yaml are language: system and resolve uv straight off PATH:
| Hook | Entry | Reaches uv |
|---|---|---|
uv-lock |
uv lock |
directly |
copyright-fix |
uv run script/copyright_fixer.py |
directly |
config-reference-docs |
bash -c 'uv run generate-config-docs && …' |
directly |
ty |
bash tools/lint/run-ty-check.sh |
via the script |
openapi-generator |
bash script/generate-openapi-spec.sh |
via the script |
With a global uv outside pyproject.toml's required-version = ">=0.9.14,<0.10.0", uv lock fails:
error: Required uv version `>=0.9.14, <0.10.0` does not match the running version `0.11.4`
That blocks any commit touching pyproject.toml. It's the same failure #1134 fixes for make, on a surface that fires far more often — and the advice it removes from AGENTS.md (downgrade your global uv) is still the only workaround here.
Pre-existing, not a regression from #1134.
Options
- Prefix the entries with
mise exec --. Smallest diff. Breaks anyone usingNMP_SKIP_MISE=1or without mise, since pre-commit has no equivalent opt-out. - Add a
script/uvshim that resolves the mise-managed uv, honoursNMP_SKIP_MISE, and falls back to PATH. Pre-commit entries becomescript/uv lock; the Makefile'sUV :=collapses onto the same shim, giving both surfaces one resolution path. Preferred.
Out of scope but related
packages/models,packages/filesets,packages/nemo_evaluator_sdkandservices/core/modelshave bare-uv Makefiles. None are reachable from the root Makefile — they're run directly asmake -C ….- The
docs-*targets callnpm/npxoff PATH, bypassing the Node pinned inmise.tomlsince #1109.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with .pre-commit-config.yaml and compare the five listed hooks with the root Makefile's UV resolution. Read tools/lint/run-ty-check.sh and script/generate-openapi-spec.sh, then reproduce the version-mismatch failure with the affected pre-commit surface. Done means the hooks and root Makefile share one uv resolution path while preserving the documented skip and PATH fallback behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100