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

Favor EMA over model in train checkpoints #9433

Merged
merged 5 commits into from
Mar 31, 2024
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Mar 30, 2024

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvements in model saving and configuration handling in Ultralytics training engine.

πŸ“Š Key Changes

  • Removed de_parallel utility from imports, streamlining the library's dependencies.
  • Changed how models are saved: now explicitly sets "model" to None in the checkpoint, emphasizing reliance on EMA (Exponential Moving Average) for model restoration.
  • Adjusted model setup to derive configuration directly from weights rather than through checkpoint dictionary, simplifying the configuration process.

🎯 Purpose & Impact

  • Efficiency Boost: Removing unnecessary utilities and streamlining saving processes makes the code cleaner and potentially faster. πŸš€
  • Simplification: By directly linking model configuration to weights and emphasizing EMA for checkpoints, this update simplifies the model restoration process for users, making it more intuitive. 🌐
  • User Experience: These changes enhance user experience by making model saving and loading both more straightforward and more reliable, likely reducing common issues or confusion during these critical steps. πŸ› οΈ

This update is part of ongoing efforts to refine and optimize the Ultralytics framework, ensuring it remains at the forefront of efficiency, usability, and reliability in the AI and machine learning community. 🌟

Copy link

codecov bot commented Mar 30, 2024

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 76.98%. Comparing base (479afce) to head (e91c97b).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9433      +/-   ##
==========================================
+ Coverage   76.94%   76.98%   +0.03%     
==========================================
  Files         117      117              
  Lines       14854    14854              
==========================================
+ Hits        11430    11435       +5     
+ Misses       3424     3419       -5     
Flag Coverage Ξ”
Benchmarks 36.78% <0.00%> (+0.05%) ⬆️
GPU 38.84% <100.00%> (-0.02%) ⬇️
Tests 72.05% <100.00%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher changed the title Favor EMA overmode in train checkpoints Favor EMA over model in train checkpoints Mar 30, 2024
@glenn-jocher glenn-jocher merged commit 7ea2007 into main Mar 31, 2024
13 checks passed
@glenn-jocher glenn-jocher deleted the do-not-save-model branch March 31, 2024 04:14
hmurari pushed a commit to hmurari/ultralytics that referenced this pull request Apr 17, 2024
gkinman pushed a commit to Octasic/ultralytics that referenced this pull request May 30, 2024
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.

1 participant