-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I just came across line 1264 in core/job.py where it states that:
# only apply output schema if there is no replace.
I was wondering why this design was chosen. Given a simple example:
from pydantic import BaseModel
from jobflow import job, run_locally, Response
class MySchema(BaseModel):
a: int
@job(output_schema=MySchema)
def job1():
return Response(3, replace=job2())
@job
def job2():
return {"a": 3}
run_locally(job1())I would feel that this should fail because the first job gives an invalid output back but it actually runs without problems. No Exception is raised.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels