NVIDIA-Merlin / NVIDIA-Merlin/Transformers4Rec

Fix the collision between padding and the OOV from Categorify

Open
#160 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

We are facing an issue in ETL part of session-based when we have missing values in string columns. Currently NVTabular pipeline crashes if we do the following:

fill_na_categs = ['category_code', 'brand'] >> nvt.ops.FillMissing(fill_val="unknown")
cat_feats =  fill_na_categs + ['user_id', 'product_id', 'category_id', 'event_type'] >> nvt.ops.Categorify()

We do not have to use FillMissing op for string columns, we can directly use Categorify op, and, then missing values will be mapped to 0 value, and then to null embeddings. But we use 0 value for padding also. Same case happens, when we have OOV each time. This would create a collision issue between padding and the OOV from Categorify op.

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

No files or tests are named. Reproduce the shown FillMissing and Categorify pipeline, then trace how missing values and OOV categories are mapped relative to sequence padding and null embeddings. Done means missing values and OOV categories no longer collide with the padding value, with regression coverage for both cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
data-engineering
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.