Alix Cook
08/26/2022, 2:33 PMname
, and it looks like prefect is passing the parameters spec as the parameter, so
{
"type": "object",
"title": "Parameters",
"properties": {
"name": {
"title": "name",
"default": "world"
}
}
}
is getting passed to my flow, then my flow fails with
prefect.exceptions.SignatureMismatchError: Function expects parameters ['name'] but was provided with parameters ['type', 'title', 'properties']
not really sure what im doing wrong here...Bianca Hoch
08/26/2022, 2:55 PMBianca Hoch
08/26/2022, 2:56 PMfrom prefect import flow, task
from subflow import my_subflow
@task(name="Print Hello")
def print_hello(name):
msg = f"Hello {name}!"
print(msg)
return msg
@flow(name="Hello Flow")
def hello_world(name="world"):
message = print_hello(name)
my_subflow(message)
hello_world("Marvin")
Bianca Hoch
08/26/2022, 2:56 PMBianca Hoch
08/26/2022, 2:57 PMZanie
Alix Cook
08/26/2022, 4:01 PMAlix Cook
08/26/2022, 4:02 PM{
"flow_name": "hello-world",
"import_path": "/path/to/flows/default.py:hello_world",
"parameter_openapi_schema": {
"title": "Parameters",
"type": "object",
"properties": {
"name": {
"title": "name",
"default": "world"
}
},
"required": null,
"definitions": null
}
}
Alix Cook
08/26/2022, 4:04 PMAlix Cook
08/26/2022, 4:12 PMZanie