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 a --cache-model=path option #2984

Merged
merged 2 commits into from
Oct 25, 2024

Conversation

AlexandreEichenberger
Copy link
Collaborator

Right now, we can save a model with -save-model=x and then reuse it with -load-model=x.

The current -cache-model=x option will save the model when the model does not exist, and reuse it when it exists.

Minor, but that way I can run a model using the same scripts many times in a row and benefit from caching,

Signed-off-by: Alexandre Eichenberger <[email protected]>
Signed-off-by: Alexandre Eichenberger <[email protected]>
Copy link
Collaborator

@tungld tungld left a comment

Choose a reason for hiding this comment

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

LGTM. It's really helpful. Thanks!

+ '": load model this run.'
)
args.load_model = args.cache_model
args.cache_model = None
Copy link
Collaborator

Choose a reason for hiding this comment

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

Got it. It is a combination of save-model and load-model so that we don't need to run twice.

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

Jenkins Linux s390x Build #15914 [push] RunONNXModel.py: Add a `... started at 06:01

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15911 [push] RunONNXModel.py: Add a `... started at 05:01

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14941 [push] RunONNXModel.py: Add a `... started at 06:14

@jenkins-droid
Copy link
Collaborator

Jenkins Linux s390x Build #15914 [push] RunONNXModel.py: Add a `... passed after 2 hr 12 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux amd64 Build #15911 [push] RunONNXModel.py: Add a `... passed after 2 hr 37 min

@jenkins-droid
Copy link
Collaborator

Jenkins Linux ppc64le Build #14941 [push] RunONNXModel.py: Add a `... passed after 3 hr 44 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