Closed dansola closed 2 days ago
Flyte currently does not support the datetime.date
object for passing to or from tasks. According to this GitHub issue, the Flyte team is aware of the limitation and has discussed adding a type transformer to support datetime.date
. As a workaround, you can use datetime.datetime
or convert the date to a string.
Would you like more details on how to implement this workaround?
Sources:
This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not.
Mention @runllm to ask follow-up questions. See runllm.com for more!
@dansola Have you solved the problem? It seems to work on flytekit 1.12.3
. Are you using an older version?
@mao3267 You're right. This was happening on 1.12.0
. I'll close this, thanks!
Describe the bug
When using
datetime.date
as a type hint in a task, flyte appears to lose the input file:Expected behavior
Flyte should recognize the
datetime.date
object the same way it recognizes thedatetime
object.Additional context to reproduce
Good example:
pyflyte run --remote -p daniel date_bug/wf.py wf --date "2024-01-03"
This has no errors and works as expected.
Bad example:
pyflyte run --remote -p daniel date_bug/wf.py wf --date "2024-01-03"
This results in the error:
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?