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

Resume fix for yaml constructor posixpath error #1390

Merged
merged 3 commits into from
Nov 13, 2020
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 13, 2020

This PR attempts to fix a --resume bug following PR #1377.

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Streamlined file and directory handling in YOLOv5 training script.

πŸ“Š Key Changes

  • πŸ›  Changed opt.save_dir to always be a Path object for consistent directory handling.
  • πŸ—‘οΈ Removed automatic backup of weights during training to avoid unnecessary file duplication.
  • πŸš€ Adjusted checkpoint loading logic to directly use checkpoint directory path when resuming training.
  • πŸ“ Standardized the use of Path objects when constructing file paths for improved clarity and maintainability.

🎯 Purpose & Impact

  • πŸ’Ύ These changes aim to simplify the codebase, reducing the potential for errors related to file paths.
  • 🧹 By avoiding unnecessary weight backups, the training process is decluttered, saving disk space.
  • πŸ›€οΈ Provides a clearer and more robust framework for file path operations, which should help users and developers avoid path-related bugs.
  • πŸš€ Enhancing maintainability and readability of the code can facilitate further development and user engagement with the YOLOv5 project.

@glenn-jocher
Copy link
Member Author

--resume tests passing in Colab, merging.

@glenn-jocher glenn-jocher linked an issue Nov 13, 2020 that may be closed by this pull request
@glenn-jocher glenn-jocher merged commit 379396e into master Nov 13, 2020
@glenn-jocher glenn-jocher deleted the resume_fix branch November 13, 2020 18:03
burglarhobbit pushed a commit to burglarhobbit/yolov5 that referenced this pull request Jan 1, 2021
* resume fix for yaml constructor posixpath error

* fix update

* remove weights/ dir backup
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* resume fix for yaml constructor posixpath error

* fix update

* remove weights/ dir backup
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* resume fix for yaml constructor posixpath error

* fix update

* remove weights/ dir backup
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.

opt.project bug
1 participant