Commit Graph

18 Commits

Author SHA1 Message Date
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