INNER CODE UNIT · Python

add_sample

openfoodfacts/openfoodfacts-ai · llm-evals/main.py:72

def add_sample(
    task: Annotated[
        TaskType,
        typer.Argument(..., help="The dataset task we should add the sample to."),
    ],
    inputs: Annotated[
        str,
        typer.Argument(
            ...,
            help="The input to the sampler fetcher function. "
            "It is usally an ID, but it's project dependent.",
        ),
    ],
):
    """Add a sample to an existing dataset."""
    from llm_evals.evaluate import TASK_CONFIG_MAPPING

    task_config = TASK_CONFIG_MAPPING[task]

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…