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

Bugfix: change dataset yaml file's path to absolute #10238

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

PacificDou
Copy link
Contributor

@PacificDou PacificDou commented Apr 22, 2024

Description:
This is a bugfix for the issue reported at: #9503

Rather than converting args.data to an absolute path as discussed in the issue page, I think it makes more sense to utilize the dataset yaml file's folder.
The dataset yaml file folder will be saved as data["yaml_file"], after calling the function data = yaml_load(file, append_filename=True) at line 279.
We just need to simply convert this path to an absolute path.

The change has been tested.

I have read the CLA Document and I sign the CLA.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhanced dataset path resolution in data utilities.

📊 Key Changes

  • Modified the method to ensure the dataset root path is always absolute.

🎯 Purpose & Impact

  • Purpose: To eliminate ambiguities and errors related to relative dataset paths by making paths absolute, ensuring consistent behavior across different environments.
  • Impact: Provides a smoother experience for users working with datasets, reducing the likelihood of path-related errors. This can be particularly beneficial in scenarios involving complex directory structures or when moving projects between systems. 🛠️🚀

Copy link

github-actions bot commented Apr 22, 2024

CLA Assistant Lite bot All Contributors have signed the CLA. ✅

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👋 Hello @PacificDou, thank you for submitting an Ultralytics YOLOv8 🚀 PR! To allow your work to be integrated as seamlessly as possible, we advise you to:

  • ✅ Verify your PR is up-to-date with ultralytics/ultralytics main branch. If your PR is behind you can update your code by clicking the 'Update branch' button or by running git pull and git merge main locally.
  • ✅ Verify all YOLOv8 Continuous Integration (CI) checks are passing.
  • ✅ Update YOLOv8 Docs for any new or updated features.
  • ✅ Reduce changes to the absolute minimum required for your bug fix or feature addition. "It is not daily increase but daily decrease, hack away the unessential. The closer to the source, the less wastage there is." — Bruce Lee

See our Contributing Guide for details and let us know if you have any questions!

@PacificDou
Copy link
Contributor Author

I have read the CLA Document and I sign the CLA

Copy link

codecov bot commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.77%. Comparing base (40e5ac3) to head (75ef1d4).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10238      +/-   ##
==========================================
- Coverage   70.66%   68.77%   -1.90%     
==========================================
  Files         122      122              
  Lines       15591    15591              
==========================================
- Hits        11018    10722     -296     
- Misses       4573     4869     +296     
Flag Coverage Δ
Benchmarks ?
GPU 37.36% <100.00%> (ø)
Tests 66.74% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PacificDou PacificDou changed the title Bugfix: change default path of dataset to the yaml file's folder Bugfix: change dataset yaml file's path to absolute Apr 22, 2024
@PacificDou
Copy link
Contributor Author

Hi @glenn-jocher , this is the PR for issue #9503

@glenn-jocher
Copy link
Member

@PacificDou hello!

Thanks for submitting the PR regarding issue #9503! It looks like a solid addition for enhancing dataset path resolution. I'll review the changes and get back to you shortly. Great job on making the paths more reliable across different environments! 👍

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