File size: 940 Bytes
0e7d394 c08d258 935d4eb 2a0fd88 c08d258 935d4eb 0e7d394 c08d258 0e7d394 935d4eb c08d258 935d4eb 0e7d394 2a0fd88 65349c8 0e7d394 65349c8 |
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 30 31 |
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
|