NVIDIA-Merlin / NVIDIA-Merlin/Merlin
[QST]
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 907
- Forks
- 129
- PR merge metrics
- No merged PRs in 30d
Description
❓ Questions & Help
Details
I'm building a multi-stage recommendation model using NVIDIA Merlin. I want to include a list of IDs (e.g., [3, 3434, 4234, 344]) as part of the user or item features.
How can I incorporate such list features into the model pipeline?
What changes do I need to make in the following sample code from the official multi-stage recommendation notebook?
Do I need to modify anything else in the preprocessing workflow, schema, or model architecture, or are changes in just the provided code snippet sufficient?
user_id_raw = ["user_id"] >> Rename(postfix='_raw') >> LambdaOp(lambda col: col.astype("int32")) >> TagAsUserFeatures()
item_id_raw = ["item_id"] >> Rename(postfix='_raw') >> LambdaOp(lambda col: col.astype("int32")) >> TagAsItemFeatures()
item_cat = Categorify(dtype="int32")
items = (["item_id","item_category", "item_shop", "item_brand"] >> item_cat)
subgraph_item = Subgraph(
"item",
Subgraph("items_cat", items) +
(items["item_id"] >> TagAsItemID()) +
(items["item_category", "item_shop", "item_brand"] >> TagAsItemFeatures())
)
subgraph_user = Subgraph(
"user",
(["user_id"] >> Categorify(dtype="int32") >> TagAsUserID()) +
(
[
"user_shops",
"user_profile",
"user_group",
"user_gender",
"user_age",
"user_consumption_2",
"user_is_occupied",
"user_geography",
"user_intentions",
"user_brands",
"user_categories",
] >> Categorify(dtype="int32") >> TagAsUserFeatures()
)
)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the official multi-stage recommendation notebook linked in the issue and trace the preprocessing workflow, schema, and model architecture around the provided Merlin code. Determine how list-valued user or item IDs are represented and identify the changes needed across those stages; done should include a validated workflow for list features.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100