diff --git a/mmeval/core/base_metric.py b/mmeval/core/base_metric.py index 0b53cd88..ce9b5fbc 100644 --- a/mmeval/core/base_metric.py +++ b/mmeval/core/base_metric.py @@ -126,8 +126,8 @@ def compute(self, size: Optional[int] = None) -> Dict: # NOTE: Needs discussion or investigation @yancong at 9/13/2022, 4:20:48 PM # noqa: E501 # If the intermediate results stored in ``self._results`` are not - # correspond one-to-one with samples (e.g. confusion matrix), the size - # here may not work anymore. + # correspond one-to-one with samples (e.g. a total confusion matrix), + # the size here may not work anymore. if size is not None: collected_results = collected_results[:size] @@ -145,8 +145,12 @@ def add(self, *args, **kwargs): """Override this method to add the intermediate results to ``self._results``. - For performance issue, what you add to the ``self._results`` should be - as simple as possible. + Note: + For performance issues, what you add to the ``self._results`` + should be as simple as possible. But be aware that the intermediate + result stored in ``self._results`` should correspond one-to-one + with the samples, in that we need to remove the padded samples for + the most accurate result. """ @abstractmethod