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

Explicitly convert artifact path to posix_path #3067

Merged
merged 2 commits into from
May 7, 2021
Merged

Explicitly convert artifact path to posix_path #3067

merged 2 commits into from
May 7, 2021

Conversation

AyushExel
Copy link
Contributor

@AyushExel AyushExel commented May 7, 2021

This explicit check converts forward slashes in WindowsPath to back splashes supported by artifacts

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved Weights & Biases (W&B) dataset artifact handling in Ultralytics YOLOv5.

πŸ“Š Key Changes

  • Modified the download_dataset_artifact method in the wandb_utils.py file.
  • Dataset artifacts are now managed using the Path library.

🎯 Purpose & Impact

  • πŸ”„ The change ensures better path management and compatibility across different operating systems.
  • πŸ›  Fixes potential issues with incorrect path formatting when downloading dataset artifacts from W&B.
  • 🀝 Users should experience a more reliable and seamless integration with W&B for tracking and sharing datasets.

@glenn-jocher
Copy link
Member

@AyushExel looks good, but it looks like .as_posix() is already returning a string, so the str() may be redundant?
https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.as_posix

@AyushExel
Copy link
Contributor Author

@glenn-jocher ahh yes.. Nice catch. Removed it

@glenn-jocher glenn-jocher merged commit d2a1728 into ultralytics:master May 7, 2021
KMint1819 pushed a commit to KMint1819/yolov5 that referenced this pull request May 12, 2021
* Explicitly convert artifact path to posix_path

* Remove redudant str() casting
danny-schwartz7 pushed a commit to danny-schwartz7/yolov5 that referenced this pull request May 22, 2021
* Explicitly convert artifact path to posix_path

* Remove redudant str() casting
Lechtr pushed a commit to Lechtr/yolov5 that referenced this pull request Jul 20, 2021
* Explicitly convert artifact path to posix_path

* Remove redudant str() casting

(cherry picked from commit d2a1728)
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Explicitly convert artifact path to posix_path

* Remove redudant str() casting
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

2 participants