Hi, we have a Flyte task which is supposed to have...
# flyte-support
m
Hi, we have a Flyte task which is supposed to have
datetime.date
as a parameter. Does Flyte support data types like
datetime.date
/
datetime.datetime
?
m
Thanks @glamorous-carpet-83516 for the help. This page mentions
datetime.datetime
but
datime.date
is mentioned here. Hence the question
g
ohh, sorry, you’re looking for
datatime.date
. we don’t support it yet. it’s a known issue. https://github.com/flyteorg/flyte/issues/3026
m
ah ok. Thank you. We will not use
datetime.date
then
f
We can add this transformer, should be trivial- @millions-night-34157 contribution?
m
I can work on it on weekends but need some help in getting started.
❤️ 2
🔥 2
🙇 2
f
Let me share an example
You can add it here
m
Thanks for the help but I need to start from "what is transformer" in Flyte. 😄
t
@flaky-daybreak-42119 is also interested in contributing. I assigned this issue to him yesterday.
🙌 1
f
Yes I am working on it!
🙌 2
b
Howdy, I am encountering a
Object of type date is not JSON serializable
and we are on 1.9.0, which is the release that introduced support for
datetime.date
. However, I use
datetime.date
in a dataclass as follows:
Copy code
@dataclass_json
@dataclass
class MyOutputClass:
    start_date: datetime.date
    end_date: datetime.date
Should I expect this to work?
t
@bored-beard-89967, can you use mashumaro? You can find an example here.
🙌 1
🙏 1
datetime.date
type is present in the mashumaro's supported data types: https://github.com/Fatal1ty/mashumaro#supported-data-types.
b
Awesome, we will look into that. We use conda and might have to wait until 1.10 is on conda-forge first. I am excited for all the 1.10 features!
🙌 1