-
Notifications
You must be signed in to change notification settings - Fork 516
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
move model for export preparation to be able reuse in other exporters #1698
Conversation
ab08841
to
b13da36
Compare
2ad67c8
to
11e330f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks OK to me, but keep in mind optimum main repo CI is only testing ONNX export.
normalized_task = task.replace("-with-past", "") | ||
if normalized_task not in cls.get_all_tasks(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this change related to the refactor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is not related to refactoring, it fixes bug that prevent registering tasks with-past in this case (I found it testing on optimum-intel side for registering configs for openvino)
0aab2a3
to
d20325c
Compare
@eaidova Thank you, can you install |
yes please, sorry if it is unrelated |
Can you fix
Maybe it's good to keep backward compatibility in |
@fxmarty added |
dc64a62
to
132d86e
Compare
Thank you LGTM, failing tests are unrelated! |
…huggingface#1698) * move model for export preparation to be able reuse in other exporters * rename to utils.py * Fix register decorator for task with past * exporter_type -> exporter * fix style * add backward compatibility and warnings
What does this PR do?
This PR propose to move model preparation to export outside onnx exporter for ability reuse it in different exporters (e.g. openvino, neuron) that may have own export configs. Changes are backward compatible for onnx export, should not affect other components, but will help in reusage models preparation (partitioning, building export configs) in other optimum exporters