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 checks #36

Closed
wants to merge 2 commits into from
Closed

Update checks #36

wants to merge 2 commits into from

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Nov 7, 2022

Brought in some additional checks from YOLOv5 and restored is_colab() and is_kaggle() functions.

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements to environment checks and system setup in the Ultralytics YOLOv5 software.

📊 Key Changes

  • New Utility Functions: Added functions to check if the code is running in specific environments like Google Colab, Jupyter notebooks, Kaggle, or within a Docker container.
  • Improved System Check: A new check_system function reports CPU count, RAM, and disk space, providing a clear overview of the system's resources.
  • Code Refactoring: Removed duplicate is_ascii function, consolidated checks for Colab and Kaggle environments into their respective utility functions.
  • Logging Configuration: Updated set_logging to use new utility functions to determine the Colab or Kaggle environment, streamlining the logging initialization process.

🎯 Purpose & Impact

  • Broader Compatibility: These changes facilitate better detection and adaptation for running in different cloud-based notebooks and containers.
  • 🚀 Enhanced Diagnostics: The check_system function offers immediate and user-friendly feedback on the current operating environment, helping users diagnose and resolve potential issues swiftly.
  • 🧹 Maintainability: By centralizing environment checks, future updates or bug fixes can be made more efficiently.
  • 🛠 Usability: Changes to logging provide clearer feedback to users, particularly when utilizing YOLOv5 within cloud services or Docker, leading to less confusion and smoother debugging.

@glenn-jocher glenn-jocher self-assigned this Nov 7, 2022
@glenn-jocher
Copy link
Member Author

@AyushExel I'm getting stuck on circular imports all over the place now. This is what I was warning about if we broke general.py up into many smaller files.

@AyushExel
Copy link
Contributor

@glenn-jocher where exactly? I didn't encounter any in the classification training or validation.
I'll get rid of every conflict once segmentation PR is done. Just hold on for a while

@glenn-jocher
Copy link
Member Author

glenn-jocher commented Nov 7, 2022

@AyushExel maybe we should re-merge some of these smaller files back together. Right now in this PR checks requires loggers, and loggers requires checks. The way you had it before checks like is_colab() are embedded into loggers to avoid an import, duplicating code and increasing maintenance, and complicating the usage of checks in other places we might want them.

@glenn-jocher
Copy link
Member Author

My main idea with general.py is that is requires almost no imports, so it's a place for low level functions that don't have any external import requirements. This simplifies development since functions from general.py can be imported almost anywhere without any circular import concerns.

But here with general.py broken into many small files we increase circular import occurrences.

@AyushExel
Copy link
Contributor

@glenn-jocher right okay. Then merge this one but hold on a bit after that because the segmentation PR is already very large and rebasing it against master will cause many conflicts after these changes.

@glenn-jocher
Copy link
Member Author

@AyushExel ok got it. What's the timeline on the segmentation PR merge looking like?

@AyushExel
Copy link
Contributor

@glenn-jocher I'm hoping to make the pr by late night/early morning today or by latest tomorrow

@glenn-jocher
Copy link
Member Author

@AyushExel ok no worries I'll just wait for that first and then get back to this one.

@glenn-jocher
Copy link
Member Author

Closing to focus on #40

@glenn-jocher glenn-jocher deleted the update_checks branch November 7, 2022 20:35
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