Note, another input param in a different task defi...
# flyte-support
s
Note, another input param in a different task defined in the same way except it’s of type pandas.DataFrame, works. Why is that?
Copy code
def estimate(test_data: Optional[pd.DataFrame] = None, ...
t
I'm guessing it's because
encoder
is of type that isn't understood by Flyte, whereas
pd.DataFrame
is a Flyte native type. But this should be supported. @high-accountant-32689, is this a bug?
b
this seems like a bug flyte should fallback on
FlytePickle
in cases where the type is not understood, unless this is a known limitation of the Union type, in which case the error message should be more informative. @salmon-refrigerator-32115 can you share a minimally reproducible example?
h
Two things: 1. Optional parameters are not supported in tasks yet 2. This looks like a bug in our support for unions. Samhita is right, this should be supported.
s
@broad-monitor-993, The task’s input dataframe is either supplied by the caller or None if user doesn’t have a df as input. I tried both, with or without Optional.
Copy code
def estimate(test_data: Optional[pd.DataFrame] = None, ...
def estimate(test_data: pd.DataFrame = None, ...
👀 1
In both cases, when None is the input, it will fail.
b
[flyte-bug]
b
@salmon-refrigerator-32115 would you mind filling out a bug report for the error? ideally it contains a copy-pastable example the repros the error
s
🙏 1
154 Views