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

Replace path.absolute() with path.resolve() #4763

Merged
merged 1 commit into from
Sep 11, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 11, 2021

Per https://docs.python.org/3/library/pathlib.html

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

This PR updates the file path resolution method across various Python scripts.

πŸ“Š Key Changes

  • Replaced Path(__file__).absolute() with Path(__file__).resolve() in multiple files including detect.py, export.py, hubconf.py, models/yolo.py, train.py, utils/__init__.py, utils/datasets.py, utils/general.py, utils/loggers/wandb/sweep.py, utils/loggers/wandb/wandb_utils.py, and val.py.

🎯 Purpose & Impact

  • 🎯 Purpose: To ensure that file paths are resolved consistently and correctly, especially in environments where symbolic links may exist.
  • πŸš€ Impact: This should prevent potential issues related to file path resolution for users running YOLOv5 in different environments, leading to smoother execution and deployment.

@glenn-jocher glenn-jocher self-assigned this Sep 11, 2021
@glenn-jocher glenn-jocher merged commit c47be26 into master Sep 11, 2021
@glenn-jocher glenn-jocher deleted the update/resolve branch September 11, 2021 20:46
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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.

1 participant