Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.11
cache: "pip"
cache-dependency-path: "**/**.txt"
- uses: pre-commit/[email protected]
8 changes: 7 additions & 1 deletion merlin/dataloader/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from merlin.core.compat.tensorflow import tensorflow as tf
from merlin.dataloader.loader_base import LoaderBase
from merlin.table import TensorColumn, TensorflowColumn, TensorTable
from merlin.table import Device, NumpyColumn, TensorColumn, TensorflowColumn, TensorTable
from merlin.table.conversions import _dispatch_dlpack_fns, convert_col


Expand Down Expand Up @@ -135,6 +135,12 @@ def convert_batch(self, batch):
if inputs is not None:
inputs_table = self.create_table(inputs)
for col_name, col in inputs_table.items():
# fix for ragged column isaligned check failure
if col.is_ragged:
original_device = col.device
col = self.convert_col(col, NumpyColumn)
if original_device == Device.GPU:
col = col.gpu()
tf_inputs[col_name] = self.convert_col(col, column_type)

tf_target = None
Expand Down