-
Notifications
You must be signed in to change notification settings - Fork 143
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
[QST] TypeError: unhashable type: 'numpy.ndarray' #1871
Comments
I observe a similar problem in Categorify with the hashing of infrequent items. Here is the minimal example:
Error:
Do you think it should be a bug report? EDIT:
|
solution worked for me: |
I can confirm my code only errors out on the CPU too. On the GPU it works fine. Still, this is a bug. |
ok this error is occurring again, even after installing RAPIDS... can someone help? I ran following codes to check if GPU exists
and it returns
so it has GPU but nvtabular dataset is keep forcing to use CPU. |
What is your question?
I'm trying to use Merlin to build 2 tower NN model. However, when I try to use nvtabular workflow to fit my dataset, It shows an error.
user_features = ([
"user_history_1",
"user_history_2",
"user_gender",
"user_age",
"platform",
"object_section",
"hour"]
>> HashBucket({"user_history_1": 500000, "user_history_2": 100000,
"user_gender": 3, "user_age" : 10, "platform" : 3, "object_section": 6, "hour": 24})
>> TagAsUserFeatures()
)
outputs = user_id + item_id + item_hash_features + item_dense_features + user_features
workflow = nvt.Workflow(outputs)
train_dataset = nvt.Dataset(train_data)
workflow.fit(train_dataset)
and after calling fit method, it returns an error:
TypeError: unhashable type: 'numpy.ndarray'
TypeError Traceback (most recent call last)
Cell In[18], line 1
----> 1 workflow.fit(train_dataset)
Only two features, user_history_1 and user_history_2 are numpy array: contains the itemId that user visited.
e.g.
[1705022, 1806090, 1801039, 1005001]
When I excluded user_history_1 and user_history_2 from input features, fit method worked successfully. Therefore, I suspect these two features as the reason of error message.
As it says numpy.ndarray is unhashable, I converted it to list. However, I still see the same error message.
Does anyone have a suggestion for debugging?
The text was updated successfully, but these errors were encountered: