Conversation
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
There was a problem hiding this comment.
Code Review
This pull request migrates the project's dependency management and build system from setuptools and pip to uv. Key changes include updating the pyproject.toml to use uv_build, adding a uv-lock-check pre-commit hook, and revising the README and AGENTS documentation to prioritize uv-based workflows while maintaining backward compatibility for pip. The Dockerfile has also been updated to use uv for faster, reproducible builds. Feedback identifies a critical issue in the Dockerfile where the virtual environment may be shadowed by volume mounts and a pathing error in the build exclusion list within pyproject.toml.
There was a problem hiding this comment.
Pull request overview
Migrates the project’s Python dependency/build tooling from pip/setuptools-centric workflows to uv, updating local developer setup, Docker dev image, and CI pipelines accordingly.
Changes:
- Switch
pyproject.tomlbuild backend touv_buildand addtool.uvconfiguration for platform environments and build packaging rules. - Update developer workflows and docs (README/AGENTS) to use
uv sync/uv runand add a pre-commit hook to enforceuv.lockfreshness. - Update GitHub Actions to use
astral-sh/setup-uvand run tests/audits/pre-commit viauv.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/Dockerfile.dev | Installs uv in the dev container and uses uv sync for dev/test dependencies. |
| README.md | Documents uv as the default dependency manager and adds a pip+venv fallback section. |
| pyproject.toml | Moves build backend to uv_build and configures uv build/data/exclude behavior. |
| AGENTS.md | Updates common commands and dependency guidance to use uv. |
| .python-version | Adds a Python version file intended for tool/CI alignment. |
| .pre-commit-config.yaml | Adds a uv lock --check hook to keep uv.lock in sync. |
| .github/workflows/test.yml | Runs tests and dependency audit via uv. |
| .github/workflows/pre-commit.yml | Runs pre-commit via uv. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
viraatc
left a comment
There was a problem hiding this comment.
Review Council — Multi-AI Code Review
Reviewed by: Codex + Claude | Depth: thorough (3001 lines)
Found 5 issues across 4 files.
Review Council — Multi-AI Code ReviewReviewed by: Codex + Claude | Depth: thorough (3001 lines, 9 files) Found 5 issues across 4 files. 🔴 Must Fix (critical)Issues that will cause build failures or incorrect behavior in production.
🟡 Should Fix (medium)Real issues that trigger under specific conditions or diverge from project policy.
🔵 Consider (low)Valid improvements that could be follow-ups.
Note: 6 issues from the Claude reviewer were dropped during verification — they referenced files not changed in this PR (schema.py, init.py, test_cli.py, test_benchmark_command.py, main.py). All remaining issues were verified against HEAD source files. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b2589d9 to
175d752
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 29 out of 30 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
arekay-nv
left a comment
There was a problem hiding this comment.
[Review by Claude] Reviewed locally against main. Build direction (setuptools → uv_build, lockfile-based CI, pinned uv) is sound, but there's one blocker: the [tool.uv-build] table is silently ignored because the correct name is [tool.uv.build-backend], AND exclude should be source-exclude. Net effect: _server.py (which imports fastapi, not a project dep) ships in the wheel where main intentionally excluded it. Verified by building both ways.
| Severity | Issue |
|---|---|
| 🔴 | [tool.uv-build] + exclude silently ignored → _server.py ships with unresolvable fastapi import |
| 🟡 | README primary (uv) path shows bare inference-endpoint after uv sync with no activation or uv run |
| 🟡 | Dockerfile.dev: COPY src/ after USER appuser without --chown |
| 🟢 | Pre-commit uv-lock-check hook uses language: python to install uv via pip — wasteful |
| 🟢 | Redundant index-url = "https://pypi.org/simple" (PyPI is the default) |
| 🟢 | 23 commits, many fix:-the-previous-fix: — consider squashing before merge |
Details on the inline comments below.
Migrate project tooling from pip+setuptools to uv+uv_build for reproducible, lockfile-driven dependency management. Packaging: - Switch build backend to uv_build, pinned to uv_build==0.7.6 - Add [tool.uv.build-backend] with source-exclude for livecodebench _server.py - Pin .python-version to 3.12.11 (matches docker base image) - Add uv.lock covering Linux x86_64/aarch64 and macOS x86_64/arm64 CI: - Migrate test, pre-commit workflows from pip to uv with setup-uv action - Add build smoke-test job (build wheel, install in clean venv, inference-endpoint --help) - Add uv-lock-check pre-commit hook (language: system) triggered by pyproject.toml or uv.lock changes Docker: - Dockerfile.dev uses uv from ghcr.io/astral-sh/uv:0.7.6 - UV_PROJECT_ENVIRONMENT=/opt/venv to survive volume mounts - Two-stage COPY for dependency-layer caching (--no-install-project then full sync) - --chown on COPY src/ so appuser owns files Docs: - README.md: uv primary path, pip+venv backward-compat collapsed into details - AGENTS.md, CONTRIBUTING.md, DEVELOPMENT.md, CLI_DESIGN.md etc: uv run prefix for all command examples - Per-module READMEs updated consistently Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
175d752 to
170b56f
Compare
What does this PR do?
close #274
Type of change
Related issues
Testing
Checklist