Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dl #1661

Merged
merged 7 commits into from
Aug 29, 2022
13 changes: 7 additions & 6 deletions nvtabular/loader/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,12 +618,13 @@ def _handle_tensors(self, cats, conts, labels):
lists[names[0]] = tensor
X.update(lists)

for column_name in self.sparse_names:
if column_name not in self.sparse_max:
raise ValueError(
f"Did not convert {column_name} to sparse due to missing sparse_max entry"
)
X[column_name] = self._to_sparse_tensor(X[column_name], column_name)
for column_name in X:
if column_name in self.sparse_names:
if column_name not in self.sparse_max:
raise ValueError(
f"Did not convert {column_name} to sparse due to missing sparse_max entry"
)
X[column_name] = self._to_sparse_tensor(X[column_name], column_name)

# TODO: use dict for labels as well?
# would require output layers to match naming
Expand Down