NVIDIA-Merlin / Merlin

NVIDIA Merlin is an open source library providing end-to-end GPU-accelerated recommender systems, from feature engineering and preprocessing to training deep learning models and running inference in production.
Apache License 2.0
715 stars 111 forks source link

[QST]Follow the example 'getting started movies' to execute an error. #1077

Open jianhuaz opened 8 months ago

jianhuaz commented 8 months ago

❓ Questions & Help

Details

Merlin-PyTorch

batch : ({'userId': tensor([13849, 1743, 35896, ..., 339, 79530, 88722], device='cuda:0'), 'movieId': tensor([ 890, 2922, 780, ..., 9143, 2444, 813], device='cuda:0'), 'genresvalues': tensor([ 4, 3, 10, ..., 17, 15, 12], device='cuda:0'), 'genresoffsets': tensor([ 0, 2, 6, ..., 89550, 89555, 89557], device='cuda:0', dtype=torch.int32)}, tensor([1., 1., 0., ..., 1., 1., 1.], device='cuda:0'))

target_columns : ['userId', 'movieId', 'genres']

Why are ‘genres_values‘ and ’genres_offsets‘ in batch instead of ’genres‘?

image

rnyak commented 7 months ago

@jianhuaz Because genres is a ragged list input feature, and we represent ragged tensors with __values and __offsets.

how did you install Merlin libraries? are you using a docker image to run our examples?

CarloNicolini commented 1 month ago

This issue is still present. I have installed the Merlin libraries locally and it works up exactly to that point.

I believe this problem could be solved by writing a different transform function rather than the standard one present at https://github.com/NVIDIA-Merlin/NVTabular/blob/main/nvtabular/framework_utils/torch/utils.py

Any update on this?

yueming-zhang commented 1 month ago

I am getting the same error using PyTorch container as shown below. I like the framework but this type of error discourage new users from the getgo.

image

zainkhan-afk commented 5 days ago

Getting the same error. Did you manage to find a solution?