Hello! I am trying to use a remote workflow and e...
# flyte-support
p
Hello! I am trying to use a remote workflow and execute it like this:
Copy code
data = {
        'column1': np.random.randint(0, 100, size=10),
        'column2': np.random.rand(10),
        'column3': np.random.choice(['A', 'B', 'C', 'D'], size=10)
    }

    df = pd.DataFrame(data)

    inputs = {
        "data_source_name": "dashboards-test",
        "data_source_description": "test",
        "df_input": df
    }
    workflow_name = (
        "workflowname"
    )
    remote = FlyteRemote(config=Config.auto())
    workflow = remote.fetch_workflow(
        project="project",
        domain="production",
        name=workflow_name,
    )
    execution = remote.execute(workflow, inputs=inputs)

    execution = remote.wait(execution)
But it fails on this line
remote.execute(workflow, inputs=inputs)
with the error:
Copy code
ValueError: Error encountered while executing 'load_data':
  Failed to find a handler for <class 
'flytekit.types.structured.structured_dataset.StructuredDataset'>, protocol 
[flyte], fmt ['']
I am assuming that they problem is related to the dataframe but in the workflow's code I saw that it is also being passed a dataframe without any problem. Any suggestion?
t
this should work. what's your flytekit version?
p
I am using the version 1.13.5 but in order to make it work I had to do the following for the dataframe :
Copy code
"df_input" : StructuredDataset(dataframe=df, file_format="")
so it is solved now with the above workaround