Skip to content

Commit

Permalink
updated expected types
Browse files Browse the repository at this point in the history
  • Loading branch information
saltykox committed Mar 22, 2022
1 parent 3e33ba6 commit 4f55cae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 4f55cae

Please sign in to comment.