Files
hao-ai-lab-FastVideo/fastvideo/eval/types.py
T
shaoxiongduan 0b605d0a41 [cleanup] eval: drop legacy EvalRunner/EvalResult/WM_EVAL_CACHE refs
Several scaffolds that pre-date the runner refactor still pointed at
removed APIs:

* ``EvalResult`` (and its ``Evaluator.evaluate_dataset`` docstring)
  exposed a class that is never returned anywhere; drop it from the
  public API.
* ``Evaluator``'s module docstring still referenced the removed
  ``EvalRunner`` layer; trim to the current Evaluator → EvalWorker
  shape.
* ``WM_EVAL_CACHE`` survived as a fallback env var from the wm-eval
  port; remove and keep only ``FASTVIDEO_EVAL_CACHE``.
* The contributor docs documented ``batch_unit`` and
  ``trial_forward``/``Evaluator.calibrate()`` which were dropped from
  ``BaseMetric`` in earlier refactors; update to the current contract.
2026-05-07 06:15:10 +00:00

17 lines
431 B
Python

from __future__ import annotations
from dataclasses import dataclass, field
from typing import Any
@dataclass
class MetricResult:
"""Standard result container returned by all metrics.
``score`` is ``None`` when the metric was skipped (e.g. missing
required input). Check ``details["skipped"]`` for the reason.
"""
name: str
score: float | None
details: dict[str, Any] = field(default_factory=dict)