Open Asman2010 opened 11 months ago
π 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?
@kalenmike
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. Optimizer stripped from runs/detect/train/weights/last.pt, 136.7MB Ultralytics HUB: Syncing final model... AttributeError Traceback (most recent call last) in <cell line: 4>() 2 3 model = YOLO('https://hub.ultralytics.com/models/XW4ss6rScwzcdElUedCm') ----> 4 model.train()
4 frames [/usr/local/lib/python3.10/dist-packages/ultralytics/yolo/utils/callbacks/hub.py](https://localhost:8080/#) in on_train_end(trainer) 51 # Upload final model and metrics with exponential standoff 52 LOGGER.info(f'{PREFIX}Syncing final model...') ---> 53 session.upload_model(trainer.epoch, trainer.best, map=trainer.metrics.get('metrics/mAP50-95(B)', 0), final=True) 54 session.alive = False # stop heartbeats 55 LOGGER.info(f'{PREFIX}Done β \n'
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