NVIDIA-Merlin / NVIDIA-Merlin/Transformers4Rec

Improve performance of ranking metrics calculation

Open
#177 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/pytorch enhancement
Dominant language
Python
Stars
1.3k
Forks
165
Avg merge
1m
Merged PRs (30d)
2

Description

  • The current implementation of ranking metrics computes the top k scores within each metric class using the method extract_topk which is computationally expensive.
  • A possible solution is to Include the extraction of the top-k scores within the NextItemPredictionTask class and provide the ranked scores to the ranking metrics.

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

Start in transformers4rec/torch/ranking_metric.py at extract_topk, then inspect NextItemPredictionTask. Trace how ranking metrics currently compute top-k scores and how ranked scores could be provided by the task. Done means the proposed top-k extraction path is implemented across these components and the ranking metrics receive the ranked scores.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, performance
Issue type
Refactor
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.