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

Centralize user_config_dir() decision making #4755

Merged
merged 1 commit into from
Sep 11, 2021
Merged

Conversation

glenn-jocher
Copy link
Member

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements to user configuration directory management in Ultralytics' YOLOv5 codebase.

πŸ“Š Key Changes

  • user_config_dir function now supports an environment variable YOLOV5_CONFIG_DIR.
  • If YOLOV5_CONFIG_DIR is set, it will use this path for the user config.
  • If the environment variable is not set, it falls back on OS-specific config directories.
  • Environment variable support facilitates more flexible configurations and deployments.

🎯 Purpose & Impact

  • 🎨 Flexibility: Users can easily set a custom configuration directory through an environment variable.
  • πŸ”§ Reliability: The function ensures the config path exists or is writable, falling back to /tmp if necessary.
  • ☁️ Cloud-Friendly: Improvements are especially beneficial for cloud deployments (e.g., GCP, AWS Lambda) where only certain directories like /tmp may be writable.
  • πŸ“ˆ Enhanced User Experience: Non-expert users benefit from a system that adapts to their environment seamlessly, while power users can customize their setup more granularly.

@glenn-jocher glenn-jocher self-assigned this Sep 11, 2021
@glenn-jocher glenn-jocher merged commit cd810c8 into master Sep 11, 2021
@glenn-jocher glenn-jocher deleted the update/config_dir branch September 11, 2021 14:32
CesarBazanAV pushed a commit to CesarBazanAV/yolov5 that referenced this pull request Sep 29, 2021
BjarneKuehl pushed a commit to fhkiel-mlaip/yolov5 that referenced this pull request Aug 26, 2022
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