flyteorg / flyte

Scalable and flexible workflow orchestration platform that seamlessly unifies data, ML and analytics stacks.
https://flyte.org
Apache License 2.0
5.18k stars 550 forks source link

[BUG] `PanderaTransformer::to_python_value()` seems to be returning an incorrect type #5369

Open danieldanciu opened 1 month ago

danieldanciu commented 1 month ago

The return type of the to_python_value of the pandera type transformer seems incorrect. Currently, the returned type is pandas.core.frame.DataFrame, but the declared return type is pandera.typing.DataFrame. I suspect this is because instantiating pandera.DataFrameSchema returns a pandas.core.frame.DataFrame, rather than what one would normally expect, namely a pandera.typing.DataFrame.

I will propose an MR to fix this shortly.

welcome[bot] commented 1 month ago

Thank you for opening your first issue here! 🛠

runllm[bot] commented 1 month ago

The issue arises because PanderaTransformer::to_python_value() returns a pandas.DataFrame instead of a pandera.typing.DataFrame. This discrepancy is due to the instantiation of pandera.DataFrameSchema, which returns a pandas.DataFrame.

Would you like more detail on how to address this issue?

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!