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

New @try_export decorator #9096

Merged
merged 10 commits into from
Aug 23, 2022
Merged

New @try_export decorator #9096

merged 10 commits into from
Aug 23, 2022

Conversation

glenn-jocher
Copy link
Member

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

πŸ› οΈ PR Summary

Made with ❀️ by Ultralytics Actions

🌟 Summary

Enhancements made to the model export process for various formats in Ultralytics' YOLOv5.

πŸ“Š Key Changes

  • πŸ› οΈ Added a try_export decorator for export functions to simplify error handling.
  • πŸ“ˆ Implemented Profile() context manager within export functions for timing operations.
  • 🧹 Cleaned up exception handling, making it consistent across export functions.
  • βž• Added get_default_args() function to fetch default function arguments.

🎯 Purpose & Impact

  • 🎨 These changes provide a cleaner and more consistent export process.
  • πŸ” The Profile() manager can help with performance analysis by timing exports.
  • πŸ€– Developers benefit from a more streamlined codebase, making future maintenance and enhancements easier.
  • βœ… Users gain reliability from improved error handling during model export, potentially reducing export-related issues.

@glenn-jocher glenn-jocher self-assigned this Aug 23, 2022
export.py Outdated Show resolved Hide resolved
@glenn-jocher glenn-jocher changed the title New export decorator New @try_export decorator Aug 23, 2022
@glenn-jocher glenn-jocher merged commit d0fa004 into master Aug 23, 2022
@glenn-jocher glenn-jocher deleted the update/export_decorator branch August 23, 2022 11:06
@glenn-jocher
Copy link
Member Author

@zhiqwang PR is merged. Thank you for your contributions to YOLOv5 πŸš€ and Vision AI ⭐

ctjanuhowski pushed a commit to ctjanuhowski/yolov5 that referenced this pull request Sep 8, 2022
* New export decorator

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* New export decorator

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Cleanup

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* rename fcn to func

* rename to @try_export

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.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

3 participants