NVIDIA-Merlin / NVIDIA-Merlin/Transformers4Rec

0.1.16 version creates import errors

Open
#629 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P1 question
Dominant language
Python
Stars
1.3k
Forks
165
Avg merge
1m
Merged PRs (30d)
2

Description

  1. The following import from transformers4rec.utils.data_utils import save_time_based_splits raises a ModuleNotFoundError, where utils.data_utils does not exist. This can be solved by using from transformers4rec.data.preprocessing import save_time_based_splits
  2. The following import from transformers4rec import torch as tr raises a TypeError TypeError: __new__() missing 1 required positional argument: 'task', explicitly in
    2.1. from .model.prediction_task import BinaryClassificationTask, NextItemPredictionTask, RegressionTask
    2.2 class BinaryClassificationTask(PredictionTask):
    2.3 and at last tm.Precision(num_classes=2),

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce both imports from the issue: save_time_based_splits via transformers4rec.utils.data_utils and transformers4rec as tr. Read transformers4rec.data.preprocessing and the prediction-task definitions, especially BinaryClassificationTask and the tm.Precision(num_classes=2) call. Done means the documented imports work in version 0.1.16 without the reported ModuleNotFoundError or TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.