I'm just getting to adding a schedule to my first ...
# flyte-support
f
I'm just getting to adding a schedule to my first Flyte workflow and I have a few questions. My workflow takes two arguments, a datetime and an int.
Copy code
@workflow
def cohort_ltv_inference(inference_date: datetime, n_days_horizon: int) -> bool:
    ...
I had created a schedule in my launch plan but failed to provide
kickoff_time_input_arg
or
default_inputs
.
Copy code
launch_plan = LaunchPlan.get_or_create(
    name="pir_cohort_ltv_inference",
    workflow=cohort_ltv_inference,
    schedule=CronSchedule(
        schedule="45 17 * * *",  # At 17:45 daily.
    ),
)
In the workflow web ui, I see the schedule displayed:
Copy code
Schedules
At 05:45 PM
But when I noticed that no scheduled run was actually happening, I looked through the scheduler logs and saw messages like this:
Copy code
rpc error: code = InvalidArgument desc = expected_inputs inference_date missing
Ideally the end user would be alerted about this earlier. I saw a related issue on github here, and a PR here. I haven't worked in Go, but I think the function
validateLaunchSpec
doesn't handle the case of no
default_inputs
and no
fixed_inputs
passed to the launch plan
get_or_create
. In general I'm missing some of the familiar scheduler UI I am used to from my experience with Airflow. I know these are very different projects, but for almost all my use cases, I'll eventually be running the ML pipeline on a schedule.
My other question is about the timezone of the cron expression. From other threads, I think this is in UTC. But when I look at the scheduler logs, I see the first error had a timestamp
2022-11-01T17:45:25-07:00
. So it seems like it is interpreting "17:45" as "America/Pacific" rather than "UTC".
t
cc: @icy-agent-73298
i
Thanks @fancy-yak-23698 for reporting these . Fixed them here https://github.com/flyteorg/flytectl/pull/368 https://github.com/flyteorg/flyteadmin/pull/494
🎉 4
Regarding UX, would be great if you can help writing up an issue describing what can be improved.
f
Wow @icy-agent-73298! You fixed the issues before I even had time to get back to this slack thread! I'll chat with with some of my colleagues as we are all making the shift from Airflow to Flyte for ML workflows. And I'll create a Jira issue.
👍 1
163 Views