Skip to content

Model Converter: try to run Model Optimizer as a package#2395

Merged
IRDonch merged 1 commit intoopenvinotoolkit:developfrom
IRDonch:use-mo-as-package
May 17, 2021
Merged

Model Converter: try to run Model Optimizer as a package#2395
IRDonch merged 1 commit intoopenvinotoolkit:developfrom
IRDonch:use-mo-as-package

Conversation

@IRDonch
Copy link
Copy Markdown

@IRDonch IRDonch commented May 14, 2021

If our tools are installed as part of the openvino-dev distribution, then it doesn't make sense to ask the user to run setupvars, seeing as:

  1. It doesn't exist.
  2. We know that MO is installed as part of the same distribution.

Therefore, before trying to find MO the old way, try to locate its package and if that succeeds, run it as a package.

I moved the documentation for the -p option up, because I'm referencing its value in the documentation for the --mo option.

get_package_path is in _common, because we're likely going to implement the same thing in the quantizer (for POT).

If our tools are installed as part of the `openvino-dev` distribution, then
it doesn't make sense to ask the user to run `setupvars`, seeing as:

1. It doesn't exist.
2. We know that MO is installed as part of the same distribution.

Therefore, before trying to find MO the old way, try to locate its package
and if that succeeds, run it as a package.

I moved the documentation for the `-p` option up, because I'm
referencing its value in the documentation for the `--mo` option.

`get_package_path` is in `_common`, because we're likely going to implement
the same thing in the quantizer (for POT).
@IRDonch IRDonch marked this pull request as ready for review May 14, 2021 17:17
@IRDonch
Copy link
Copy Markdown
Author

IRDonch commented May 14, 2021

CC @SDxKeeper @slyubimt

@IRDonch IRDonch requested a review from jkamelin May 14, 2021 17:17
@SDxKeeper SDxKeeper self-requested a review May 15, 2021 09:52
Copy link
Copy Markdown
Contributor

@SDxKeeper SDxKeeper left a comment

Choose a reason for hiding this comment

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

Looks great! Simplifies life of Open Model Zoo users through usage of openvino-dev!
Hopefully in the future we would be able to use something smaller like openvino runtime and openvino-mo, openvino-py packages in a native python way :)

@IRDonch IRDonch merged commit 986c205 into openvinotoolkit:develop May 17, 2021
@IRDonch IRDonch deleted the use-mo-as-package branch May 17, 2021 10:08
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