stocky-apple-74569
11/24/2023, 3:12 PMflytekit==1.10.1
I can’t use a date as an input type from the command line anymore. For example take this workflow (in file workflows.example.py
) :
from datetime import date
from flytekit import task, workflow
@task
def is_in_future(in_date: date) -> bool:
return in_date > date.today()
@workflow
def check_date_wf(in_date: date) -> bool:
return is_in_future(in_date=in_date)
Trying to run it with pyflyte using this command:
pyflyte run workflows/example.py check_date_wf --in_date=2023-11-25
Results in this error:
╭─ Error ─────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Invalid value for '--in_date': Failed to convert param: <Option in_date>, value: 2023-11-25 00:00:00 to type: │
│ <class 'datetime.date'>. Reason Expected value of type <class 'datetime.date'> but got '2023-11-25 00:00:00' of │
│ type <class 'datetime.datetime'> │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
How can I supply a date
not a datetime
here?freezing-airport-6809
freezing-airport-6809
tall-lock-23197
tall-lock-23197