Skip to content

Improvement: Tutorial on output validation #808

@JaGeo

Description

@JaGeo

@utf, would you be interested in a small tutorial addition on how to validate outputs?
E.g., based on the following code?

from jobflow import job, run_locally
from pydantic import BaseModel, Field
class FloatValidator(BaseModel):
    result: float = Field("a float")
@job(output_schema=FloatValidator)
def add(a, b):
    return FloatValidator(result=a + b)
job1 = add(1, 2)
run_locally(job1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions