Commit Graph

50 Commits

Author SHA1 Message Date
Maxim Vafin
a6bc78dd0f [PT FE] Separate tracing and scripting modes (#19676)
* [PT FE] Separate scripting and tracing in decoder

* Fix convert_model to accept decoder

* Some fixes

* Fix code style

* Fix preprocessor tests

* Fix tests

* Fix tests

* Fix more tests

* Fix ovc tests
2023-09-12 12:40:20 +04:00
Pavel Esir
90f6500871 [tests] switch layer tests to FP16 on pre-commit (#19090)
* switch to FP16 on layer tests on precommit; add Pytorch layer tests for precision sensitive subgraph

* remove redundant changes

* moved precision sensitive tests into test_mo_convert_pytorch.py

* remove redundant dumping

* skip layer tests with chaotic output

* add copy() to avoid side effects
2023-08-21 16:03:47 +04:00
Sergey Lyalin
bf607a1238 Remove example_output for ovc and ovc.convert_model (#19079)
* Removed 'example_output' from ovc and ovc.convert_model, used output for this purpose

* Update tools/ovc/openvino/tools/ovc/convert.py

* Update tools/ovc/openvino/tools/ovc/convert_impl.py

* Reverted mo parts not affected by remove of example_output

* fix PDPD convert_model tests

---------

Co-authored-by: Xiuchuan Zhai <xiuchuan.zhai@intel.com>
2023-08-15 15:14:25 +04:00
Anastasiia Pnevskaia
6bf75f569c Fix of tensor names loosing for cf=True flag in MOC transformations. (#19014)
* Added shape and type infer for result nodes in MOC transformations.

* Clang format.

* Added validate_nodes_and_infer_types() pass at the end of MOC pipeline.

* Clang format.

* Added test.

* Clang format.
2023-08-11 15:19:07 +04:00
Anastasiia Pnevskaia
59872ee072 Removed InputCutInfo, disabled input cut in OVC. (#18927)
* Fixed output_model logic.

* Removed InputCutInfo, disabled input cut in ovc.

* Disabled output cut, added tests for setting shapes or types for not all inputs.

* Returned support of numpy type.

* Separated MO and OVC python API tests.

* Small corrections.

* Added output dir test, exceptions test.

* Tests fixed.

* Corrected extension param description.

* Corrected input description, minor code corrections.
2023-08-10 23:47:27 +04:00
Maxim Vafin
5f71679fb9 [PT FE] Use weight share switch in frontend (#18993)
* [PT FE] Use weight share switch in frontend

* Return static for function

* Update src/bindings/python/src/openvino/frontend/pytorch/ts_decoder.py

* Fix issue with quantized constants

* Add tests for shared
2023-08-10 19:28:38 +00:00
Maxim Vafin
c44df9907b [MO] Do not create example inputs based on input or input_shape (#18975) 2023-08-09 18:01:35 +02:00
Maxim Vafin
da36633c08 [PT FE] Raise graceful exception when model has incorrect type (#18976)
* [PT FE] Raise graceful exception when model has incorrect type

* Improve message
2023-08-04 09:36:09 +02:00
Anastasiia Pnevskaia
0769af959e "static_shape" parameter fix. (#18843)
* Fixed static_shape param.

* Removed wrong change.

* Fixed unit test.

* Corrected mistakes in tests, switched on smart_reshape.

* Removed not used method.

* Corrected test.
2023-08-02 13:03:38 +04:00
Anastasiia Pnevskaia
c7cde6a102 Removed saved_model_tags from OVC, improved help. (#18785)
* Removed saved_model_tags, improved help.

* Fixed help, removed to string conversion of params.

* Help corrections.

* Small correction.

* Corrected wrong changes.

* Corrected wrong changes.

* Fixed arguments creating in cli parser.

* Renamed extensions parameter to extension.
2023-07-28 15:46:47 +04:00
Pavel Esir
98df87099a [MO] compress_to_fp16=True by default (2nd attempt) (#18652)
* [MO] compress_to_fp16=True by default (2dn attempt)

* fix unit-tests

* second round of fixin unit-tests

* set compress_to_fp16 default to True in ovc/cli_parser.py

* use save_model in mo_python_api_tests

* enforce compress_to_fp16=False in test_zero_copy

* selectively compress depending on the path user has chosen to generate IR

* corrected doc

* allow compress_to_fp16=False/True for ovc

* doc and unit-tests failing fix

* user save_model in ovc cli tool

* revert back serialize and compress_model but into main instead of moc_emit_ir

* cover more argument combinations for cli tool and convert_model
2023-07-27 12:32:50 +04:00
Anastasiia Pnevskaia
5aad9ee652 Used share_memory param in tf.Graph decoder. (#18747) 2023-07-25 11:16:17 +02:00
Anastasiia Pnevskaia
8d5a0b1d53 OVC cleanup. (#18649)
* WIP: parameters cleanup

* Removed debug output, fixed CLI

* Fixed python objects conversion

* Finally renamed mmap to share_weights

* Fixed TF conversion from a file or a directory

* Fixed obvious errors in unit tests

* Deleted layouts from OVC. Fixed most of the fails in ovc unit tests (there are still failures)

* Clenaup other references to layouts and fixed --version

* Fixed case when two model files are passed in TF case

* Fixed multiple model parts passing in ovc command line

* Tests fixed, support of unnamed input in cli parser.

* Remove convert_model from runtime.

* Changed silent to verbose.

* Removed transform param.

* Removed example_input, share_weights from ovc cli tool.

* Remove wrong change.

* Test fix.

* Code corrections.

* Returned comment.

* WA to fix process hanging after extension loading.

* Removed not needed code.

* Added comment.

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-07-20 20:11:28 +00:00
Ekaterina Aidova
61504bbfc2 [PT FE]: support nested inputs in example_inputs and arg dicts with d… (#18492)
* [PT FE]: support nested inputs in example_inputs and arg dicts with different argtypes

* accept hande lists as inputs

* Update tools/ovc/openvino/tools/ovc/moc_frontend/pytorch_frontend_utils.py

* update tests and add comments in code

* fix for custom types in annotations and duplicate in mo

* Update tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py
2023-07-19 17:01:22 +02:00
Anastasiia Pnevskaia
cd6ffd7620 Removed redundant copy of Tensor in TF Const translator (#18299)
* Removed copy of consts in translator, added test.

* Fixed memory loss for tf.Const.

* Added test, minor corrections.

* Update src/bindings/python/src/openvino/frontend/tensorflow/node_decoder.py

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Test corrections.

* Added comment.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-17 11:41:33 +00:00
Anastasiia Pnevskaia
6af1bb307c String tensors in tf.Graph decoder (#18461)
* String consts in TF Decoder.

* Fixed test.

* Small corrections.

* Added test, minor corrections.

* Test correction, removed decoding.

* Removed wrong changes.

* Removed not needed code.
2023-07-14 17:58:07 +04:00
Maxim Vafin
1d9be8c76e Do not freeze models with compressed constants (#18505)
* Do not freeze models with compressed constants

* Add test
2023-07-14 08:30:35 +02:00
Pavel Esir
1cb4595727 [MO] add support for scalar shapes into cli_parser.py (#18312)
* add support for scalar shapes into cli_parser.py

* add test-case with scalar shapes for convert_model

* reordered inputs in test-case with scalar shapes for convert_model

* minor clarifications

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-08 17:27:07 +00:00
Pavel Esir
af9a8cbbd7 fix GitHub Actions failing tests (#18357)
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-08 18:21:59 +02:00
Anastasiia Pnevskaia
5838685bd5 Removed exception for BytesIO objects in convert_model() (#18318)
* Removed exception for BytesIO objects, added test.

* Small correction.

* Corrected imports.

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Removed wrong comment.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-07-03 18:04:35 +04:00
Anastasiia Pnevskaia
5d399faa64 convert_model() in openvino.runtime. (#18080)
* Used pip wheel to build OpenVINO wheel

* Added convert_model() to openvino.runtime.

* Removed duplication of InputCutInfo, LayoutMap

* Switched Model Conversion API tests to convert_model from openvino.runtime.

* Small correction.

* Format correction.

* Small correction.

* Removed duplication of moc frontend files.

* Small correction.

* Removed duplication of cli_parser, offline_transformations.

* Code corrections.

* Removed code duplications.

* Removed code duplications.

* Updated codeowners.

* Switched layer tests to convert_model().

* Improvements

* Small correction.

* Caffe parser path fix.

* Added python api properly into deb / rpm packages

* Moved implementation to ovc tool.

* Moved implementation to ovc tool.

* Small correction.

* Use cmake -E variant from cmake 3.13

* Namespace fixes.

* Minor fixes.

* Pylint fixes.

* Fixed BOM file.

* Small corrections.

* Minor corrections.

* Minor fix.

* Error fixes.

* Added telemetry requirement.

* Improvements to fix CI

* Some refactoring

* Don't use developer package for scripts projects

* Added exception in case when MO is not imported.

* Removed exception from init.

* Removed changes from cmake.

* Added unit ovc tests, fixed minor errors.

* Added ovc unit tests to azure.

* Corrected imports.

* Fixed path to tests.

* Added missed files.

* Corrected github labels.

* Removed benchmark app from dev package.

* Small fix.

* Small corrections.

* Comment fixed.

* Removed changes from setup.py

* Removed not needed change.

* Removed duplicating unit tests.

* Removed wrong change.

* Removed not needed change.

* Apply suggestions from code review

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>

* Added ovc tool test, corrected imports.

* Added legacy TF config test.

* Removed not needed files.

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-06-30 18:26:14 +04:00
Ekaterina Aidova
a8a366de08 [PT FE]: use example input for dtype and rank detection (#18083)
* [PT FE]: use example input for dtype and rank detection, support unordered input dict

* Apply suggestions from code review

* restore old behaviour for old torch versions

* move info addition after parsing
2023-06-20 17:31:30 +04:00
Maxim Vafin
caedb6a6b4 [PT FE] Print better exception message (#18015)
* [PT FE] Print better exception message

* Sort ops and fix code style

* Apply feedback

* Remove obsolete variable

* Rearrange newlines

* Apply feedback, add messages in transformations

* Fix style

* Add exceptions in cat and getitem replacers

* Add test

* Fix test regex
2023-06-15 12:04:01 +04:00
Anastasiia Pnevskaia
77711be786 tf.Graph decoder. (#16355)
* tf.Graph decoder.

* Fix conflicts.

* Fixed det_input_node()

* Added support of non-frozen models.

* Cleaned code.

* Small fix.

* Small corrections.

* Error fixes.

* Code style.

* Code style.

* Code style.

* Small correction.

* Fixed float32 attributes.

* Small correction.

* Fixed tests.

* Fixed errors.

* Added statefull partitioned call test.

* Import fix.

* Code corrections.

* BOM test fixed.

* Corrected check, added comment.

* Added checks.

* Supported TF Fraph Iterator in load_by_model().

* Clang format.

* Small correction.

* Fixed example_input logic, added tests.

* Added comment.

* Small correction.

* Corrected example_input description.

* Moved load_by_model test to MO Python API tests.

* Minor corrections.

* Code corrections.

* Small correction.

* Clang format.

* Fixed tests.

* Import change.

* Moved GraphIterator to common FE.

* Tests refactoring, minor fixes.

* Small test correction.

* Removed not needed change.

* Removed commented code.

* Removed not needed change.

* Unit tests fix.

* Temporarily added debug output.

* Test fix.

* Applied comments.

* Fixed test.
2023-06-13 16:04:26 +04:00
Maxim Vafin
fe1ac700f0 [PT FE] Fix issues in multiple operations (#17418)
* Fix issues in aten::chunk and aten::split_with_sizes replacers

* Fix code style

* Fix compute issue

* Fix code style

* Support 1 chunk

* Fix issues in meshgrid, sqrt, rsqrt and exp operations

* Use Interpolate-11

* Fix unary ops

* Add tests for unary ops

* Fix unary ops tests

* Add changes in utils

* Fix mo test

* Remove extra line

* Fix mo tests for int
2023-05-22 10:35:34 +02:00
Xiuchuan Zhai
0b72998631 [MO][PDPD] Convert Paddle models from memory (#17005)
* support convert_model in paddle runtime

* add convert runtime paddle test

* fix a pylint error

* fix ci error

* skip test_mo_convert_paddle.py # Ticket: 95904

* auto remove tmp file

* add docs for PDFE

* enable paddle mo test in ci

* fix docs

* fix docs

* fix the docs
2023-05-20 18:13:21 +04:00
Maxim Vafin
db58355fad Remove posibility to export to onnx (#17442)
* Remove posibility to export to onnx

* Add OOB pytorch convert_model test
2023-05-17 13:39:35 +02:00
Maxim Vafin
1d59dab362 [PT FE] Improve exception when decoder cannot trace or script the model (#17338)
* [PT FE] Improve exception when decoder cannot trace or script the model

* Add exception in convert_model

* Add test
2023-05-04 07:58:40 +02:00
Maxim Vafin
1d443c6da6 Fix problems with pytorch models passed to convert_model (#17255)
* Do eval() only for torch Module

* Add test

* Support decoder in convert_model

* Enable tests
2023-04-27 18:33:46 +04:00
Anastasiia Pnevskaia
59e28f8d0d Disabled tests. (#17231) 2023-04-27 13:39:58 +04:00
Ekaterina Aidova
82ff7e17c9 use input parameter for building example_inputs (#17207)
* use input parameter for building example_inputs

* Update tools/mo/openvino/tools/mo/moc_frontend/pytorch_frontend_utils.py
2023-04-26 17:58:06 +04:00
Mateusz Tabaka
dfaa4e7bd6 Add ConvertSubtractWithConstant to MOCTransformations (#17058)
* Add ConvertSubtractWithConstant to MOCTransformations

Ticket: CVS-62419

* fix test_mo_import_from_memory tests

* move test file

---------

Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-04-26 11:37:42 +04:00
Anastasiia Pnevskaia
00847cba7d Fix of tf.GenericFunction conversion in convert_model() (#17125)
* Added GenericFunction support, fixed tf.Function test.

* Added test, added TF version checks.

* Small correction

* Removed Trackable type support.

* Small correction.
2023-04-24 22:57:56 +00:00
Anastasiia Pnevskaia
5026aa044a Removed naming of inputs in MO Python API PyTorch tests. (#17070)
* Removed naming of inputs in MO Python API PyTorch tests.

* Fixed coping of data.

* Small correction.

* Small correction.

* Small fix.
2023-04-20 11:49:45 +04:00
Anastasiia Pnevskaia
dc2fa65224 Support of unnamed saved_model_dir in MO Python API (#16542)
* Added support of unnamed saved_model_dir.

* Switch TF2 layer tests for unnamed saved_model_dir.

* Added test.

* Correction of comment.

* Removed unnecessary pytest mark.

* Code correction, added comment.
2023-04-17 17:20:27 +04:00
Anastasiia Pnevskaia
24c9d95779 Support of unnamed input for MO Python API. (#16373)
* Support of unnamed input for MO Python API.

* Code correction, tests fix.

* Small fix.

* Added tests for unnamed input, code fixes.

* Small code correction.

* Removed code comment.

* Added tests, fixed bugs.

* Minor corrections, added comments.

* Code refactoring.

* Added defaults for InputCutInfo.

* Fixed error.

* Small fixes.

* Removed wrong change.

* Fixed error.

* Corrected input description.
2023-04-14 19:37:46 +04:00
Pavel Esir
68f46ff9a1 [MO] compress_to_fp16=False by default (#16854)
* compress_to_fp16=False by default

* Apply suggestions from code review

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>

* note abound RAM consumption for FP16 compressed models

* detailed notion about RAM usage

* update 'get_compression_message()'

* corrected get_compression_message: remove infor about RAM

* fix pytorch convert layer tests

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-04-14 01:16:41 +00:00
Anastasiia Pnevskaia
4098434233 Parameter list and descriptions for mo.convert_model() method in docstring (#16459)
* Added convert_model() params docs.

* Added auto-generating of most cli params.

* Added auto-generating of cli params.

* Small correction.

* Removed wrong change.

* Corrected default values.

* Fixed errors, added tests.

* Small correction.

* Corrected params descriptions, moved cli specific params to separate file.

* Moved params specifics to utils/help.py.
2023-04-05 14:48:13 +04:00
Ekaterina Aidova
179403ddc9 [PT FE]: improve integration into mo.convert_model (#16243) 2023-03-24 16:55:07 +01:00
Przemyslaw Wysocki
52b27d82c5 Upgrade ONNX to 1.13, protobuf to 3.20.3 and relax tensorflow (#14773)
* Bump ONNX version

* Bump protobuf

* Add xfails and skips

* Add tickets

* Skip ONNX Serialization tests

* Compile ONNX with C++17

* Force cpp17 - 2

* Use MSVC check

* Update tensorflow

* Minor change

* Bump onnx to 1.13.1

* Bump protobuf to 3.20.3

* Debug test tf

* Xfail tests in comp

* Update comp tests

* Update tf reqs

* Remove deprecated ONNX function

* Align PDPD FE protobuf req with 2.4.1

* Satisfy dependency review

* Attempt to fix dependency review

* Revert pdpd protobuf

* Skip pdpd tests

* Fix MO-TF-PB test

* Skip TF test case

* Add ticket numbers, rewrite reqs

* Fix requirements

* Minor change

* Set TF to 2.12

* Remove wrapt and skip test
2023-03-24 00:43:01 +04:00
Anastasiia Pnevskaia
9efdb38b96 convert_model() legacy extensions fix (#15742)
* Fixed legacy extensions passing to MO tool.

* Added tests.

* Corrected test.

* Add debug print.

* Moved tests to layer tests.

* Added comment.

* Moved legacy ext tests to separate file. Fixed tmp .pb file cleaning.

* Small correction.

* Run MO Python API tests directory in CI.

* Small fix.

* Fix for case of splitted output.

* Corrected imports.

* Corrected imports.

* Added run of legacy extensions tests from subprocess.
2023-03-03 09:59:30 +04:00
Anastasiia Pnevskaia
6185114bc4 Clearing of CustomReplacementRegistry.registry in convert_model() (#15893)
* Clearing of CustomReplacementRegistry.registry.

* Added test.
2023-03-02 14:49:45 +04:00
Anastasiia Pnevskaia
1e24c51abb Turn on onnx fallthrough in convert_model() (#15651)
* Turn on ONNX_FALLTHROUGH in torch.onnx.export().

* Removed wrong change.

* Added test.
2023-02-23 13:22:30 +04:00
Pavel Esir
15973fd2da enable --compress_to_fp16=True by default in MO (#15488)
* enable --compress_to_fp16 by default in MO

* corrected docs, added warning if user did't specify --compress_to_fp16 explicitly

* fix failing MO unit-tests

* do not wipe out data_type if user defined it explicitly by cli argument

* updated warning message and docs

* corrected phrasing

* corrected phrasing in FP16_Compression.md

* set compress_to_fp16=False for convert tests

* leftover: set compress_to_fp16=False for convert tests

* minor correction

* print info message in main.py, som minor changes

* typos fix

* fix losing information whether arguments set by user or got from defaults

* returned back default values instead of None

* more selective correcting of test_mo_convert_pytorch.py; added test for cases when compression is enabled/disabled or left by default

* fix test_mo_convert_pytorch.py
2023-02-21 13:07:43 +01:00
Ekaterina Aidova
38943434b6 [MO][PT FE] POC Integrate PT FE into MO convert_model (#15197)
* [WIP]: poc: integrate pt fe to mo.convert_model

* temporaly resolve names using signature inspection

* fix logic

* move to moc frontend

* add rank and data type setting

* add input signature

* apply comments

* move after convert processing

* support work without example_input, provide parameters description

* ignore extensions on fe side

* upd tests

* more tests

* add notes about extensions support and removing onnx path

* remove debug prints

* refactoring

* update BOM
2023-02-15 08:19:15 +01:00
Anastasiia Pnevskaia
347cd0e180 TF FE import model from memory (#15242)
* Added import model from memory for TF FE using string.

* Small correction.

* Clang format.

* Code correction.

* Implemented model importing to TF FE using temporary file.

* Removed wrong changes.

* Added check.

* Removed code duplication.

* Corrected logging of cli parameters.
2023-02-02 12:07:30 +04:00
Roman Kazantsev
f12ffc0428 [MO][TF FE] Switch MO to TF FE in default mode (#15100)
* [MO][TF FE] Switch MO to TF FE in default mode

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>

* Fix code-style

* Extend operations for the fallback

* Fix MO unit-tests

* Check only legacy FE for read-from-memory functionality

* Fix failures in IR comparator tests

* Fallback to the legacy FE in case tensorflow_custom_operations_config_update

* Revert copyright and update

* Fix unit-test since it is oriented for the legacy FE

* Fallback to the legacy FE in case deprecated config options

* Fix value propagation from deprecated config option

* Fix the Result node name in case cutting by input port for outputs

* Set Result node name aligned with the Legacy Frontend

* Reformat a list of operations to fallback

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-01-25 07:54:56 +04:00
Ilya Churaev
0c9abf43a9 Updated copyright headers (#15124)
* Updated copyright headers

* Revert "Fixed linker warnings in docs snippets on Windows (#15119)"

This reverts commit 372699ec49.
2023-01-16 11:02:17 +04:00
Anastasiia Pnevskaia
558714ccdd Support of passing model from memory to mo.convert_model() (#13457)
* convert() method added.

* Moved conversion to convert() method.

* Fixed commits.

* Output dir fix.

* Added objects support for extesions param.

* Added support for transformations_config extension objects.

* Input to str unit tests.

* Added tests, added comments.

* Updated BOM.

* Removed commented code.

* Fixed extension passing.

* Small corrections.

* Fixed for python 3.6.

* Small fix.

* Moved dir creating to ov.serialize(), removed mo.serialize(), small fixes.

* Small fix.

* Small correction.

* Removed coping of params, moved convert implemetation to separate module.

* Import fixes.

* Moved hiding of exceptions to main().

* Updated comment.

* Fixed unit tests.

* Comment changed.

* Fixed dir creating.

* Tests fixed.

* Small fixes.

* Test fix.

* Added meta data generation, removed printing of execution time for silent mode.

* Import fix.

* Conflict fix.

* Fixed error.

* Fix for custom config.

* Added version, data_type params to help.

* Added mo.convert() full-functional tests.

* Small corrections.

* Comment correction.

* Moved convert to openvino package, moved LayotMap and InputCutInfo to openvino.convert.

* Added help param.

* Wrong change removed.

* Small fix.

* Removed unnecessary comments.

* Removed .xml extension check from append_ir_info.

* Added missed file.

* Fixed error.

* Fix for bool value in InputCutInfo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved check and read_model to emit_ir.

* Small correction.

* Added comment.

* Added unit_tests with convert().

* Small corrections.

* Removed convert alias from openvino.

* Fixed conflicting unit tests.

* Removed unnecessary warnings.

* Params check fix.

* Small correction.

* Added paths checks.

* Added negative tests for to_str methods, fixed errors.

* Added tuples support in input parameter.

* Added direct support of BytesIO and TF1 graph def.

* Moved reminders to update OV and use API 2.0 to main().

* Fixed keras loading.

* Returned .mapping file generating.

* Added positional input_model param.

* Added test for unnamed input_model.

* Optimize imports.

* Added more informative error for brackets syntax in --input.

* Keras direct model support.

* Keras direct model support.

* Small fix.

* Conflict fix.

* Conflict fix.

* Added direct support of BytesIO and TF1 graph def.

* Fixed keras loading.

* Keras direct model support.

* Keras direct model support.

* Small fix.

* Tests for importing from memory.

* Support of other tf/pytorch formats.

* Updated mo_convert extensions tests to use ov models.

* Removed debug output.

* Implemented PyTorch converting logic.

* Small corrections.

* Small corrections.

* Added comments.

* Fixed for single input case.

* Added switching between save to file and BytesIO.

* Small fixes.

* Rename convert() to convert_model().

* Added env variable to disable converting to onnx.

* Tests refactoring.

* Add MO Python API tests to precommit.

* Add MO Python API tests to precommit.

* Added PyTorch to layer tests requirements.

* Added supported formats description.

* Fixed errors, added tests.

* Fixed bugs, added support of numpy and ov.Tensor sample_input.

* Added more torch.Size tests.

* Small correction.

* Renamed sample_input->example_inputs.

* Tests refactoring.

* Code style.

* Added support of dict in example_inputs.

* Small correction.

* Added removing of tmp onnx model in case of conversion error.

* Fix for lists of tensors in example_inputs.

* Support of dynamic axes for Keras layer, Keras module.

* Removed disabling of eager execution.

* Tests fixed.

* Added pytest requirement for layer tests.

* Added convert_model to openvino.runtime, fixed test runs.

* Small fix.

* Tests fix.

* Better help message.

* Error fixed.

* Renamed example_inputs->example_input.

* Small fix.

* Added support of list of layouts.

* Removed wrong change.

* Added tuple support for --layout.

* Removed convert_model from openvino.runtime.

* Use of default onnx opset version.

* Added support of dynamic input shapes without example_input.

* Made better error message.

* Removed stack trace from exceptions.

* Fixed tests.

* Small fix.

* Removed wrong change.

* Added import model from memory tests in unit tests.

* Replaced compare_functions() with MO IR reader compare.

* Removed test.

* Removed not needed change.

* Fixed conflicts.
2022-11-19 11:21:44 +03:00
Anastasia Popova
940844e71f mo.convert() method. (#11347)
* convert() method added.

* Moved conversion to convert() method.

* Fixed commits.

* Output dir fix.

* Added objects support for extesions param.

* Added support for transformations_config extension objects.

* Input to str unit tests.

* Added tests, added comments.

* Updated BOM.

* Removed commented code.

* Fixed extension passing.

* Small corrections.

* Fixed for python 3.6.

* Small fix.

* Moved dir creating to ov.serialize(), removed mo.serialize(), small fixes.

* Small fix.

* Small correction.

* Removed coping of params, moved convert implemetation to separate module.

* Import fixes.

* Moved hiding of exceptions to main().

* Updated comment.

* Fixed unit tests.

* Comment changed.

* Fixed dir creating.

* Tests fixed.

* Small fixes.

* Test fix.

* Added meta data generation, removed printing of execution time for silent mode.

* Import fix.

* Conflict fix.

* Fixed error.

* Fix for custom config.

* Added version, data_type params to help.

* Added mo.convert() full-functional tests.

* Small corrections.

* Comment correction.

* Moved convert to openvino package, moved LayotMap and InputCutInfo to openvino.convert.

* Added help param.

* Wrong change removed.

* Small fix.

* Removed unnecessary comments.

* Removed .xml extension check from append_ir_info.

* Added missed file.

* Fixed error.

* Fix for bool value in InputCutInfo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved InputCutInfo, LayoutMap to openvino.tools.mo.

* Moved check and read_model to emit_ir.

* Small correction.

* Added comment.

* Added unit_tests with convert().

* Small corrections.

* Removed convert alias from openvino.

* Fixed conflicting unit tests.

* Removed unnecessary warnings.

* Params check fix.

* Small correction.

* Added paths checks.

* Added negative tests for to_str methods, fixed errors.

* Added tuples support in input parameter.

* Moved reminders to update OV and use API 2.0 to main().

* Returned .mapping file generating.

* Added positional input_model param.

* Added test for unnamed input_model.

* Optimize imports.

* Added more informative error for brackets syntax in --input.

* Conflict fix.

* Conflict fix.
2022-09-23 17:29:00 +04:00