Skip to content

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.

1 participant