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

Update sys.path.append(str(ROOT)) #4852

Merged
merged 2 commits into from
Sep 18, 2021
Merged

Update sys.path.append(str(ROOT)) #4852

merged 2 commits into from
Sep 18, 2021

Conversation

glenn-jocher
Copy link
Member

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Improved path management and requirements checking in the YOLOv5 codebase.

πŸ“Š Key Changes

  • Updated sys.path appending logic to check whether the YOLOv5 root directory is already in sys.path before adding it.
  • Modified requirement checks to reference the requirements.txt file using the new ROOT variable across various scripts.
  • Removed commented code in utils/__init__.py.
  • Standardized ROOT directory usage in multiple files to enhance consistency.

🎯 Purpose & Impact

  • Avoids Redundancy: Ensures that the YOLOv5 root directory is not added to sys.path multiple times, preventing potential conflicts or issues from path redundancy.
  • Consistent Requirement Checks: Centralizes the check for necessary packages, making code maintenance easier and the setup process more reliable for users.
  • Cleaner Codebase: Removes unnecessary code and comments, making the code neater and easier to understand.
  • Impact on Users: These changes make the setup process more straightforward and could reduce setup errors for new users. It also simplifies future code updates for developers working on YOLOv5.

@glenn-jocher glenn-jocher merged commit 4d1a2ac into master Sep 18, 2021
@glenn-jocher glenn-jocher deleted the update/root_path branch September 18, 2021 13:02
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
* Update `sys.path.append(str(ROOT))`

* Cleanup
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
* Update `sys.path.append(str(ROOT))`

* Cleanup
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