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

train.py --logdir argparser addition #660

Merged
merged 3 commits into from
Aug 7, 2020
Merged

train.py --logdir argparser addition #660

merged 3 commits into from
Aug 7, 2020

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 7, 2020

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improvements to logging and path handling in train.py script.

πŸ“Š Key Changes

  • πŸ›  Refactored directory path handling using Path from pathlib for better clarity and consistency.
  • πŸ“ Changed the log_dir assignment to support a custom logging directory passed via the new --logdir argument.
  • πŸš€ Ensured creation of the logging directory (log_dir) and its subdirectories.
  • πŸ“ Updated the path concatenation method to leverage the / operator provided by pathlib for joining paths.
  • ✨ Added a new --logdir command-line argument to specify the logging directory.

🎯 Purpose & Impact

  • βœ… Ensures clear and flexible specification of logging directories, improving customizability for different runtime environments.
  • 🧩 The use of pathlib provides a more readable and robust way to handle file paths, which can prevent path-related errors.
  • πŸ“Š Users can now choose to save logs in a specific directory, enhancing the organization of training runs and making it easier to manage experiment artifacts.
  • βž• Enhancements may lead to a smoother user experience and greater ease of use for both new and existing users of the YOLOv5 model training process.

@glenn-jocher
Copy link
Member Author

Addresses issue #640

@glenn-jocher glenn-jocher merged commit 9368453 into master Aug 7, 2020
@glenn-jocher glenn-jocher deleted the logdir branch August 7, 2020 05:26
@glenn-jocher glenn-jocher linked an issue Aug 7, 2020 that may be closed by this pull request
burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
* train.py --logdir argparser addition

* train.py --logdir argparser addition
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* train.py --logdir argparser addition

* train.py --logdir argparser addition
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* train.py --logdir argparser addition

* train.py --logdir argparser addition
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.

Easy way to save checkpoints for Colab user
1 participant