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

Update requirements.txt #12164

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open

Update requirements.txt #12164

wants to merge 27 commits into from

Conversation

Powerlax
Copy link

@Powerlax Powerlax commented Sep 25, 2023

Added dill package, needed for loading custom models in detect.py

🤖 Generated by Copilot at c94dc81

Summary

Walkthrough

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

📊 Key Changes

  • Addition of dill>=0.3.7 to the requirements.txt file.

🎯 Purpose & Impact

  • The new requirement, dill, is likely introduced for advanced data serialization. 🔄
  • Users might experience improvements in data handling or features requiring serialization.
  • It ensures that users have the correct version of dill installed to avoid potential compatibility issues. ✅

🌟 Summary

Included dill library in requirements for enhanced data serialization support. 🆕

Added dill package, needed for loading the model in detect.py

Signed-off-by: Vishruth Rao <[email protected]>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hello @Powerlax, thank you for submitting a YOLOv5 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • ✅ Verify your PR is up-to-date with ultralytics/yolov5 master branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge master locally.
  • ✅ Verify all YOLOv5 Continuous Integration (CI) checks are passing.
  • ✅ Reduce changes to the absolute minimum required 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

@glenn-jocher
Copy link
Member

@Powerlax thanks for the suggestion! We appreciate your contribution to YOLOv5. Your update to requirements.txt has been duly noted and we'll make sure to review it thoroughly. Keep an eye on the repo for further updates! If you need any further assistance, feel free to reach out.

@Powerlax
Copy link
Author

Powerlax commented Nov 29, 2023

Hi @glenn-jocher, any updates on the review?

Powerlax and others added 2 commits November 28, 2023 20:54
Added the dill package for loading custom models in detect.py

Signed-off-by: Vishruth Rao <[email protected]>
@glenn-jocher
Copy link
Member

Thanks for your patience, @Powerlax! We're currently reviewing the changes, and we'll get back to you as soon as possible. If you have any other questions or need further assistance, feel free to let us know. Your contribution is appreciated!

Copy link
Contributor

github-actions bot commented Apr 9, 2024

All Contributors have signed the CLA. ✅
Posted by the CLA Assistant Lite bot.

@Powerlax
Copy link
Author

I have read the CLA Document and I sign the CLA

@Powerlax
Copy link
Author

Powerlax commented Jun 9, 2024

Hello @glenn-jocher, any updates on the review?

@glenn-jocher
Copy link
Member

Hi @Powerlax,

Thank you for your patience. We are currently in the process of reviewing your pull request. To ensure a smooth review process, could you please confirm that you have tested the addition of the dill package with the latest versions of torch and the YOLOv5 repository? This helps us verify compatibility and functionality.

If you haven't done so already, please provide a minimum reproducible code example that demonstrates the necessity of the dill package for loading custom models in detect.py. You can refer to our Minimum Reproducible Example Guide for more details on how to create one.

Your contribution is valuable to us, and we want to ensure that everything works seamlessly for all users. Looking forward to your response!

@Powerlax
Copy link
Author

Hi @glenn-jocher, thank you for getting back to me.

I have tested this with the latest version of the torch library (2.3). Training and Running an object detection model works.

The issue that the dill package is attempting to solve is that when running a custom model (from a locally stored .pt file), the dill module is needed to open the file. If the dill module is not installed, then it gives you an error telling you to install it (ModuleNotFound error). By installing it with the rest of the modules in requirements.txt, it makes it easier for developers to use YOLOv5 with their custom model when they open a new jupyter notebook or virtual environment.

@glenn-jocher
Copy link
Member

Hi @Powerlax,

Thank you for the detailed explanation and for testing with the latest version of the torch library. Your insights are very helpful!

To ensure we can fully understand and address the issue, could you please provide a minimum reproducible code example that demonstrates the necessity of the dill package for loading custom models in detect.py? This will help us verify the problem and ensure that our solution works seamlessly for all users. You can refer to our Minimum Reproducible Example Guide for more details on how to create one.

Here's a quick example of what the code snippet might look like:

import torch
import dill

# Example of loading a custom model
model_path = 'path/to/your/custom_model.pt'
model = torch.load(model_path, pickle_module=dill)

# Run detection
results = model('path/to/your/image.jpg')
results.show()

This will help us reproduce the issue on our end and validate the necessity of adding dill to the requirements.

Thank you again for your contribution and for helping improve YOLOv5! If you have any further questions or need additional assistance, feel free to reach out. 😊

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.

3 participants