base
¶
Prompt-corpus datasets.
A :class:PromptDataset is an iterable of sample dicts describing the
prompts and conditions for a benchmark. Each sample is a plain dict —
no dataclass, no schema enforcement — that flows directly into both
generation (VideoGenerator.generate_video(**sample)) and scoring
(Evaluator.evaluate(**eval_kwargs)). The runner picks well-known
keys (prompt, n_samples, dimensions, auxiliary_info,
...) and passes the rest through.
This matches the surrounding FastVideo style:
- :class:
fastvideo.dataset.validation_dataset.ValidationDatasetyields dicts. - :meth:
fastvideo.VideoGenerator.generate_videoconsumes**kwargs. - :meth:
fastvideo.eval.Evaluator.evaluateconsumes**kwargs.
To add a new benchmark:
- Subclass :class:
PromptDataset, populateself._rowswith dicts in__init__. - Decorate with
@register_dataset("my_bench").
Convention for auxiliary_info: a flat dict of metric-keyed values
(e.g. {"color": "red"}). Benchmarks with nested aux schemas (VBench's
{dim: {key: val}}) flatten at load time so every consumer sees the
same shape.
Classes¶
fastvideo.eval.datasets.base.PromptDataset
¶
fastvideo.eval.datasets.base.Sample
¶
Bases: TypedDict
Documented schema for a row yielded by :class:PromptDataset.
Only prompt is required. Extra keys beyond these are forwarded to
the runner's eval-kwargs builder verbatim, so action-conditioned or
audio-bearing benchmarks can add their own fields without changing
the base class.