Is it possible to pass a pydantic model as paramet...
# prefect-getting-started
n
Is it possible to pass a pydantic model as parameter to
run_deployment
? I have a setup similar to the following, but when I pass the pydantic model I get some weird behavior.
Copy code
class Config(BaseModel):
   ...

@flow(name="subflow")
def subflow(config: Config = Config()):
    do_something()

@flow
def main_flow(config: Config = Config()):
    run_deployment(name="subflow", parameters={"config": config})
j
It takes in a dictionary but you can convert pydantic model with
model.dict()
.
n
The subflow expects a pydantic model instead of a dict though, is that a problem?