-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add version info to OpenVINO models #690
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,6 +33,7 @@ | |
STR_OPERATION_TO_FUNC = {">": op.gt, ">=": op.ge, "==": op.eq, "!=": op.ne, "<=": op.le, "<": op.lt} | ||
|
||
_optimum_version = importlib_metadata.version("optimum") | ||
_optimum_intel_version = importlib_metadata.version("optimum-intel") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I liked the consistency with _optimum_version :) But also the importlib_metadata version gives the commit ID:
|
||
|
||
_transformers_available = importlib.util.find_spec("transformers") is not None | ||
_transformers_version = "N/A" | ||
|
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.
why not :
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.
That was my first attempt, but that didn't work, after
optimum-cli export openvino -m BAAI/bge-base-en-v1.5 --library sentence_transformers bge-base-en-ov-st
library_name is detected as transformers byTasksManager.infer_library_from_model
. If I copy the config_sentence_transformers.json to the model directory, the model is detected as sentence-transformers. Should we save that file for models exported with sentence_transformers library?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.
I see, an option could be to re-use the
library_name
inferred from the original model, this solution also works for me