-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
docs: installation guide in Kaggle Notebook #22970
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
👋 Hello @PrashantDixit0, thank you for submitting a
For more guidance, please refer to our Contributing Guide. This is an automated message, and an Ultralytics engineer will assist soon. 🚀 If you have any questions, feel free to comment here. |
UltralyticsAssistant
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔍 PR Review
Made with ❤️ by Ultralytics Actions
Solid addition overall: the new Installation section makes the Kaggle page more self-contained and should reduce first-run friction. Main concerns are a few troubleshooting recommendations that can inadvertently break Kaggle environments (manual --no-deps dependency list and hard version pins) and one statement that downplays pip resolver warnings too strongly. Tightening those parts to be more conditional/fallback-oriented would make this guide safer and more reliable.
💬 Posted 5 inline comments
|
|
||
| ```python | ||
| !pip install --no-deps ultralytics | ||
| !pip install torch torchvision opencv-python matplotlib pillow pyyaml requests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--no-deps path lists a manual dependency set that is likely incomplete/incorrect for many Kaggle environments (e.g., missing ultralytics optional/runtime deps, and torch/torchvision versions must match CUDA + Kaggle image). This guidance risks breaking working environments. Prefer directing users to reinstall only ultralytics (and maybe opencv-python) or to pin versions based on the Kaggle image, rather than prescribing a broad manual dependency list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is required to install with --no-deps as numpy, opencv and torch are already installed in Kaggle notebook which raises dependency conflict while installing Ultralytics
| If you encounter specific version conflicts, you can pin compatible versions: | ||
|
|
||
| ```python | ||
| !pip install ultralytics opencv-python==4.8.1.78 numpy==1.24.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
opencv-python==4.8.1.78 numpy==1.24.3 is likely to conflict with Kaggle’s preinstalled stack (and with different Python versions), and can downgrade/upgrade in ways that break other libs. Consider removing hard pins or rephrasing to recommend pinning only when an error message indicates a required version, and to match Kaggle’s preinstalled versions.
| !pip install ultralytics | ||
| ``` | ||
|
|
||
| For the latest development version, you can install directly from GitHub: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 MEDIUM: Installing from git+https://github.com/ultralytics/ultralytics.git on Kaggle can be fragile because Kaggle images often lack git (or block it) and users may hit authentication/proxy issues. Consider either linking to a known-working Kaggle notebook as the recommended path, or add a short fallback note (e.g., install the PyPI package instead) to prevent a dead-end.
| **Error: "ERROR: pip's dependency resolver does not currently take into account..."** | ||
| - Solution: This is usually a warning and can be safely ignored. The installation typically succeeds despite the message | ||
| - Alternatively, use Method 2 above to install without dependency resolution | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 MEDIUM: Saying the dependency resolver message "can be safely ignored" is risky; in some cases it indicates an incompatible environment that will fail at import/runtime. Consider wording this as "often a warning" and instruct users to run ultralytics.checks() (or a quick import + inference) to confirm everything works, and then apply the troubleshooting methods if it doesn’t.
|
|
||
| ```python | ||
| !pip install ultralytics | ||
| # Then click "Restart Kernel" from the notebook menu |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📝 LOW: The code block mixes shell-style !pip with a UI instruction comment. Since Kaggle UI labels vary, consider using more general wording like "restart the kernel/session" outside the code block, or ensure the label matches Kaggle’s current UI to avoid confusion.
|
@kayselmecnun @glenn-jocher Please review this PR, which improves documentation to resolve common Ultralytics installation issues in Kaggle notebooks. |
|
Thanks @PrashantDixit0 — we’ll review this shortly; in the meantime please keep the new Installation/troubleshooting guidance consistent with the existing flow in the Kaggle integration docs and add a quick caution around using |
This PR adds a Installation section to the Kaggle integration documentation:
I have read the CLA Document and I sign the CLA
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Adds a clear Kaggle notebook installation and troubleshooting guide for Ultralytics YOLO11 docs. 📚🚀
📊 Key Changes
docs/en/integrations/kaggle.mdcovering internet enablement,pip install, and verification steps--no-deps, kernel restart, version pinning)🎯 Purpose & Impact