Skip to content

Commit f7f1870

Browse files
committed
Fix trigger checks
1 parent e7df86d commit f7f1870

File tree

7 files changed

+7
-10
lines changed

7 files changed

+7
-10
lines changed

demos/common/python/model_zoo/model_api/pipelines/async_pipeline.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def get_user_config(flags_d: str, flags_nstreams: str, flags_nthreads: int)-> Di
8383
# multi-device execution with the CPU + GPU performs best with GPU throttling hint,
8484
# which releases another CPU thread (that is otherwise used by the GPU driver for active polling)
8585
config['GPU_PLUGIN_THROTTLE'] = '1'
86-
8786
return config
8887

8988

tools/accuracy_checker/accuracy_checker/annotation_converters/convert.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ def save_annotation(annotation, meta, annotation_file, meta_file, dataset_config
328328
annotation_dir = annotation_file.parent
329329
if not annotation_dir.exists():
330330
annotation_dir.mkdir(parents=True)
331-
with AtomicWriteFileHandle(annotation_file,'wb') as file:
331+
with AtomicWriteFileHandle(annotation_file, 'wb') as file:
332332
if conversion_meta:
333333
pickle.dump(conversion_meta, file)
334334
for representation in annotation:

tools/accuracy_checker/accuracy_checker/config/config_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ def _separate_modules_evaluations(modules_config):
472472
@staticmethod
473473
def _previous_configuration_parameters_sharing(config, mode='models'):
474474
def _share_params_models(models_config):
475-
shared_params = {parameter: None for parameter in CONFIG_SHARED_PARAMETERS}
475+
shared_params = dict.fromkeys(CONFIG_SHARED_PARAMETERS, None)
476476
for model in models_config['models']:
477477
launchers = model['launchers']
478478
if not launchers:
@@ -485,7 +485,7 @@ def _share_params_models(models_config):
485485
shared_params[parameter] = launcher[parameter]
486486

487487
def _share_params_modules(modules_config):
488-
shared_params = {parameter: None for parameter in CONFIG_SHARED_PARAMETERS}
488+
shared_params = dict.fromkeys(CONFIG_SHARED_PARAMETERS, None)
489489
for evaluation in modules_config['evaluations']:
490490
if 'module_config' not in evaluation:
491491
continue

tools/accuracy_checker/accuracy_checker/data_readers/data_reader.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
BaseField, StringField, ConfigValidator, ConfigError, DictField, BoolField, PathField
3030
)
3131

32-
REQUIRES_ANNOTATIONS = ['annotation_features_extractor' ,'disk_features_extractor' ]
32+
REQUIRES_ANNOTATIONS = ['annotation_features_extractor', 'disk_features_extractor' ]
3333
DOES_NOT_REQUIRED_DATA_SOURCE = REQUIRES_ANNOTATIONS + ['ncf_reader']
3434
DATA_SOURCE_IS_FILE = ['opencv_capture']
3535

@@ -325,7 +325,7 @@ def read_item(self, data_id):
325325
meta = {
326326
'input_is_dict_type' : self.config.get('input_is_dict_type', False),
327327
'output_is_dict_type' : self.config.get('output_is_dict_type', False),
328-
}
328+
}
329329
data_rep = DataRepresentation(
330330
self.read_dispatcher(data_id),
331331
meta = meta,

tools/accuracy_checker/accuracy_checker/launcher/pytorch_launcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self, config_entry: dict, *args, **kwargs):
8787
backend = self.compile_kwargs.get('backend', None)
8888
if self.use_torch_compile and backend == 'openvino':
8989
try:
90-
import openvino.torch # pylint: disable=C0415, W0611
90+
importlib.import_module('openvino.torch') # pylint: disable=C0415, W0611
9191
except ImportError as import_error:
9292
raise ValueError("torch.compile is supported from OpenVINO 2023.1\n{}".format(
9393
import_error.msg)) from import_error
@@ -153,7 +153,7 @@ def load_module(self, model_cls, module_args, module_kwargs, checkpoint=None, st
153153

154154
if checkpoint:
155155
if isinstance(checkpoint, str) and re.match(CHECKPOINT_URL_REGEX, checkpoint):
156-
checkpoint = urllib.request.urlretrieve(checkpoint)[0]
156+
checkpoint = urllib.request.urlretrieve(checkpoint)[0] # nosec B310 # disable urllib-urlopen check
157157
checkpoint = self._torch.load(
158158
checkpoint, map_location=None if self.cuda else self._torch.device('cpu')
159159
)

tools/accuracy_checker/accuracy_checker/launcher/pytorch_launcher_readme.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ launchers:
5454

5555
adapter: classification
5656
```
57-

tools/accuracy_checker/tests/test_preprocessor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import cv2
1919
import numpy as np
2020
import pytest
21-
import warnings
2221
from accuracy_checker.config import ConfigError
2322
from accuracy_checker.preprocessor import (
2423
Crop,

0 commit comments

Comments
 (0)