BUG: unsupported operand type(s) for -: 'TransformWorkflow' and 'list'
rnyak opened this issue · 0 comments
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:
- 01-ETL-with-NVTabular.ipynb
- 02-session-based-XLNet-with-PyT.ipynb
- 03-serving-session-based-model-torch-backend.ipynb --> run until cell 17 and in cell 17 execute the code below instead
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)