Download card.py from unitxt/data: direct link, hf CLI and curl.
- Browser
- Download file 940 Bytes
-
https://huggingface.co/datasets/unitxt/data/resolve/175f6e2aa0fa60b211efee6eec0f334080d771ae/card.py
- Command line
-
hf download hf://datasets/unitxt/data@175f6e2aa0fa60b211efee6eec0f334080d771ae/card.py
-
curl -L -o card.py https://huggingface.co/datasets/unitxt/data/resolve/175f6e2aa0fa60b211efee6eec0f334080d771ae/card.py
940 Bytes
| from dataclasses import dataclass | |
| from typing import Dict, List, Optional, Union | |
| from .artifact import Artifact | |
| from .collections import Collection | |
| from .instructions import InstructionsDict, InstructionsList | |
| from .loaders import Loader | |
| from .normalizers import NormalizeListFields | |
| from .operator import StreamingOperator | |
| from .operators import AddFields, MapInstanceValues | |
| from .task import FormTask | |
| from .templates import TemplatesDict, TemplatesList | |
| class TaskCard(Artifact): | |
| loader: Loader | |
| task: FormTask | |
| preprocess_steps: Optional[List[Union[StreamingOperator, str]]] = None | |
| templates: Collection = None | |
| instructions: Collection = None | |
| class ICLCard(Artifact): | |
| demos_pool_name: str = "demos_pool" | |
| demos_pool_size: int = None | |
| demos_field: str = "demos" | |
| num_demos: int = None | |
| sampler_type: str = "random" | |
| instruction_item: Union[str, int] = None | |
| template_item: Union[str, int] = None | |