Skip to content

Use !uv pip install in Jupyter notebooks#73

Closed
glenn-jocher wants to merge 1 commit intomainfrom
uv
Closed

Use !uv pip install in Jupyter notebooks#73
glenn-jocher wants to merge 1 commit intomainfrom
uv

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 24, 2025

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

WARNING ⚠️ this PR is very large, summary may not cover all changes.

🌟 Summary

Standardizes Ultralytics notebooks to use uv for faster, more reliable installs and cleans up minor formatting — improving setup speed and consistency across tutorials. ⚡️📒

📊 Key Changes

  • Switched installation commands to use uv: !uv pip install ultralytics across multiple notebooks:
    • Object counting with YOLO11
    • Validation results export (DataFrame/CSV/SQL/HTML/XML/JSON)
    • Heatmap generation
    • Queue management solution
  • Minor notebook cleanups:
    • Small whitespace and cell formatting adjustments
    • Consistent metadata ordering and kernel specs

🎯 Purpose & Impact

  • Faster, more deterministic installs with uv improve startup time and reliability in Colab and similar environments. 🚀
  • Consistent setup steps reduce confusion and make notebooks easier to follow for new users. 👍
  • No breaking changes to code logic or APIs — all existing functionality remains the same. ✅

See the Ultralytics Docs for details.

@UltralyticsAssistant UltralyticsAssistant added dependencies Dependencies and packages documentation Improvements or additions to documentation enhancement New feature or request labels Aug 24, 2025
@UltralyticsAssistant
Copy link
Member

👋 Hello @glenn-jocher, thank you for submitting an ultralytics/notebooks 🚀 PR! This is an automated response — an Ultralytics engineer will review and assist soon. To ensure a seamless integration of your work, please review the following checklist:

  • ✅ Define a Purpose: Clearly explain the purpose of your fix or feature in your PR description, and link to any relevant issues(https://github.com/ultralytics/notebooks/issues). Ensure your commit messages are clear, concise, and adhere to the project's conventions.
  • ✅ Synchronize with Source: Confirm your PR is synchronized with the ultralytics/notebooks main branch. If it's behind, update it by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • ✅ Ensure CI Checks Pass: Verify all Ultralytics Continuous Integration (CI)(https://docs.ultralytics.com/help/CI/) checks are passing. If any checks fail, please address the issues.
  • ✅ Update Documentation: Update the relevant documentation(https://docs.ultralytics.com/) for any new or modified features.
  • ✅ Add Tests: If applicable, include or update tests to cover your changes, and confirm that all tests are passing.
  • ✅ Sign the CLA: Please ensure you have signed our Contributor License Agreement(https://docs.ultralytics.com/help/CLA/) if this is your first Ultralytics PR by writing "I have read the CLA Document and I sign the CLA" in a new message.
  • ✅ Minimize Changes: Limit your changes to the minimum necessary for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

Additional notebook-focused checks for this PR:

  • 🔍 Execution & Environment: Please confirm !uv pip install ultralytics works in Colab and standard Jupyter environments, and that all updated notebooks execute end-to-end without manual intervention.
  • 🧹 Notebook Hygiene: Ensure outputs are cleared, execution counts are consistent, kernel specs/metadata are correct, and only intended cells were modified.
  • ♻️ Backward Compatibility: If uv is unavailable in certain runtimes, consider noting a fallback or environment note in the notebook’s Setup cell to keep tutorials beginner-friendly.

For more guidance, please refer to our Contributing Guide(https://docs.ultralytics.com/help/contributing/). Don’t hesitate to leave a comment if you have any questions. Thank you for contributing to Ultralytics! ⚡️📒

@glenn-jocher
Copy link
Member Author

@RizwanMunawar looks like something happened on PR create, maybe a commit hook with formats.

Can you update this PR or delete it and create a new one for the updates? I've already done this in ultralytics/ultralytics#21793

@glenn-jocher glenn-jocher deleted the uv branch August 25, 2025 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Dependencies and packages documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants