Repository navigation
Use setup-uv defaults for Python and the venv - #51
Conversation
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. Don't hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! 🚀 |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Reviewed the CI and deployment workflow changes. The new setup-uv defaults are used consistently, and package installs and subsequent Python commands run in the activated venv. LGTM.
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 2
Made with ❤️ by Ultralytics Actions
Review 2: the earlier LGTM is reversed because the workflow refs remain @main, despite the PR's stated validation against setup-uv-defaults. This leaves the new installs relying on defaults that this PR does not select; update both refs before merging.
💬 Posted 1 inline comment
⚠️ HIGH.github/workflows/ci.yml:34Both workflows still referenceultralytics/actions/setup-uv@main, so this CI run does not use thesetup-uv-defaultsbranch described in the PR. Since this change removes--systemand relies on that branch's activated venv defaults, the install can fail without an active venv. Point the action refs in both workflows at@setup-uv-defaultsfor validation, then switch them back after #915 merges.
| - name: Install dependencies | ||
| run: | | ||
| uv pip install --system -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | ||
| uv pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu |
There was a problem hiding this comment.
ultralytics/actions#915 merged at 17:18 UTC (da5463a, released as 0.4.0), so setup-uv@main now carries the new defaults and this CI run exercises them. The validation commit pointing at @setup-uv-defaults was already reverted, and the PR description is updated to match.
| - name: Install dependencies | ||
| run: | | ||
| uv pip install --system -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu | ||
| uv pip install -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cpu |
There was a problem hiding this comment.
ultralytics/actions#915 merged at 17:18 UTC (da5463a, released as 0.4.0), so setup-uv@main now carries the new defaults and this CI run exercises them. The validation commit pointing at @setup-uv-defaults was already reverted, and the PR description is updated to match.
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
🔍 PR Review 3
Made with ❤️ by Ultralytics Actions
Since review 2, the @main concern is resolved: setup-uv now activates a venv by default, and these workflows retain their explicit Python-version pins while installing dependencies into that environment. No remaining regression found; LGTM. (raw.githubusercontent.com)
|
🎉 PR #51 is merged—thank you, @glenn-jocher, for updating the CI and push workflows to use
The workflows now install packages into the |
Replaces
actions/setup-pythonwithultralytics/actions/setup-uv. By default, that action now activates a venv on the newest Python preinstalled on the runner, with no Python download. Packages install into that venv, so--systemis dropped. Jobs that pin a Python version keep the pin onsetup-uv, which uses the preinstalled copy when the runner has one.CI first ran against the
setup-uv-defaultsbranch of ultralytics/actions#915. #915 is now merged (da5463a, released as 0.4.0), sosetup-uvis back on@main, which carries the new defaults.🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Updated the CI and push workflows to use
setup-uvfor Python setup and install packages into its virtual environment.📊 Key Changes
actions/setup-pythonwithultralytics/actions/setup-uvin both workflows.setup-uv.--systemfrom bothuv pip installcommands.🎯 Purpose & Impact
setup-uv; the existing Python version pins remain in place.