freezing-tailor-85994
12/10/2024, 6:36 PMflytekitplugin-polars
package should automatically get the return signature from the following function
def random_dataframe(num_rows: int) -> pl.DataFrame:
feature_1_list = np.random.randint(low=100, high=999, size=(num_rows,))
feature_2_list = np.random.normal(loc=0, scale=1, size=(num_rows, ))
feature_3_list = [make_random_protein(x) for x in feature_1_list]
return pl.DataFrame({'protein_length': feature_1_list,
'protein_feature': feature_2_list,
'protein_seq': feature_3_list})
and handle the conversion to flytekit.types.structured.structured_dataset.StructuredDataset
when moving it between tasks. In practice what I see is
TypeError: Failed to convert outputs of task 'main_workflows.make_dataframe' at position 0.
Failed to convert type <class 'polars.dataframe.frame.DataFrame'> to type <class 'polars.dataframe.frame.DataFrame'>.
Error Message: 'coroutine' object does not support the asynchronous context manager protocol.
Message:
TypeError: Failed to convert outputs of task 'main_workflows.make_dataframe' at position 0.
Failed to convert type <class 'polars.dataframe.frame.DataFrame'> to type <class 'polars.dataframe.frame.DataFrame'.
Error Message: 'coroutine' object does not support the asynchronous context manager protocol.", "taskName": null}
Any idea as to what's going on?high-accountant-32689
12/11/2024, 3:32 PMcoroutine
there, so flagging just as a potential cause.
@freezing-tailor-85994, can you confirm which versions of flytekit
and flytekitplugin-polars
you're using? Also, can you try running a version other than 1.14.0 ?freezing-tailor-85994
12/11/2024, 3:38 PMhigh-accountant-32689
12/11/2024, 3:43 PMfreezing-tailor-85994
12/12/2024, 4:18 PMfreezing-tailor-85994
12/12/2024, 4:24 PMthankful-minister-83577
thankful-minister-83577
uri
in the return statement?freezing-tailor-85994
12/13/2024, 2:23 PMthankful-minister-83577
freezing-tailor-85994
12/13/2024, 4:48 PMthankful-minister-83577
thankful-minister-83577
freezing-tailor-85994
12/16/2024, 5:01 PMthankful-minister-83577
thankful-minister-83577
thankful-minister-83577
thankful-minister-83577
freezing-tailor-85994
12/16/2024, 8:12 PM