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

[OVC] Fixed error in --output_model param. #20969

Merged
merged 4 commits into from
Nov 15, 2023

Conversation

popovaan
Copy link
Contributor

@popovaan popovaan commented Nov 8, 2023

Root cause analysis:
If non-existing directory is set in --output_model, then OVC generates a model with empty name ".xml".
This happens due to error in get_model_name_from_args(), that treats non-existing as not a directory, which is wrong.

Solution:
Check not only os.path.isdir(argv.output_model), which checks that path existing directory, but also if path ends with separator which means it is non-existing output directory.

Also the logic was also corrected to not set synthetic "model.xml" name in any case. If we cannot derive original name (this can happen only if original saved model is located in root directory) and "--output_model" was not specified we should raise error.

Ticket: -

Code:

  • Comments
  • Code style (PEP8)
  • Transformation generates reshape-able IR
  • Transformation preserves original framework node names
  • Transformation preserves tensor names

Validation:

  • Unit tests
  • Framework operation tests
  • Transformation tests

Documentation:

  • Supported frameworks operations list
  • Guide on how to convert the public model
  • User guide update

@popovaan popovaan requested review from a team as code owners November 8, 2023 16:01
@github-actions github-actions bot added the category: MO Model Optimizer label Nov 8, 2023
@popovaan popovaan requested a review from rkazants November 9, 2023 15:44
@rkazants rkazants requested a review from slyalin November 13, 2023 09:47
@popovaan popovaan requested a review from rkazants November 15, 2023 11:14
@rkazants rkazants merged commit d304be0 into openvinotoolkit:master Nov 15, 2023
32 checks passed
byungilm pushed a commit to byungilm/openvino that referenced this pull request Nov 17, 2023
* Fixed error in get_model_name_from_args(), added tests.

* Corrected output_model description.

* Corrected test.
allnes pushed a commit to allnes/openvino that referenced this pull request Nov 23, 2023
* Fixed error in get_model_name_from_args(), added tests.

* Corrected output_model description.

* Corrected test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: MO Model Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants