jobflow icon indicating copy to clipboard operation
jobflow copied to clipboard

Improvement: Tutorial on output validation

Open JaGeo opened this issue 3 months ago • 1 comments

@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)

JaGeo avatar Oct 08 '25 14:10 JaGeo

Hi @JaGeo , I think that would be great!

utf avatar Oct 08 '25 15:10 utf