-
-
Notifications
You must be signed in to change notification settings - Fork 16.4k
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
base: master
Are you sure you want to change the base?
Update requirements.txt #12164
Conversation
Added dill package, needed for loading the model in detect.py Signed-off-by: Vishruth Rao <[email protected]>
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.
👋 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 runninggit pull
andgit 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
@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. |
Hi @glenn-jocher, any updates on the review? |
Added the dill package for loading custom models in detect.py Signed-off-by: Vishruth Rao <[email protected]>
for more information, see https://pre-commit.ci
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! |
Signed-off-by: Glenn Jocher <[email protected]>
All Contributors have signed the CLA. ✅ |
I have read the CLA Document and I sign the CLA |
Hello @glenn-jocher, any updates on the review? |
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 If you haven't done so already, please provide a minimum reproducible code example that demonstrates the necessity of the Your contribution is valuable to us, and we want to ensure that everything works seamlessly for all users. Looking forward to your response! |
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. |
Hi @Powerlax, Thank you for the detailed explanation and for testing with the latest version of the 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 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 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. 😊 |
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
dill>=0.3.7
to therequirements.txt
file.🎯 Purpose & Impact
dill
, is likely introduced for advanced data serialization. 🔄dill
installed to avoid potential compatibility issues. ✅🌟 Summary
Included
dill
library in requirements for enhanced data serialization support. 🆕