docs: match documented dev setup and test commands to CI - #1407
docs: match documented dev setup and test commands to CI#1407roshaninfordham wants to merge 2 commits into
Conversation
`.github/CONTRIBUTING.md` names the CI workflows as the source of truth, but the commands it shows had drifted from them in three places: - the install step used `uv sync --all-groups`, which installs no extras, so the suite errored on importing the training dependencies - the CPU marker expression was `-m "not gpu"` against CI's much wider exclusion of coco17, e2e_coreml, e2e_executorch, e2e_roboflow, xla and tpu - the GPU marker expression omitted `not e2e_tensorrt` Following the file as written produced 118 failed and 210 errors on a clean macOS checkout; the CI commands produce 4406 passed. Also record why `uv pip install` is used rather than `uv sync`, since `uv sync --all-extras` fails outright on the declared coreml/executorch conflict.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7b2f4946ae
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| uv sync --all-groups | ||
| # Install the extras and groups the CPU test job uses (add ,coreml on macOS). | ||
| # UV_TORCH_BACKEND=cpu keeps this from pulling a CUDA build of PyTorch. | ||
| UV_TORCH_BACKEND=cpu uv pip install -e ".[train,augment,cli,visual]" --group tests |
There was a problem hiding this comment.
Add the missing uv environment creation step
In a fresh checkout, this command now fails before dependency resolution because uv pip install requires an existing virtual environment; verified with the documented command plus --dry-run, which returns No virtual environment found; run uv venv to create an environment. The previous uv sync flow created .venv automatically, so new contributors following these setup steps will not get a working test environment unless the guide first creates/activates a venv (or uses another explicit target).
Useful? React with 👍 / 👎.
uv pip install requires an existing virtualenv and does not create one, so
the rewritten setup steps failed on a fresh checkout with
error: No virtual environment found; run `uv venv` to create an environment
The uv sync flow they replaced created .venv implicitly, which is why the
step was not needed before.
Description
.github/CONTRIBUTING.mdnames the CI workflows as the source of truth for test commands, but the commands it shows had drifted from them in three places. Following the file as written does not produce a working local environment.On a clean macOS checkout:
Type of Change
Motivation and Context
Three separate drifts, each of which produces failures that look like a broken repository rather than a setup problem:
Install.
uv sync --all-groupsinstalls dependency groups but no extras, so everything importing the training dependencies errors on import. The obvious next thing to try,uv sync --all-extras, hard-errors instead:Extras 'coreml' and 'executorch' are incompatible with the declared conflicts.ci-tests-cpu.ymlusesuv pip install -e ".[train,augment,cli,visual]" --group testswithUV_TORCH_BACKEND=cpu, andci-tests-gpu.ymlalready carries a comment explaining whyuv piprather thanuv sync— that reasoning was never surfaced in CONTRIBUTING.CPU markers. The documented expression is
-m "not gpu". CI uses-m "not gpu and not coco17 and not e2e_coreml and not e2e_executorch and not e2e_roboflow and not xla and not tpu". The extra exclusions are what keep suites needing the COCO dataset, a Roboflow API key, or an accelerator from running locally.GPU markers. The documented expression is
-m gpu; CI uses-m "gpu and not e2e_tensorrt".Changes Made
uv pip installis used rather thanuv sync.ci-tests-cpu.ymlandci-tests-gpu.yml.Testing
Documentation-only change; verified by running the commands as written after the edit.
→ 4406 passed, 67 skipped in 115s.
pre-commit run --all-files— 18 hooks pass. Themypylocal hook fails in my environment withNo module named mypy; it fails identically on a stashed clean tree, so it is a local environment artifact rather than something this change introduces, and this change touches no Python.Additional Notes
I have kept
uv sync --group docsanduv sync --group buildfor the docs and build workflows, where no extras are needed.The macOS
coremlextra is mentioned in a comment rather than added to the command, matching howci-tests-cpu.ymlconditionally appends it.