models icon indicating copy to clipboard operation
models copied to clipboard

[FEA] Export embeddings from youtube-dnn

Open marcromeyn opened this issue 3 years ago • 1 comments

🚀 Feature request

Make it possible to export query-/item-embeddings from the youtube-dnn retrieval model similar to MF & Two-Tower.

Right now the YoutubeDNNRetrievalModel returns a Model object instead of a RetrievalModel. This is because a retrieval-model expects a query- and item-block. This is not true in this case since the item-embeddings are part of the PredictionTask. We need a way to handle this.

CleanShot 2022-05-25 at 11 57 03

Making this work would enable the following API:

model = mm.YoutubeDNNRetrievalModel(schema)
model.compile(optimizer="adam")
model.fit(dataset, batch_size=1024, epochs=5)

user_embeddings = model.user_embeddings(dataset)
item_embeddings = model.item_embeddings(dataset)

Motivation

In order to use this model effectively in a retrieval setting, embeddings need to be exportable.

marcromeyn avatar May 25 '22 09:05 marcromeyn

This is being fixed by https://github.com/NVIDIA-Merlin/models/pull/473

rnyak avatar Jun 01 '22 14:06 rnyak