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

Fix is_colab() #9994

Merged
merged 1 commit into from
Nov 1, 2022
Merged

Fix is_colab() #9994

merged 1 commit into from
Nov 1, 2022

Conversation

glenn-jocher
Copy link
Member

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

@AyushExel @kalenmike

Signed-off-by: Glenn Jocher [email protected]

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Improved detection of Google Colab environment within the utility functions.

📊 Key Changes

  • Modified the is_colab() function to check for the 'google.colab' module in sys.modules instead of searching for 'COLAB_GPU' in the environment variables.

🎯 Purpose & Impact

  • Enhanced Accuracy: Detecting the Colab environment through sys.modules is more reliable than environment variables, which can potentially reduce false positives and negatives when determining the runtime environment.
  • User Experience: This change ensures features that are specific to the Colab environment behave correctly, providing a smoother experience for users running YOLOv5 in Google Colab notebooks.
  • Potential Impact: Users working on Google Colab should see no interruptions or improvements in functionality, while the codebase becomes slightly more robust and maintainable.

@glenn-jocher glenn-jocher merged commit 49156eb into master Nov 1, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch November 1, 2022 11:02
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