-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TVMC] Allow optional arguments to be passed to importers #7674
Conversation
@leandron @jwfromm @mdw-octoml Could you take a look at this PR? |
|
||
mod, params = tvmc.frontends.load_model(onnx_resnet50) | ||
def verify_load_model__onnx(model, **kwargs): |
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.
As in the comment above, I would probably suggest using @pytest.mark.parametrize
here as well and not having the separate verify_load_model__onnx
helper function.
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.
The onnx test is a little bit more complex because of the things being tested, so I think I'm going to leave it as is and try to not break things.
* add support for optional args for frontends tvmc * remove unnecessary comments * Add changes suggested by Matt W. via PR Co-authored-by: Jocelyn <[email protected]>
* add support for optional args for frontends tvmc * remove unnecessary comments * Add changes suggested by Matt W. via PR Co-authored-by: Jocelyn <[email protected]>
This PR adds the ability to pass optional arguments to importers within TVMC. For example, onnx importers have a "freeze_params" argument that is useful for supporting certain models.
This change is aimed at making TVMC more useful when called from python, but doesn't impact the command line experience.