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 check_requirements() ROOT #11557

Merged
merged 1 commit into from
May 20, 2023
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented May 20, 2023

🤖 Generated by Copilot at f677495

Summary

📁,🐛,🧹,

This pull request updates the check_requirements function calls in various scripts to use the ROOT / 'requirements.txt' file from the project root directory, instead of the default requirements.txt file in the current working directory. This ensures that the correct dependencies are installed for different tasks and datasets. It also fixes some minor syntax and code style issues in the function arguments.

check_requirements
uses root file everywhere
autumn cleaning code

Walkthrough

  • Modify check_requirements function calls to use ROOT / 'requirements.txt' file as source of required packages in classify/predict.py, classify/val.py, detect.py, hubconf.py, segment/predict.py, and val.py scripts (link, link, link, link, link, link)
  • Import ROOT variable from utils.general in hubconf.py script to construct relative path to requirements.txt file (link)
  • Fix syntax error in check_requirements function call in data/Objects365.yaml file by using string argument instead of tuple argument (link)
  • Remove redundant requirements keyword argument in check_requirements function call in segment/val.py script (link)

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refinement of dependency checks across YOLOv5 scripts to enforce consistency with project requirements.

📊 Key Changes

  • Updated the check_requirements function call to reference requirements.txt directly in various Python files (predict.py, val.py, detect.py, hubconf.py, etc.).
  • Simplified the argument in check_requirements from a tuple to a single string where applicable (e.g., ('pycocotools>=2.0',) to 'pycocotools>=2.0').

🎯 Purpose & Impact

  • Consistent Dependency Management: By using the central requirements.txt file, the project ensures consistency in the environment setup for all users.
  • Ease of Maintenance: Single-point updates to requirements.txt propagate to all scripts, eliminating the need to update each script individually for requirements changes.
  • User Experience: Simplifies the setup process for users by consistently referencing the project-wide requirements, reducing the chance of mismatched or missing dependencies. 🛠️

@glenn-jocher glenn-jocher merged commit eef637c into master May 20, 2023
9 checks passed
@glenn-jocher glenn-jocher deleted the update_check_requirements branch May 20, 2023 22:18
NagatoYuki0943 added a commit to NagatoYuki0943/yolov5-ultralytics that referenced this pull request May 22, 2023
Update `check_requirements()` ROOT (ultralytics#11557)
bandakopi pushed a commit to irajcode/yolov5 that referenced this pull request Jul 20, 2023
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

1 participant