Skip to content

Conversation

@glenn-jocher
Copy link
Member

@glenn-jocher glenn-jocher commented Sep 26, 2022

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

🛠️ PR Summary

Made with ❤️ by Ultralytics Actions

🌟 Summary

Refactored export.py to simplify post-export inference and validation command recommendations.

📊 Key Changes

  • Streamlined instance checks for model types (ClassificationModel, DetectionModel, SegmentationModel) using tuple unpacking.
  • Removed redundant code by consolidating the detect and predict command construction.
  • Updated log messages to be more concise and include any additional settings such as --half.

🎯 Purpose & Impact

  • Purpose: The refactoring increases code readability and maintainability by reducing complexity and repetition.
  • Impact: Users will see clearer and simpler recommendations for inference and validation commands after exporting models, facilitating easier and error-free usage. Developers will benefit from cleaner code that's easier to understand and modify.

Signed-off-by: Glenn Jocher <[email protected]>
Signed-off-by: Glenn Jocher <[email protected]>
@glenn-jocher glenn-jocher merged commit 6b2c9d1 into master Sep 26, 2022
@glenn-jocher glenn-jocher deleted the glenn-jocher-patch-2 branch September 26, 2022 18:46
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.

2 participants