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

Refactor for simplification 2 #9055

Merged
merged 2 commits into from
Aug 21, 2022
Merged

Refactor for simplification 2 #9055

merged 2 commits into from
Aug 21, 2022

Conversation

glenn-jocher
Copy link
Member

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvements to file handling and logger callbacks in Ultralytics YOLOv5.

πŸ“Š Key Changes

  • Simplified reading of JSON files in export.py using Path.read_text().
  • Streamlined the callback conditions for model saving related to Weights & Biases (wandb) and ClearML in utils/loggers/__init__.py.
  • Ensured the best model is saved at the end of training with a check for evolution in ClearML logger.
  • Updated the on_params_update method with type-hinting for better code clarity.

🎯 Purpose & Impact

  • Code Simplification: Using Path.read_text() enhances the clarity of the code by removing an extra file opening step.
  • Logger Refinement: The changes reduce code repetition, making it tidier and possibly easier to maintain.
  • Best Model Preservation: Adjusting the saving of the best model ensures it is not overlooked during training completion, particularly when not using hyperparameter evolution.
  • Type Hinting: Adding a type hint increases maintainability and helps developers understand the expected input types.

These changes should make the codebase more robust and user-friendly for developers integrating YOLOv5 into their projects. πŸ’»πŸ”§

@glenn-jocher glenn-jocher self-assigned this Aug 20, 2022
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit 93f63ee into master Aug 21, 2022
@glenn-jocher glenn-jocher deleted the refactor2 branch August 21, 2022 00:00
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* Refactor for simplification 2

* Update __init__.py

Signed-off-by: Glenn Jocher <[email protected]>

Signed-off-by: Glenn Jocher <[email protected]>
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