File size: 819 Bytes
16273a7 2e00cda f2b3434 fb4afb9 16273a7 f2b3434 2e00cda 16273a7 f2b3434 370e1f5 fb4afb9 16273a7 d46b2e8 21d2506 d46b2e8 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
from typing import List, Optional, Union
from .artifact import Artifact
from .collections import Collection
from .dataclass import OptionalField
from .loaders import Loader
from .operator import StreamingOperator
from .splitters import RandomSampler, Sampler
from .task import FormTask
class TaskCard(Artifact):
loader: Loader
task: FormTask
preprocess_steps: List[StreamingOperator] = None
templates: Collection = None
instructions: Collection = None
sampler: Sampler = OptionalField(default_factory=RandomSampler)
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
|