Commit Graph

341 Commits

Author SHA1 Message Date
Roman Kazantsev
79683c24ca [TF FE] Support models with v1 checkpoints (#18000)
* [TF FE] Support models with v1 checkpoints

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

* Fix build issue

* Fix issue in load_impl

* Fix MO unit-tests

* Check input_checkpoint in argv

* Fix build issue

* Update src/frontends/tensorflow/src/checkpoint_v1_reader.cpp

Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>

* Apply comments from code-review: split CheckpointV1Reader constructor

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
Co-authored-by: Maxim Vafin <maxim.vafin@intel.com>
2023-06-14 21:01:33 +00: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
dependabot[bot]
266764171f Update networkx requirement from <=2.8.8 to <3.1.0 in /tools/mo (#15293) 2023-06-01 14:11:05 +02:00
Ilya Churaev
ea04f8217d Mark as deprecated nGraph API (#17647)
* Mark as deprecated nGraph API

* Fixed code style

* Added IN_OV_LIBRARY define

* Suppress warnings for log

* Suppress warning

* Updated nGraph headers

* Fixed build for macOS

* Fixed lpt and snippets

* Fixed build all on macOS

* Suppress some warnings

* Fixed some new warnings

* Fixed new warnings

* Try to fix some warnings

* More warnings

* Soome change

* Suppress more warnings

* Suppress warnings for transformations

* Suppress warnings for LPT

* One more fix

* Suppress more warnings

* Try to fix opset error

* Remove opset constructor

* Cannot fix opset warning

* Suppress warnings for offline transfromations

* Fixed some warnings for Windows

* Fixed code style

* Suppress some warnings for onnx FE

* Revert "Suppress some warnings for onnx FE"

This reverts commit 75d23b64fc.

* Revert "Fixed code style"

This reverts commit c6eba63116.

* Revert "Fixed some warnings for Windows"

This reverts commit 23d7ed88b6.

* Revert "Suppress warnings for offline transfromations"

This reverts commit 0b9f6317bf.

* Revert "Cannot fix opset warning"

This reverts commit 19ea658639.

* Revert "Remove opset constructor"

This reverts commit 06afb1bc20.

* Revert "Suppress warnings for LPT"

This reverts commit 58b1c0f5a0.

* Revert "Suppress warnings for transformations"

This reverts commit f8bb9814a1.

* Revert "Suppress more warnings"

This reverts commit f9f0da9acb.

* Revert "Soome change"

This reverts commit e545d4984e.

* Remove deprecation for ngraph::OpSet and FactoryRegistry
2023-06-01 12:44:28 +04:00
Sebastian Golebiewski
6c287986b7 [DOCS] convert_model() as a default conversion path (#17454) 2023-05-31 17:53:22 +02:00
Pavel Esir
84f6deb757 [MO] disabling inserting redundant Converts for int in legacy IR serialization (#17572)
* disabling inserting redundant Converts for integer types for legacy IR serialization

* Revert "disabling inserting redundant Converts for integer types for legacy IR serialization"

This reverts commit ddd96e2034.

* more selective skip; added unit-tests

* corrected unit-tests

* fix unit-tests: replace dynamic Parameter input with Const

* fix unit-tests: implemented reading with IR frontend

* sort imports

* final revision of unit-tests

---------

Co-authored-by: Evgenya Stepyreva <evgenya.stepyreva@intel.com>
2023-05-30 11:51:56 +04:00
Maciej Smyk
13c966f293 [DOCS] Link adjustment (Snippets) for master (#17659)
* link fix

* diagram_workflow

Removal of not used diagram_workflow.svg images

---------

Co-authored-by: Karol Blaszczak <karol.blaszczak@intel.com>
2023-05-24 14:03:54 +04:00
Ilya Lavrenov
4c92ffa563 Build wheel arm64 packages using cross-compilation (#17635) 2023-05-23 00:31:35 +04: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
Pavel Esir
1b24e15e1e [MO] fix IR graph comparator (#17411)
* fix graph compare (legacy python MO)

* fix failing unit-tests

* fix failing unit-tests: check that shape is defined

* added explanation comment

* Apply suggestions from code review

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

* minor corrections

* add unit-tests

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-05-20 10:05:26 +04:00
Ilya Lavrenov
84db7d0ee6 Build using conanfile.txt (#17580)
* Build using conanfile.txt

* Update .ci/azure/linux_arm64.yml

* Several improvements

* Removed conanfile.py

* Try to use activate / deactivate

* Fixed clang-format code style

* Supported TBB version from Conan

* Added more NOMINMAX

* Fixed static build

* More improvements for static build

* Add usage of static snappy in case of static build

* More fixes

* Small fixes

* Final fixes
2023-05-19 14:01:39 +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
Roman Kazantsev
eb178a753b [TF FE] Handle incorrect models (empty, fake) by TF FE (#17408)
* [TF FE] Handle incorrect models (empty, fake) by TF FE

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

* Apply suggestions from code review

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-05-09 00:00:12 -07:00
Anastasiia Pnevskaia
fd9d501306 Removed checks of unsatisfied dependencies in MO (#16991)
* Fixed dependencies check, made unsatisfied dependencies show only in case of error.

* Small fix.

* Test correction.

* Small test correction.

* Temporarily added debug print.

* Debug output.

* Debug output.

* Debug output.

* Test fix.

* Removed debug output.

* Small fix.

* Moved tests to check_info_messages_test.py

* Remove dependies checks from MO.

* Small corrections.
2023-05-08 16:54:21 +04: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
Roman Kazantsev
7464b4d396 [MO][TF FE] Recover MOC TF FE unit-tests in the pre-commit (#17233)
* [MO][TF FE] Recover MOC TF FE unit-tests

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

* Fix python environment to get test_util

* Correct Python environment for MO UT tests

* Correct Python env for linux-debian

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-05-03 23:39:46 +00:00
Roman Kazantsev
35cae6251c [MO][TF FE] Handle constant with undefined value (#17311)
Since TF 2.10 the native model freezing can produce constants with undefined value,
i.e. tensor shape can be any and value is []. In this case the tensor just fills up with
the default value (0 - for numerics, "" - for strings)

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-05-02 14:02:36 +00:00
Ilya Lavrenov
2ae23dd1ad Fixed Python API build for Ubuntu 22.04 with python3.11 (#17297) (#17298)
* Fixed Python API build for Ubuntu 22.04 with python3.11

* Update ONNX CI docker to test python 3.11 and system pybind11
2023-04-29 04:34:10 +04:00
Anastasiia Pnevskaia
269ed1d9cc Fix of groupconv_to_conv() in MO IR reader (#17118)
* Fixed bug in groupconv_to_conv() method.

* Small correction.

* Test correction.
2023-04-28 11:25:29 +04: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
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
Anastasiia Pnevskaia
acd424bb5e Show message with suggestion to try legacy FE in case of conversion error (#17088)
* Moved exception checks to _convert(), added suggestion to try legacy TF in case of conversion fail.

* Added test.

* Added send_conversion_result() method.

* Small correction.

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

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

* Moved test_suggest_legacy_fe() test to check_info_messages_test.py.

* Removed not needed import.

* Small correction.

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-04-25 13:57:01 +00:00
Przemyslaw Wysocki
923b6f297c [PyOV] Move environment markers to requirements.txt files (#17113)
* WIP

* WIP

* Debug

* WIP

* Expand function to other setup.pies

* Revert mxnet

* Update docstring'

* restore defusedxml

* Update tools/mo/requirements.txt

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

* Code review

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-04-25 13:25:21 +00:00
Maxim Vafin
d423491bcb Fix Scatter value infer for fully dynamic value (#17165)
* Fix issue with dynamic Scatter in MO IR Reader

* Only normalize for 1D tensors

* Add test
2023-04-25 16:38:49 +04:00
Georgy Krivoruchko
3f07c8b48b [TF FE] Added MetaGraph file format (#16524)
* Separeted SavedModelVariablesIndex class from Saved Model

* Renamed SavedModelVariablesIndex class

* Enabled Tensorflow MetaGraph

* Enabled Tensorflow MetaGraph

* Covered VariableV2 and Assign nodes

* Applied review comments

* Added tests

* Added names to input/output ports too

* Fixed naming for using with MO

* Applied part of review comments

* Renamed meta.cpp and saved_model.cpp

* Applied shared_ptr for memory management of PtrNode

* Fixing CI

* Prevent cycles while passing thru graph

* Released requirement for Checkpointable Object Graph

* Changed naming approach to align port order

* Changed renaming order (before reordering)

* Added a Placeholder translator which checks updated shape

* WA missing Identity name

* Fix CI and restored lost translators after rebase

* WA for output names

* Removing unused params after cutting a model

* Prevents crash in case VariableV2 appears in freezed model

* Fixed saved model in case no variables.index found, but
variables exists

* Changed approach for handling native formats support

* Aligned behavior with freezing .meta files

* Fixed behavior for cutting a model by input tensor

* Applied review comments
2023-04-25 13:46:06 +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
Roman Kazantsev
3830125e3b [TF FE] Report the full list of unsupported operations (#17143) 2023-04-24 21:33:07 +00:00
Maxim Vafin
01065338ef Fix MO IR Reader extender for StridedSlice to support empty begin and end masks (#17019) 2023-04-24 13:08:28 +04:00
Anastasiia Pnevskaia
50a6c88ea3 Fix of crashes of convert_model() when executed for different frameworks (#16968)
* Fix of class conflicts in different frameworks.

* Remove commented code.

* Moved FakeQuantWithMinMaxVars to common part.

* Fixed BOM package test.

* Removed not needed code.

* Removed not needed code.
2023-04-21 19:29:38 +04:00
Maxim Vafin
552143c9cd [MO] Fix Interpolate-11 in MO (#17002)
* Fix Interpolate-11 in MO

* Add forgotten file

* Fix output type of TopK-11

* Do not force precision on port 1 for mode scales

* Update tools/mo/openvino/tools/mo/ops/interpolate.py

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-04-20 09:51:38 +02: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
Anastasia Kuporosova
9f250edc7f [PyOV] use generator is multi config (#17004)
* [PyOV]- use generator is multi config

* use ov

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-04-18 22:04:22 +00:00
Anastasiia Pnevskaia
078f28911b Fixed parsing of 'layout' param (#16999)
* Fixed layout parsing.

* Small correction.

* Removed wrong change.
2023-04-18 22:43:38 +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
Przemyslaw Wysocki
d72d833a96 [PyOV] Enable Python 3.11 (#15144)
* 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

* Relax python reqs, enable 311 in azure

* Fix setupvars error

* Ignore watchdog error

* 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

* Enable py311 on rest of jobs

* Try disabling pdpd req

* Exclude pdpd form cmake

* Update .ci/azure/linux.yml

Fixed unmerged merge-conflict

* CR

* Fix reqs

* Skip pdpd tests

* Disable pdpd tests building in cmake

* Skip another pdpd cmake

* Add file

* Add paddle constraint to tests

* Disable paddle reqs

* Debug prints

* Skip TF test if Python ver is 3.11

* Apply Mish cr comments

* Debug

* Debug

* Constrain tensorflow_addons

* Fix pdpd skipping

* Add debug prints

* Update skips

* Remove prints

* Minor change

* Update OMZ commit

* Fix some tests

* Minor change

* Disable pdpd at all

* Disable pdpd at all

---------

Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
2023-04-17 13:30:17 +04:00
Roman Kazantsev
18da874c57 [MO] Remove use of mapping file and its generation (#16944)
* [MO] Remove use of mapping file and its generation

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

* Fix pylinter findings

* Remove usage of mapping file in the layer tests

* Fixing layer tests for legacy frontend

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-04-15 10:38:33 +00:00
Roman Kazantsev
4ba0ac5476 [MO][TF FE] Support delayed batch setting (#16937)
* [TF FE] Support delayed batch setting

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

* Cover BOM list

* Add unit-tests for batch setting with layout

* Apply code-review: check batch size

* Apply code-review: default index for any dimension

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-04-14 22:35:43 +00: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
Maxim Vafin
c592ecd44e [MO] Fix legacy If (#16613)
* Fix legacy If

* Add test for If op

* Small fix
2023-04-13 18:10:40 +04:00
Anastasiia Pnevskaia
4921d1ad28 Fix for slowdown of convert_model() after multiple runs (#16751)
* Used singleton class for version check.

* Moved VersionChecker to utitl/version.py, added tests.

* Minor corrections.

* Sort imports.

* Small correction.

* Small correction.
2023-04-13 11:59:11 +04:00
Mateusz Tabaka
bdd79fe931 CompressQuantizeWeights - use f32 precision when computing scale and zero point (#16794)
Ticket: 101825
2023-04-12 12:42:39 +02:00
Maxim Vafin
23c90aecea Add support for opset10 and opset11 in MO IR Reader (#16742)
* Add support for opset10 and opset11 in MO IR Reader

* Fix unique

* Refactor tests

* Fix Unique shape infer

* Update tests

* Apply suggestions from code review

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

* Apply review feedback

* Fix BOM tests

* Update tools/mo/unit_tests/mo/utils/ir_reader/ops_test.py

* Improve error log

* Fix test fails when using pytest

* Add changes forgotten in last commit

* Fix error message

---------

Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-04-12 11:35:52 +04:00
Przemyslaw Wysocki
ea213f687a Fix regex (#16850) 2023-04-12 01:06:54 +04: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
Pavel Esir
6d064d26cb remove deprecated MO args (#16626)
Co-authored-by: Andrei Kochin <andrei.kochin@intel.com>
Co-authored-by: Roman Kazantsev <roman.kazantsev@intel.com>
2023-03-31 12:28:04 +04:00
Przemyslaw Wysocki
591c3e61c5 [PyOV] Simplify requirement files (#15343)
* Partial progress

* Finish v1

* Cleanup

* Remove useless files

* Fix path to pdpd

* Fix onnx path

* Minor change

* Rework MO

* Minor change

* Remove some costraints

* Add MO constraints

* Update gitignore for MO

* Minor change

* Apply tech sync discussion

* Cleanup

* CR comment

* Debug ONNX FE

* simplify ONNX FE

* Update cmake

* Hardcode ONNX requirement

* Add dependency resolver to cmake

* Add constraints for openvino/tests

* Add missing pytest-html

* Fix -c path

* Revert debug changes to path

* Add cmake to copy constraints.txt

* Update dependabot

* Remove slash

* Remove cmake

* Debug prints

* Minor changes

* Move reqs check to separate file

* Add requirements parser to benchmark_tool

* Fix smoke tests constraints

* Minor fixes

* Minor change

* My fixes were apparently wrong

* Debug - self.executable_path

* Debug - add singledispatch to tests and tools

* Debug - print IE_APP_PATHs

* Revert "Debug - print IE_APP_PATHs"

This reverts commit 67ccb6d3f5.

* Revert "Debug - add singledispatch to tests and tools"

This reverts commit 3b945931e2.

* Revert "Debug - self.executable_path"

This reverts commit 3aa724eff6.

* update dependabot

* update dependabot

* Skip benchmark_app tests

* Use CMAKE_CURRENT_BINARY_DIR in cmake

* Remove debug prints

* minor change

---------

Signed-off-by: p-wysocki <przemyslaw.wysocki@intel.com>
2023-03-29 14:27:27 +04:00
Roman Kazantsev
35e03d33bb [TF FE] Support frozen models in text protobuf format aka pbtxt (#16604)
* [TF FE] Support frozen models in Text Protobuf format aka pbtxt

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

* Fix gen_wrapper.py for pbtxt

* Fix is_supported method

* Fix gen_wrapper.py script

* Adopt test_text_frozen_format unit-test

* Update src/frontends/tensorflow/src/frontend.cpp

* Update src/frontends/tensorflow/src/frontend.cpp

---------

Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-03-29 11:58:08 +04:00
Roman Kazantsev
966c47e7cd [MO] Remove Python version check (#16612)
Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
2023-03-29 09:23:14 +04:00
Maxim Vafin
44f0419a0b Get mo version once (#16576) 2023-03-28 15:45:08 +00:00