Files
openvino/src/bindings/python/setup.cfg
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

88 lines
3.2 KiB
INI

[tox:tox]
envlist = py3
[testenv]
skipdist=True
skip_install=True
deps =
-rrequirements.txt
-rrequirements_test.txt
-r /openvino/tools/mo/requirements.txt # for torchvision -> OV preprocess converter
-r /openvino/src/frontends/onnx/tests/requirements.txt
setenv =
OV_BACKEND = {env:OV_BACKEND:"CPU"}
PYTHONPATH = {env:PYTHONPATH}
OpenVINO_DIR = {env:OpenVINO_DIR}
passenv =
http_proxy
https_proxy
commands=
pytest tests -m "not template_extension" -v -k 'not _cuda' --ignore=tests/test_utils
pytest --backend={env:OV_BACKEND} tests_compatibility/test_ngraph -v -k 'not _cuda' --ignore=tests_compatibility/test_onnx/test_zoo_models.py
pytest --backend={env:OV_BACKEND} /openvino/src/frontends/onnx/tests -v --ignore=/openvino/src/frontends/onnx/tests/tests_python/test_zoo_models.py
[testenv:zoo_models]
commands=
pytest --backend={env:OV_BACKEND} /openvino/src/frontends/onnx/tests/tests_python/test_zoo_models.py -v -n 4 --forked -k 'not _cuda' --model_zoo_xfail
[testenv:devenv]
envdir = devenv
usedevelop = True
deps = -rrequirements.txt
[flake8]
# ignore:
# A001 variable "var_name" is shadowing a python builtin
# A002 argument "..." is shadowing a python builtin
# CCE001 ClassName.method1 should be after ClassName.method2
# D100 - Missing docstring in public module
# D101 - Missing docstring in public class
# D102 - Missing docstring in public method
# D103 - Missing docstring in public function
# D104 - Missing docstring in public package
# D105 - Missing docstring in magic method
# D107 - Missing docstring in __init__
# D412 - No blank lines allowed between a section header and its content
# F401 - module imported but unused
# N801 - class name '...' should use CapWords convention
# N803 - argument name '...' should be lowercase
# T001 - print found
# W503 - line break before binary operator (prefer line breaks before op, not after)
# RST301 - Unexpected indentation
# TAE002 - too complex annotation
# PT007 - wrong values type @pytest.mark.parametrize, expected list of tuples
# PT012 - pytest.raises() block should contain a single simple statement
# VNE001 - single letter variable names like 'X' are not allowed
# VNE003 - variable names that shadow builtins are not allowed
# F401 - module imported but unused
ignore=A001,A002,CCE001,D100,D101,D102,D103,D104,D105,D107,D412,E402,F401,N803,RST301,TAE002,T001,W503,PT007,PT012
inline-quotes = double
filename = *.py
max-line-length = 160
max-parameters-amount = 8
show_source = True
docstring-convention = google
enable-extensions = G
per-file-ignores =
src/openvino/runtime/*/ops.py: VNE001,VNE003
tests_compatibility/test_ngraph/*: C101,C812,C815,C816,C819,CCE001,D212,E800,ECE001,N400,N802,N806,P101,P103,PT001,PT005,PT006,PT011,PT019,PT023,RST201,S001,VNE002
src/compatibility/ngraph/*: C101,C812,C819,CCE001,E800,N806,P101,RST201,RST202,RST203,RST206,VNE001,VNE003
src/openvino/preprocess/torchvision/*: N801, VNE001
*__init__.py: F401
[pydocstyle]
convention = google
[mypy]
ignore_missing_imports = True
disable_error_code = attr-defined
show_column_numbers = True
show_error_context = True
show_absolute_path = True
pretty = True
follow_imports = normal
disallow_untyped_defs = True
disallow_untyped_calls = True
check_untyped_defs = True