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

[RunONNXModel.py] Add options to print out input/output signatures and support big models #2982

Merged
merged 5 commits into from
Oct 21, 2024

Conversation

tungld
Copy link
Collaborator

@tungld tungld commented Oct 18, 2024

This patch improves RunONNXModel.py script with the following changes:

  • Add two options --print-input-signature and --print-output-signature to print out signatures.
  • Support big models that are compiled into two output files: model.so and model.constants.bin

@tungld tungld changed the title Add options to print out input/output signatures and support big models [RunONNXModel.py] Add options to print out input/output signatures and support big models Oct 18, 2024
Signed-off-by: Tung D. Le <[email protected]>
Copy link
Collaborator

@AlexandreEichenberger AlexandreEichenberger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thanks, that is super useful. Is there a need to distinguish between input and output? I would have imagined that a common --print-signatures would have been enough. That way, it would also reduce the increasingly long list of options.

Also, a small pet peeve: the old -save-so accepted a directory, and would automatically "name" the .so; but the -load-so needed an explicit so file. Ideally, the behavior should be identical for both save and load, with my preference going to being able to name a directory in both cases. If the final behavior could be explicit in the "help" that would be good.

@tungld
Copy link
Collaborator Author

tungld commented Oct 21, 2024

I would have imagined that a common --print-signatures would have been enough

I merged two options into a single one --print-signatures. Thanks!

Ideally, the behavior should be identical for both save and load, with my preference going to being able to name a directory in both cases. If the final behavior could be explicit in the "help" that would be good.

Yes, both new --save-model and --load-model accept a folder only.

@tungld tungld merged commit c80d3e0 into onnx:main Oct 21, 2024
7 checks passed
@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15889 [push] [RunONNXModel.py] Add op... started at 03:23

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14919 [push] [RunONNXModel.py] Add op... started at 04:37

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #15892 [push] [RunONNXModel.py] Add op... started at 04:23

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15889 [push] [RunONNXModel.py] Add op... passed after 2 hr 6 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #15892 [push] [RunONNXModel.py] Add op... passed after 2 hr 13 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14919 [push] [RunONNXModel.py] Add op... passed after 3 hr 46 min

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.

3 participants