Skip to content

[BUG] getting error when serving 0_transformworkflowtriton in session-based example #360

@rnyak

Description

@rnyak

Bug description

I am getting the following error when serving 0_transformworkflowtriton. The error occurs when I send a request to the server:

Failed to transform operator <merlin.dag.ops.udf.UDF object at 0x7f3abb31d970>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 4240, in _ensure_valid_index
    value = Series(value)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/series.py", line 436, in __init__
    data, index = self._init_dict(data, index, dtype)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/series.py", line 511, in _init_dict
    if data:
  File "/usr/local/lib/python3.8/dist-packages/cudf/core/single_column_frame.py", line 95, in __bool__
    raise TypeError(
TypeError: The truth value of a <class 'cudf.core.series.Series'> is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/merlin/dag/executors.py", line 214, in _run_node_transform
    transformed_data = node.op.transform(selection, input_data)
  File "/usr/local/lib/python3.8/dist-packages/merlin/dag/ops/udf.py", line 77, in transform
    new_df[col] = self.f(transformable[col])
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 3978, in __setitem__
    self._set_item(key, value)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 4172, in _set_item
    value = self._sanitize_column(value)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 4902, in _sanitize_column
    self._ensure_valid_index(value)
  File "/usr/local/lib/python3.8/dist-packages/pandas/core/frame.py", line 4242, in _ensure_valid_index
    raise ValueError(
ValueError: Cannot set a frame with no defined index and a value that cannot be converted to a Series

Steps/Code to reproduce bug

  1. Please run the notebooks 1 and 2 in this folder:
  2. Launch triton server
  3. Send the request to triton server as follows:
col_names = ['product_recency_days_log_norm-list__values', 'product_recency_days_log_norm-list__offsets', 'et_dayofweek_sin-list__values', 'et_dayofweek_sin-list__offsets', 'item_id-list__values', 'item_id-list__offsets', 'category-list__values', 'category-list__offsets']
response = send_triton_request(workflow.input_schema, filtered_batch, col_names, triton_model='0_transformworkflowtriton')
print(response)

Expected behavior

Environment details

  • Merlin version:
  • Platform:
  • Python version:
  • PyTorch version (GPU?):
  • Tensorflow version (GPU?):

Additional context

I am using merlin-pytorch:23.04 image with all the latest main branches pulled and dependencies installed.

Metadata

Metadata

Assignees

Labels

P0bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions