[BUG] importing transformers4rec.torch libraries gives error
See original GitHub issueBug description
After
!pip install transformers4rec[pytorch,nvtabular]
from transformers4rec import torch as tr
on a kaggle notebook I get the error:
TypeError: new() missing 1 required positional argument: ‘task’
Same with all other transformers4rec.torch libraries
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (1 by maintainers)
Top Results From Across the Web
[BUG] importing list_files fails in transformers4rec[pytorch ...
It does seem to be a general thing with v0.1.3. This fails as well: from transformers4rec import torch as tr ...
Read more >transformers4rec - PyPI
Transformers4Rec is a flexible and efficient library for sequential and session-based recommendation and can work with PyTorch.
Read more >Transformer: Error importing packages. "ImportError: cannot ...
Change the torch version in colab by running this command !pip install torch==1.4.0. Then, It worked for me.
Read more >Troubleshoot - Hugging Face
Sometimes errors occur, but we are here to help! This guide covers some of the most common issues we've seen and how you...
Read more >Transformers4Rec: Building Session-Based ...
Here are some highlights of the Transformers4Rec library: ... #from transformers4rec import torch as tr from transformers4rec import tf as ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have just opened the PR https://github.com/NVIDIA-Merlin/Transformers4Rec/pull/576 that updates Transformers4Rec code with the latest release of Torchmetrics (0.11.0). In fact, Torchmetrics updated its classification metrics (Accuracy, Precision,…) to require a
task
argument that differentiates three classification tasks: ‘binary’, ‘multiclass’, or ‘multilabel’. When missing, it throws the errorTypeError: __new__() missing 1 required positional argument: 'task'
I hope this PR fixes the issue you are observing.The problem is with Torchmetrics, the latest supported version I found is 0.10.3 and they just released 0.11