Commit Graph

13 Commits

Author SHA1 Message Date
Przemyslaw Wysocki 62fa09a181
[PyOV] Add torchvision to OpenVINO preprocessing converter (#17934)
* Some progress

* refactoring

* Refactor tests, run black

* Refactor, flake

* Minor change

* Add support for num_output_channels

* WIP

* Add dependency

* Almost done

* Fix flake

* Add MO convert

* Minor changes

* Add interpolation mode tests

* Add requirements for preprocessing

* Fix linter

* Update tests

* Fix type error

* Introduce typing

* Rename module

* Code review

* Update src/bindings/python/src/openvino/preprocess/torchvision/torchvision_preprocessing.py

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

* Update src/bindings/python/src/openvino/preprocess/torchvision/preprocess_converter.py

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

* CR changes

* Fix mypy

* Minor change

* Minor change

* Fix flake

* typing change

* Update types

* Add tools to pythonpath

* Add MO reqs

* Minor change

* Fix PT FE issue

* bugfix

* Use absolute path

* Debug

* Debug req path

* Change MO to OVC

* Enable PT FE building

* Debug

* Skip some tests on ARM

* ADd ticket numbers

* Some progress

* refactoring

* Refactor tests, run black

* Refactor, flake

* Minor change

* Add support for num_output_channels

* WIP

* Add dependency

* Almost done

* Fix flake

* Add MO convert

* Minor changes

* Add interpolation mode tests

* Add requirements for preprocessing

* Fix linter

* Update tests

* Fix type error

* Introduce typing

* Rename module

* Code review

* Update src/bindings/python/src/openvino/preprocess/torchvision/torchvision_preprocessing.py

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

* Update src/bindings/python/src/openvino/preprocess/torchvision/preprocess_converter.py

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>

* CR changes

* Fix mypy

* Minor change

* Minor change

* Fix flake

* typing change

* Update types

* Add tools to pythonpath

* Add MO reqs

* Minor change

* Fix PT FE issue

* bugfix

* Use absolute path

* Debug

* Debug req path

* Change MO to OVC

* Enable PT FE building

* Debug

* Skip some tests on ARM

* ADd ticket numbers

* Update test val

* Change pytest version

* Modify GH workflow

* Update cmake

* Update cmake

* fix cmake

* Skip tests on ARM

* Fix after OVC MO changes

* Limit torch requirements

* Raise allowed diff in test

* Debug - remove new bindings

* Debug - remove interpolation modes

* Debug - change test

* Cleanup

* Minor change

* Disable on ARM and Py<38

* Update ARM marker

* limit torchvision for ARM

---------

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
Co-authored-by: gklodkox <gracjanx.klodkowski@intel.com>
Co-authored-by: Michal Lukaszewski <michal.lukaszewski@intel.com>
2023-08-02 16:44:30 +04:00
Anastasia Kuporosova 6dd88d76d3
[PyOV] try to run add_extension_test (#18900)
* [PyOV] try to run add_extension_test

* rename flag

* try to run extension test on linux

* run on linux
2023-08-02 11:14:03 +04:00
Przemyslaw Wysocki 4a6282a6f5
Move ONNX FE tests into ONNX FE directory (#18259) 2023-08-01 10:41:05 +02:00
Jan Iwaszkiewicz 583939b828
[PyOV] Aliases and namespace redesign (#18157)
* Remove inits, update main one

* Fix stacklevel

* Testing wrong solution

* Testing test test

* Fix test test test test

* mo modules mo problems

* Xfail test that check stdout/err?

* not so correct solution to circular imports

* Fix or not to fix

* CMake magic, co-authors: my best team

* Fix package imports

* Fix tools inits

* Fix ovc tf

* Fix Q000

* Fix F401

* Fix linters

* Add save_model

* Remove LayoutMap

* Move test_utils to 'internal modules'

* First testing

* Missing Type

* Expand main namespace

* Change some more tests

* Add OVAny to namespace

* Add Constant and Parameter to namespace

* More tests changes

* Fix inits

* Add layout_helpers to main namespace

* Revert CMake and linux.yml with ovc

* Update main inits

* Remove MO from tools inits

* changes to init files

* Fix tests

---------

Co-authored-by: Sergey Lyalin <sergey.lyalin@intel.com>
2023-07-28 11:52:21 +04:00
Anastasia Kuporosova b4852b3bdf
[PyOV] leave one setup.py (#17472)
* [PyOV] leave one setup.py

* remove setup from setup.cfg
2023-05-15 18:53:46 +04:00
Jan Iwaszkiewicz 5ae221e107
[PyOV] Fix mypy after bump, general refactor (#13913)
* Fix mypy errors after bump PEP482, reformat code in general

* Enable checks

* Fix smaller issues

* Revert typo with comments

* Fix indents
2022-11-08 19:26:39 +04:00
Przemyslaw Wysocki d5a274b0e4
[PyOV] Drop Python 3.6 support (#12280)
* Drop Python 3.6

* Test dropping Python to 3.6 in py_checks.yml

* Allow Python 3.6 for open source

* Add docs on upgrading Python
2022-09-22 11:58:12 +02:00
Jan Iwaszkiewicz ed39903028
[PyOV] Fix error handling for Debug builds and extend configs for CI (#12417) 2022-08-11 10:53:54 +02:00
almilosz d7cf585485
[PyOV] Test refactoring (#12248) 2022-07-27 08:44:10 +02:00
Bartek Szmelczynski 93839f8379
[PYTHON API] Check new config (#11402)
Improve code-style in Python API and reduce number of ignored hints.

Co-authored-by: Anastasia Kuporosova <anastasia.kuporosova@intel.com>
2022-06-13 10:21:04 +02:00
Anastasia Kuporosova 4c7050f6a9
[Python API] Improve configuration files (#10960)
* [Python API] Improve configuration files

* fix config files

* update setup.cfd + change quotes

* move all codestyle checks to py_checks job

* update requirements_test.txt

* fix  codestyle according to flake-docstring

* fix

* fix mypy

* apply comments
2022-03-30 20:26:36 +03:00
Ivan Tikhonov 29d73ce3c8
FrontEnd ConversionExtensions (#9070)
* Squash commit: implement Conversion extensions

* Refactor PaddlePaddle FrontEnd

* Codestyle

* FrontEnd,InputModel,Place base classes -> abstract, renamed model file

* Fix unit tests

* fix unit tests

* ngraph:: to ov::

* Rename frontends dir to frontend

* fix merge conflicts

* Fix ConversionExtension

* get rid of NamedInputs/Outputs in TF FE

* Rename paddlepaddle to paddle; pdpd to paddle

* add missing file

* codestyle

* Remove local change

* paddlepaddle -> paddle for azure configs and .md files

* fix package name, fix config files

* Fix win build

* Revert Broadcast/AutoBroadcast changes

* codestyle

* fix FronEnd class

* fix ngraph_cpp_api.config

* fix incorrect merge, codestyle

* fix conversion extension

* conversion extension

* codestyle

* merge master

* fix build

* refactoring; revert broadcast/autobroadcast changes

* codestyle

* fix MacOS config

* resolve merge conflicts

* refactor includes

* register ConversionExtension in FrontEnds

* move get_op_type to base NodeContex class

* set op_translator map in ctor of Paddle FE; fix unit tests

* update unit tests; codestyle

* codestyle

* preliminary version of conversion extension in pybind

* conversion extension

* get_attribute_as_any method for NodeContext

* move get_attribute methods to NodeContext base class, rename get_ng_input to get_input

* add missed file

* Implement ov::Any getter in ONNX NodeContext

* fix py bindings

* Add update ConversionExtension unit tests, add SO unit tests, fix TF FE

* fix segfault on destructor

* fix NodeContext interface, fix unit tests

* set different names for ConversionExtensions in unit tests

* fix PaddleFuzzy tests

* fix Paddle Fuzzy tests

* revert changes in generate_slice.py

* fix codestyle

* fix pybindings

* revert local changes in generate_slice.py

* delete duplicate exceptions.hpp

* Refactoring: fix names according to convention

* pybinding for NodeContext, FrontEnd, ConversionExtension; fix unit tests; implement new unit tests

* Refactoring

* fix the case when a new converter rewrites existed one; delete unnecessary NodeContext from pybindings; use CreatorFunctons from the base class in ConversionExtension; update unit tests

* Revert local change

* PythonAPI: fix get_attribute method; fix get_input method; implement support of dtype and default attributes

* Fix py unit tests: add support for vector<ov::element::Type> as attribute

* resolve review comments

* fix unit tests

* move extension_holder to openvino/frontend/extension folder

* fix build on mac os

* temporary disable cast from vector<bool> to investigate issue on mac os

* Resolve review comments

* Resolve review comments

* Use dev API for .so extension

* Link frontends to pyopenvino as separate targets

* Temporary enable tf fe installation

* ignore PEP8 E402 for init files, set correct directory for py modules

* revert local changes

* Fix deadlock in pybind GIL; fix Win build; fix PEP8

* fix PEP8

* Add a return type annotation

* fix builds; fix ON/OFF switcher for ENABLE_OV_xxx_FRONTEND cmake options

* Fix the issue with ifdefs on WinOS; fix the issue related to pybindings and static c++ object

* fix python unit tests

* fix static build on WinOS

* Retrigger CI builds

* Fix static build on Windows

* fix static build on Windows again

* Retrigger CI

* delete unused includes; add a comment about issue on MacOS

* fix missprint

* resolve review comments

* fix missprint

* resolve review remarks

* Resolve review comments

* win win wheels build

* resolve review comments
2022-01-20 20:44:31 +03:00
Anastasia Kuporosova ab09135195
[Python API] Move wheel folder to the python dir (#9125)
* [Python API] Move wheel folder to the python dir

* codestyle files

* one more codestyle

* align with master

* ignore some flake8 comments
2022-01-11 16:55:18 +03:00