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

Colab and Kaggle loggers removeHandler #8985

Merged
merged 1 commit into from
Aug 16, 2022
Merged

Conversation

glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Aug 16, 2022

Resolve duplicate outputs in colab. Also optimizes Colab and Kaggle environment checks.

Signed-off-by: Glenn Jocher glenn.jocher@ultralytics.com

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Enhancements to environment detection and logging setup in the Ultralytics YOLOv5 codebase.

📊 Key Changes

  • Added is_ascii function to check if a string contains only ASCII characters.
  • Improved is_colab function to detect Google Colab environment more reliably.
  • Adjusted set_logging to handle Colab environment similarly to Kaggle.
  • Moved is_docker function to a different location within the file for better code organization.
  • Simplified is_kaggle function to remove assertions and use a more direct return statement.
  • Removed redundant or relocated code including old is_ascii, is_docker, and is_colab definitions.

🎯 Purpose & Impact

  • New is_ascii function might help in situations where non-ASCII characters could cause issues.
  • is_colab function offers more precise detection, which could aid in configuring environments or troubleshooting.
  • Changes in logging behavior for Colab and Kaggle ensure more consistent handling of logs across different platforms.
  • Code cleanup and improved detection logic can simplify development and contribute to more maintainable code, potentially leading to fewer bugs.

Resolve duplicate outputs in colab. Also optimizes Colab and Kaggle environment checks.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
@glenn-jocher glenn-jocher self-assigned this Aug 16, 2022
@glenn-jocher glenn-jocher merged commit 464c2c6 into master Aug 16, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-1 branch August 16, 2022 14:49
ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
Resolve duplicate outputs in colab. Also optimizes Colab and Kaggle environment checks.

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>

Signed-off-by: Glenn Jocher <glenn.jocher@ultralytics.com>
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