fix evaluator unit test (#112)

This commit is contained in:
RangiLyu 2022-03-08 20:07:32 +08:00 committed by GitHub
parent 6f69039ca9
commit c499d72691
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: