Skip to content

Conversation

helena-intel
Copy link
Collaborator

@helena-intel helena-intel commented May 26, 2025

Add --revision option to optimum-cli export openvino.

TODO:

  • this PR does not include loading preprocessors from a revision, because for that maybe_load_preprocessors from optimum is used, which does not support a revision argument. @echarlaix / @IlyasMoutawwakil would appreciate your input on how to handle this.
  • add to documentation

I wanted to add a better test but did not see a way to check the revision of the model after it has been converted. If there is a tiny model where a new revision for example only makes a non-breaking change to the model config I could use that and check for the expected config in the test. I could also duplicate an existing tiny model to do that.

Unrelated changes are from formatting with black.

@helena-intel helena-intel force-pushed the helena/cli-revision branch from 9a06f9c to 90bbe49 Compare May 26, 2025 11:24
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@echarlaix
Copy link
Collaborator

Looks good thanks @helena-intel !

I wanted to add a better test but did not see a way to check the revision of the model after it has been converted.

You should be able to check the model's config._commit_hash to check for the commit id. You could also potentially add a test with a tiny model by specifying a branch name directly to make sure this also works as well

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