From 4f55caea6879569d999edffd3bf87ced5db0f0ce Mon Sep 17 00:00:00 2001 From: saltykox Date: Tue, 22 Mar 2022 15:11:00 +0300 Subject: [PATCH] updated expected types --- .../mmdetection/detection_tasks/apis/detection/openvino_task.py | 2 +- .../detection_tasks/extension/datasets/data_utils.py | 2 +- .../mmdetection/detection_tasks/extension/datasets/mmdataset.py | 2 +- external/mmdetection/detection_tasks/extension/utils/hooks.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/external/mmdetection/detection_tasks/apis/detection/openvino_task.py b/external/mmdetection/detection_tasks/apis/detection/openvino_task.py index 9ec75118924..c9c1dcd8f22 100644 --- a/external/mmdetection/detection_tasks/apis/detection/openvino_task.py +++ b/external/mmdetection/detection_tasks/apis/detection/openvino_task.py @@ -135,7 +135,7 @@ def __init__( hparams: OTEDetectionConfig, label_schema: LabelSchemaEntity, model_file: Union[str, bytes], - weight_file: Union[str, bytes, None] = None, + weight_file: Optional[str, bytes] = None, device: str = "CPU", num_requests: int = 1, ): diff --git a/external/mmdetection/detection_tasks/extension/datasets/data_utils.py b/external/mmdetection/detection_tasks/extension/datasets/data_utils.py index e4a6ebefbd5..be1ee03b8e9 100644 --- a/external/mmdetection/detection_tasks/extension/datasets/data_utils.py +++ b/external/mmdetection/detection_tasks/extension/datasets/data_utils.py @@ -407,7 +407,7 @@ def get_anchor_boxes(wh_stats: List[tuple], group_as: List[int]): @check_input_parameters_type() -def format_list_to_str(value_lists): +def format_list_to_str(value_lists: list): """ Decrease floating point digits in logs """ str_value = '' for value_list in value_lists: diff --git a/external/mmdetection/detection_tasks/extension/datasets/mmdataset.py b/external/mmdetection/detection_tasks/extension/datasets/mmdataset.py index 9f9ca5c8717..65f1702221b 100644 --- a/external/mmdetection/detection_tasks/extension/datasets/mmdataset.py +++ b/external/mmdetection/detection_tasks/extension/datasets/mmdataset.py @@ -217,7 +217,7 @@ def pre_pipeline(results: Dict[str, Any]): results['seg_fields'] = [] @check_input_parameters_type() - def get_ann_info(self, idx): + def get_ann_info(self, idx: int): """ This method is used for evaluation of predictions. The CustomDataset class implements a method CustomDataset.evaluate, which uses the class method get_ann_info to retrieve annotations. diff --git a/external/mmdetection/detection_tasks/extension/utils/hooks.py b/external/mmdetection/detection_tasks/extension/utils/hooks.py index 7062206dabc..f3674dfb5e1 100644 --- a/external/mmdetection/detection_tasks/extension/utils/hooks.py +++ b/external/mmdetection/detection_tasks/extension/utils/hooks.py @@ -166,7 +166,7 @@ def before_epoch(self, runner: BaseRunner): self.time_monitor.on_epoch_begin(runner.epoch) @check_input_parameters_type() - def after_epoch(self, runner): + def after_epoch(self, runner: BaseRunner): self.time_monitor.on_epoch_end(runner.epoch, runner.log_buffer.output) @check_input_parameters_type()