[BUG] Tasks and workflows with default pydantic
models cannot be launched from pyflyte
.
#6186
Closed
2 tasks done
Labels
bug
Something isn't working
Describe the bug
The
to_click_option
used in thepyflyte
CLI cannot convert apydantic.BaseModel
default value to aclick
compatible default. This causes an error when trying to run any task or workflow that takes apydantic.BaseModel
from CLI arguments.@dataclass
by comparison works fine.The problem is the same when running locally and remotely.
Expected behavior
I would expect the default
pydantic.BaseModel
s to work without error like defaults of other types.Thoughts on the solution
I can make
pydantic.BaseModel
work with a simple changeI guess we just need some logic here to so that both
@dataclass
andpydantic.BaseModel
can be serialised to JSON.Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: