Skip to content
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

Deprecate torch 1.6.0 compat _non_persistent_buffers_set #8797

Merged
merged 2 commits into from
Jul 30, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Jul 30, 2022

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced model compatibility and cleaned up outdated code in YOLOv5.

📊 Key Changes

  • 🧹 Removed compatibility code for older PyTorch version (1.6.0) in Conv class.
  • ✔️ Ensured nn.Upsample class is compatible with newer PyTorch version (1.11.0) by adding a check for the recompute_scale_factor attribute.

🎯 Purpose & Impact

  • 🔍 The removal of outdated compatibility code makes the codebase cleaner and potentially reduces maintenance overhead.
  • 🚀 Ensuring compatibility with newer versions of PyTorch prevents future deprecation issues, likely improving user experience and future-proofing the code.
  • ✅ Users can have confidence in using YOLOv5 with the latest tech, maintaining performance and functionality.

@glenn-jocher glenn-jocher changed the title Deprecate torch 1.6.0 compat _non_persistent_buffers_set Deprecate torch 1.6.0 compat _non_persistent_buffers_set Jul 30, 2022
@glenn-jocher glenn-jocher merged commit 7921351 into master Jul 30, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch July 30, 2022 19:25
@glenn-jocher glenn-jocher self-assigned this Jul 30, 2022
@glenn-jocher
Copy link
Member Author

Verified with

!git clone https://github.com/ultralytics/yolov5 -b glenn-jocher-patch-1 # clone
%cd yolov5
%pip install -r requirements.txt torch==1.7.0 torchvision==0.8.1  # install

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
…cs#8797)

Deprecate torch 1.6.0 compat _non_persistent_buffers_set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant