Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix trigger checks #3982

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/accuracy_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ jobs:
run: |
python -m pip install pylint==2.10.2
PYTHONPATH=. python -m pylint --rcfile=.pylintrc `find -wholename '?*/**/*.py' -not -path "./tests/*" -not -path "./build/*"`

check-basics:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with: {python-version: 3.12}
- run: python -m pip install -r ./ci/requirements-check-basics.in -r ./ci/requirements-documentation.in
- run: python ./ci/check-basics.py
- run: python ./ci/prepare-documentation.py ./prepared-documentation
2 changes: 1 addition & 1 deletion .github/workflows/cpp_gapi-demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
rm -rf cache/opencv/.git/ # Minimize cache
mkdir cache/opencv/build
cd cache/opencv/build
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INF_ENGINE=y -DOpenVINO_DIR=$GITHUB_WORKSPACE/ov/runtime/cmake/ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_C_LINKER_LAUNCHER=ccache -DBUILD_TESTS=y -DVIDEOIO_ENABLE_PLUGINS=y -DBUILD_PERF_TESTS=n -DBUILD_EXAMPLES=n -DBUILD_opencv_apps=y -DWITH_OPENCL=n -DWITH_OPENCLAMDBLAS=n -DWITH_GSTREAMER=n -DWITH_V4L=ON -DWITH_LIBV4L=ON -DWITH_OPENCLAMDFFT=n -DWITH_VA=n -DWITH_VA_INTEL=n -DWITH_PROTOBUF=n -DBUILD_PROTOBUF=n -DBUILD_JAVA=n -DBUILD_opencv_java_bindings_generator=n -DBUILD_opencv_python2=n -DBUILD_opencv_python3=n -DWITH_IMGCODEC_HDR=y -DWITH_IMGCODEC_SUNRASTER=y -DWITH_IMGCODEC_PXM=y -DWITH_IMGCODEC_PFM=y -DWITH_PNG=y -DWITH_TIFF=n -DWITH_WEBP=n -DWITH_OPENJPEG=n -DWITH_JASPER=n -DWITH_OPENEXR=n -DBUILD_opencv_dnn=n -DBUILD_opencv_features2d=n -DBUILD_opencv_flann=n -DWITH_TBB=n -DBUILD_INFO_SKIP_EXTRA_MODULES=n -DBUILD_JASPER=n -DBUILD_PNG=n -DBUILD_OPENEXR=n -DBUILD_WEBP=n -DBUILD_ZLIB=n -DWITH_CUDA=n -DWITH_EIGEN=n -DWITH_GPHOTO2=n -DOPENCV_GAPI_GSTREAMER=n -DWITH_LAPACK=n -DWITH_MATLAB=n -DWITH_MFX=n -DWITH_QUIRC=n -DWITH_VTK=n -DINSTALL_PDB=n -DINSTALL_TESTS=n -DINSTALL_C_EXAMPLES=n -DINSTALL_PYTHON_EXAMPLES=n -DOPENCV_GENERATE_SETUPVARS=n -DWITH_1394=n -DWITH_FFMPEG=y -DWITH_GTK_2_X=y -DBUILD_JPEG=y -DWITH_IPP=y -DENABLE_CONFIG_VERIFICATION=y -DBUILD_LIST=core,gapi,highgui,imgcodecs,imgproc,videoio,video ..
cmake -DCMAKE_BUILD_TYPE=Release -DWITH_INF_ENGINE=y -DOpenVINO_DIR=$GITHUB_WORKSPACE/ov/runtime/cmake/ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_LINKER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_C_LINKER_LAUNCHER=ccache -DBUILD_TESTS=y -DVIDEOIO_ENABLE_PLUGINS=y -DBUILD_PERF_TESTS=n -DBUILD_EXAMPLES=n -DBUILD_opencv_apps=y -DWITH_AVIF=n -DWITH_OPENCL=n -DWITH_OPENCLAMDBLAS=n -DWITH_GSTREAMER=n -DWITH_V4L=ON -DWITH_LIBV4L=ON -DWITH_OPENCLAMDFFT=n -DWITH_VA=n -DWITH_VA_INTEL=n -DWITH_PROTOBUF=n -DBUILD_PROTOBUF=n -DBUILD_JAVA=n -DBUILD_opencv_java_bindings_generator=n -DBUILD_opencv_python2=n -DBUILD_opencv_python3=n -DWITH_IMGCODEC_HDR=y -DWITH_IMGCODEC_SUNRASTER=y -DWITH_IMGCODEC_PXM=y -DWITH_IMGCODEC_PFM=y -DWITH_PNG=y -DWITH_TIFF=n -DWITH_WEBP=n -DWITH_OPENJPEG=n -DWITH_JASPER=n -DWITH_OPENEXR=n -DBUILD_opencv_dnn=n -DBUILD_opencv_features2d=n -DBUILD_opencv_flann=n -DWITH_TBB=n -DBUILD_INFO_SKIP_EXTRA_MODULES=n -DBUILD_JASPER=n -DBUILD_PNG=n -DBUILD_OPENEXR=n -DBUILD_WEBP=n -DBUILD_ZLIB=n -DWITH_CUDA=n -DWITH_EIGEN=n -DWITH_GPHOTO2=n -DOPENCV_GAPI_GSTREAMER=n -DWITH_LAPACK=n -DWITH_MATLAB=n -DWITH_MFX=n -DWITH_QUIRC=n -DWITH_VTK=n -DINSTALL_PDB=n -DINSTALL_TESTS=n -DINSTALL_C_EXAMPLES=n -DINSTALL_PYTHON_EXAMPLES=n -DOPENCV_GENERATE_SETUPVARS=n -DWITH_1394=n -DWITH_FFMPEG=y -DWITH_GTK_2_X=y -DBUILD_JPEG=y -DWITH_IPP=y -DENABLE_CONFIG_VERIFICATION=y -DBUILD_LIST=core,gapi,highgui,imgcodecs,imgproc,videoio,video ..
cmake --build . -j $((`nproc`*2+2))
- name: build_demos.sh
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ def get_user_config(flags_d: str, flags_nstreams: str, flags_nthreads: int)-> Di
# multi-device execution with the CPU + GPU performs best with GPU throttling hint,
# which releases another CPU thread (that is otherwise used by the GPU driver for active polling)
config['GPU_PLUGIN_THROTTLE'] = '1'

return config


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ def save_annotation(annotation, meta, annotation_file, meta_file, dataset_config
annotation_dir = annotation_file.parent
if not annotation_dir.exists():
annotation_dir.mkdir(parents=True)
with AtomicWriteFileHandle(annotation_file,'wb') as file:
with AtomicWriteFileHandle(annotation_file, 'wb') as file:
if conversion_meta:
pickle.dump(conversion_meta, file)
for representation in annotation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def _separate_modules_evaluations(modules_config):
@staticmethod
def _previous_configuration_parameters_sharing(config, mode='models'):
def _share_params_models(models_config):
shared_params = {parameter: None for parameter in CONFIG_SHARED_PARAMETERS}
shared_params = dict.fromkeys(CONFIG_SHARED_PARAMETERS, None)
for model in models_config['models']:
launchers = model['launchers']
if not launchers:
Expand All @@ -485,7 +485,7 @@ def _share_params_models(models_config):
shared_params[parameter] = launcher[parameter]

def _share_params_modules(modules_config):
shared_params = {parameter: None for parameter in CONFIG_SHARED_PARAMETERS}
shared_params = dict.fromkeys(CONFIG_SHARED_PARAMETERS, None)
for evaluation in modules_config['evaluations']:
if 'module_config' not in evaluation:
continue
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
BaseField, StringField, ConfigValidator, ConfigError, DictField, BoolField, PathField
)

REQUIRES_ANNOTATIONS = ['annotation_features_extractor' ,'disk_features_extractor' ]
REQUIRES_ANNOTATIONS = ['annotation_features_extractor', 'disk_features_extractor' ]
DOES_NOT_REQUIRED_DATA_SOURCE = REQUIRES_ANNOTATIONS + ['ncf_reader']
DATA_SOURCE_IS_FILE = ['opencv_capture']

Expand Down Expand Up @@ -325,7 +325,7 @@ def read_item(self, data_id):
meta = {
'input_is_dict_type' : self.config.get('input_is_dict_type', False),
'output_is_dict_type' : self.config.get('output_is_dict_type', False),
}
}
data_rep = DataRepresentation(
self.read_dispatcher(data_id),
meta = meta,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __init__(self, config_entry: dict, *args, **kwargs):
backend = self.compile_kwargs.get('backend', None)
if self.use_torch_compile and backend == 'openvino':
try:
import openvino.torch # pylint: disable=C0415, W0611
importlib.import_module('openvino.torch') # pylint: disable=C0415, W0611
except ImportError as import_error:
raise ValueError("torch.compile is supported from OpenVINO 2023.1\n{}".format(
import_error.msg)) from import_error
Expand Down Expand Up @@ -153,7 +153,7 @@ def load_module(self, model_cls, module_args, module_kwargs, checkpoint=None, st

if checkpoint:
if isinstance(checkpoint, str) and re.match(CHECKPOINT_URL_REGEX, checkpoint):
checkpoint = urllib.request.urlretrieve(checkpoint)[0]
checkpoint = urllib.request.urlretrieve(checkpoint)[0] # nosec B310 # disable urllib-urlopen check
checkpoint = self._torch.load(
checkpoint, map_location=None if self.cuda else self._torch.device('cpu')
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ launchers:

adapter: classification
```

1 change: 0 additions & 1 deletion tools/accuracy_checker/tests/test_preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import cv2
import numpy as np
import pytest
import warnings
from accuracy_checker.config import ConfigError
from accuracy_checker.preprocessor import (
Crop,
Expand Down
Loading