-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
[Snyk] Security upgrade torch from 1.13.1 to 2.2.0 #2366
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: master
Are you sure you want to change the base?
Conversation
The following vulnerabilities are fixed by pinning transitive dependencies: - https://snyk.io/vuln/SNYK-PYTHON-TORCH-14534878
|
👋 Hello @glenn-jocher, thank you for submitting a
For more guidance, please refer to our Contributing Guide. This is an automated message 🤖—an engineer will assist shortly. 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.
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
Clean, minimal change, but the new torch>=2.2.0 constraint introduces a high-likelihood compatibility issue with the existing torchvision>=0.9.0 requirement. Update torchvision (or pin compatible pairs) to avoid broken installs/resolution failures.
💬 Posted 1 inline comment
| scipy>=1.4.1 # Scientific computing (e.g. IoU, metrics) | ||
| thop>=0.1.1 # Model profiling - FLOPs and parameter count | ||
| torch>=1.8.0 # Core PyTorch for training/inference | ||
| torch>=2.2.0 # Core PyTorch for training/inference |
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.
torch to >=2.2.0 likely breaks dependency compatibility because torchvision>=0.9.0 (still in this file) is not compatible with Torch 2.2.x. This can lead to resolver conflicts or runtime import errors (ABI/ops mismatch). Please bump torchvision to a version compatible with Torch 2.2 (or pin the Torch+Torchvision pair) to keep installs reproducible.
Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.
Snyk changed the following file(s):
requirements.txtImportant
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic
Learn how to fix vulnerabilities with free interactive lessons:
🦉 Out-of-bounds Read
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Bumps the minimum PyTorch dependency to
torch>=2.2.0to address a Snyk-reported security upgrade 🔒⚙️📊 Key Changes
requirements.txtto raise the minimum supported Torch version from>=1.8.0to>=2.2.0.🎯 Purpose & Impact