models icon indicating copy to clipboard operation
models copied to clipboard

[FEA] Functionality to add sparse_weights arg to the EmbeddingTable Class /EMbeddings function

Open rnyak opened this issue 3 years ago • 2 comments

🚀 Feature request

We use tf.nn.safe_embedding_lookup_sparse api in our EmbeddingTable class for embeddings look up, when the input is tf.RaggedTensor or tf.SparseTensor. The original api has the sparse_weights arg that allows users to reweight the inputs before combining them. However, we do not leverage that functionality in Merlin Models, which would be useful to have.

Motivation

This a customer request and a useful feature to have.

rnyak avatar Nov 14 '22 14:11 rnyak

Needs clarificaiton with customer to check if the workaround is sufficient.

viswa-nvidia avatar Dec 13 '22 18:12 viswa-nvidia

we shared AverageEmbeddingsByWeightFeature class code, and this unit test with the customer and we are waiting for their update.

rnyak avatar Dec 13 '22 20:12 rnyak