From c499d726911e37b48f3b20955dbf058e2e7fa2f4 Mon Sep 17 00:00:00 2001 From: RangiLyu <lyuchqi@gmail.com> Date: Tue, 8 Mar 2022 20:07:32 +0800 Subject: [PATCH] fix evaluator unit test (#112) --- tests/test_evaluator/test_base_evaluator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_evaluator/test_base_evaluator.py b/tests/test_evaluator/test_base_evaluator.py index dd430fc5..c880e26e 100644 --- a/tests/test_evaluator/test_base_evaluator.py +++ b/tests/test_evaluator/test_base_evaluator.py @@ -1,6 +1,6 @@ # Copyright (c) OpenMMLab. All rights reserved. import math -from typing import Dict, List, Optional +from typing import Any, Dict, List, Optional, Sequence, Tuple from unittest import TestCase import numpy as np @@ -66,7 +66,8 @@ class UnprefixedEvaluator(BaseEvaluator): """Evaluator with unassigned `default_prefix` to test the warning information.""" - def process(self, data_samples: dict, predictions: dict) -> None: + def process(self, data_batch: Sequence[Tuple[Any, BaseDataSample]], + predictions: Sequence[BaseDataSample]) -> None: pass def compute_metrics(self, results: list) -> dict: -- GitLab