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

New smart_resume() #8838

Merged
merged 5 commits into from
Aug 2, 2022
Merged

New smart_resume() #8838

merged 5 commits into from
Aug 2, 2022

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 2, 2022

Allow for commonality between tasks.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Refined resume training functionality in YOLOv5's train.py.

πŸ“Š Key Changes

  • Introduced smart_resume() function to clean up resume logic in training script.
  • Removed repetitive code blocks by centralizing resume operations.
  • Ensured optimizer and EMA (Exponential Moving Average) states are loaded correctly when resuming.
  • Added clear logging about the remaining epochs when resuming training.
  • Cleaned up label processing and moved the number of batches calculation (nb) to a more relevant code section.

🎯 Purpose & Impact

  • πŸ” Streamlining: Simplifies the codebase for readability and maintainability.
  • πŸš€ Efficiency: Reduces errors and inefficiencies in the process of resuming training.
  • πŸ“ˆ Transparency: Provides better user feedback on training progress upon resume.
  • πŸ‘€ User Experience: Enhances the clarity for users when they resume partially completed training sessions.

@glenn-jocher glenn-jocher self-assigned this Aug 2, 2022
@glenn-jocher glenn-jocher merged commit 08c8c3e into master Aug 2, 2022
@glenn-jocher glenn-jocher deleted the update/smart_resume branch August 2, 2022 13:13
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* New `smart_resume()`

* Update torch_utils.py

* Update torch_utils.py

* Update torch_utils.py

* fix
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.

None yet

1 participant