Option to Sandbox/Specify Dataset Save Path #4750
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the parameter --sandbox which accepts a path, when used this overwrites the project path. When training is run datasets are downloaded to this directory and all training runs are saved in a subdirectory using the --name.
I took the opportunity to refactor some of the code to make my changes easier to read, and create unit tests to verify the datasets are downloading correctly.
🛠️ PR Summary
Made with ❤️ by Ultralytics Actions
🌟 Summary
Introduction of unit tests for dataset checking and file extension validation in YOLOv5 repo.
📊 Key Changes
tests/README.md
to explain how to run unit tests.test_check_datasets.py
andtest_check_suffix.py
to validate dataset checking and file suffix utility functions.train.py
to introduce--sandbox
CLI argument allowing datasets and outputs to be saved in a custom directory.utils/general.py
with enhancements for dataset path handling and new utility functions for checking URLs and file extensions.🎯 Purpose & Impact
--sandbox
argument intrain.py
offers users more flexibility by specifying a custom directory for saving datasets and training outputs, improving data management.utils/general.py
make code more robust in handling download URLs and checking file extensions, reducing potential errors and streamlining data preparation steps.