-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
AttributeError: 'DetectionTrainer' object has no attribute 'epoch' #491
Comments
👋 Hello @Asman2010, thank you for raising an issue about Ultralytics HUB 🚀! Please visit our HUB Docs to learn more:
If this is a 🐛 Bug Report, please provide screenshots and steps to reproduce your problem to help us get started working on a fix. If this is a ❓ Question, please provide as much information as possible, including dataset, model, environment details etc. so that we might provide the most helpful response. We try to respond to all issues as promptly as possible. Thank you for your patience! |
@Asman2010 Thanks for raising this bug. We are attempting to replicate this now. Once we are able to reproduce we will address the issue and update you with a solution. |
@Asman2010 We are unable to reproduce this bug. It seems like this is related to the resume function. Can you give us detailed steps of how you got here? |
Detailed Information: I was training a model using Ultralytics' YOLO implementation. I started training on my primary Google Colab account and completed the first 50 epochs. Then, I switched to my secondary Google Colab account and trained for the remaining 49 epochs. At the 100th epoch, I encountered the following error: 1 epochs completed in 0.001 hours. 4 frames AttributeError: 'DetectionTrainer' object has no attribute 'epoch' Steps to Reproduce:
hub.login('')
model = YOLO('https://hub.ultralytics.com/models/XW4ss6rScwzcdElUedCm')
model.train() Expected Behavior: The model should train and optimize the weights without any errors. Actual Behavior: The training process fails with an attribute error, stating that the 'DetectionTrainer' object does not have the attribute 'epoch'. Environment Information:
Additional Information:
I would appreciate any assistance in resolving this issue. |
@Asman2010 Thank you for the detailed steps. We will try and reproduce it. |
Search before asking
HUB Component
No response
Bug
During the training of my custom model using Ultralytics, I encountered an error with the following details:
Code Location: in <cell line: 4>()
Model Initialization: model = YOLO('https://hub.ultralytics.com/models/eMyxzmdYCHecAVVDwVIt')
Error: AttributeError: 'DetectionTrainer' object has no attribute 'epoch'
Error Location: /usr/local/lib/python3.10/dist-packages/ultralytics/utils/callbacks/hub.py
Specifics: The error occurs during the execution of session.upload_model(trainer.epoch, trainer.best, map=trainer.metrics.get('metrics/mAP50-95(B)', 0), final=True), indicating that the 'DetectionTrainer' object lacks an 'epoch' attribute.
I'm seeking assistance to understand and resolve this issue. If you have insights or recommendations, please share them. Thank you!
Environment
Minimal Reproducible Example
No response
Additional
No response
The text was updated successfully, but these errors were encountered: