<#3010 [BUG] pd.DataFrame type doesn't work with d...
# flytekit
a
#3010 [BUG] pd.DataFrame type doesn't work with dataclasses Issue created by cosmicBboy Describe the bug using
pd.DataFrame
with dataclasses raises an error:
Copy code
File "/Users/nielsbantilan/miniconda3/envs/flyte-vscode-demo/lib/python3.9/site-packages/dataclasses_json/core.py", line 201, in _decode_dataclass
    init_kwargs[field.name] = _decode_generic(field_type,
  File "/Users/nielsbantilan/miniconda3/envs/flyte-vscode-demo/lib/python3.9/site-packages/dataclasses_json/core.py", line 258, in _decode_generic
    xs = _decode_items(type_.__args__[0], value, infer_missing)
AttributeError: type object 'DataFrame' has no attribute '__args__'
Expected behavior this should work like structured dataset Additional context to reproduce Using this type in a task
Copy code
@dataclass_json
@dataclass
class TrainArgs:
    hyperparameters: dict
    data: pd.DataFrame

@task
def prepare_train_args(hp_grid: List[dict], data: pd.DataFrame) -> List[TrainArgs]:
    return [TrainArgs(hp, data) for hp in hp_grid]
will lead to the error above Screenshots No response Are you sure this issue hasn't been raised already? ☑︎ Yes Have you read the Code of Conduct? ☑︎ Yes flyteorg/flyte