Skip to content

BUG: unsupported operand type(s) for -: 'TransformWorkflow' and 'list' #293

Open
@rnyak

Description

@rnyak

Currently this notebook is giving error when we pull the latest branches from the dev branch. Although we dont know the main reason, this might be due to extra columns that are in the NVT workflow output_schema but TF4Rec model does not use them as inputs. One way to remove these extra columns from NVT workflow could be doing it in the way the graph is constructed by using - operator to adjust the selector. However, I am getting an error when I do the following:

torch_op = workflow.input_schema.column_names >> (TransformWorkflow(workflow) - ["session_id", "day_first"])>> PredictPyTorch(
    traced_model, input_schema, output_schema
)

TypeError Traceback (most recent call last)
Cell In[19], line 1
----> 1 torch_op = workflow.input_schema.column_names >> (TransformWorkflow(workflow) - ["session_id"])>> PredictPyTorch(
2 traced_model, input_schema, output_schema
3 )
5 ensemble = Ensemble(torch_op, workflow.input_schema)

TypeError: unsupported operand type(s) for -: 'TransformWorkflow' and 'list'

To repro the issue, you can run these notebooks in order:

torch_op = workflow.input_schema.column_names >> (TransformWorkflow(workflow) - ["session_id", "day_first"])>> PredictPyTorch(
    traced_model, input_schema, output_schema
)
ensemble = Ensemble(torch_op, workflow.input_schema)

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions