---
title: registry
---

<div class="python-reference">
<a id="fastvideo.eval.datasets.registry-functions"></a>
<a id="fastvideo.eval.datasets.registry"></a>
<p>Registry for prompt-corpus datasets, mirroring :mod:<code>fastvideo.eval.registry</code>.</p>
<h2 id="fastvideo.eval.datasets.registry.register_dataset"><code>fastvideo.eval.datasets.registry.register_dataset</code></h2>
<pre class="doc-signature"><code>register_dataset(name: str)</code></pre>
<p>Decorator to register a prompt-dataset class.</p>
<p>Usage::</p>
<pre><code>@register_dataset("vbench")
class VBenchPromptDataset(BasePromptDataset):
    ...
</code></pre>
<details><summary>Source</summary><pre><code>def register_dataset(name: str):
    &quot;&quot;&quot;Decorator to register a prompt-dataset class.

    Usage::

        @register_dataset(&quot;vbench&quot;)
        class VBenchPromptDataset(BasePromptDataset):
            ...
    &quot;&quot;&quot;

    def wrapper(cls):
        cls.name = name
        _REGISTRY&#91;name&#93; = cls
        return cls

    return wrapper</code></pre></details>
<h2 id="fastvideo.eval.datasets.registry.get_dataset"><code>fastvideo.eval.datasets.registry.get_dataset</code></h2>
<pre class="doc-signature"><code>get_dataset(name: str, **kwargs: Any) -&gt; BasePromptDataset</code></pre>
<p>Instantiate a registered dataset by name.</p>
<details><summary>Source</summary><pre><code>def get_dataset(name: str, **kwargs: Any) -&gt; BasePromptDataset:
    &quot;&quot;&quot;Instantiate a registered dataset by name.&quot;&quot;&quot;
    cls = _REGISTRY.get(name)
    if cls is None:
        available = &quot;, &quot;.join(sorted(_REGISTRY.keys()))
        raise KeyError(f&quot;Unknown dataset &#x27;&#123;name&#125;&#x27;. Available: &#123;available&#125;&quot;)
    return cls(**kwargs)</code></pre></details>
<h2 id="fastvideo.eval.datasets.registry.list_datasets"><code>fastvideo.eval.datasets.registry.list_datasets</code></h2>
<pre class="doc-signature"><code>list_datasets() -&gt; list&#91;str&#93;</code></pre>
<p>Return sorted list of all registered dataset names.</p>
<details><summary>Source</summary><pre><code>def list_datasets() -&gt; list&#91;str&#93;:
    &quot;&quot;&quot;Return sorted list of all registered dataset names.&quot;&quot;&quot;
    return sorted(_REGISTRY.keys())</code></pre></details>
</div>
