Skip to content

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

Merged
glenn-jocher merged 1 commit intomasterfrom
update/resolve
Sep 11, 2021
Merged

Replace path.absolute() with path.resolve()#4763
glenn-jocher merged 1 commit intomasterfrom
update/resolve

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