Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Add capability to EmbeddingTable to hold multiple features that share id-encoding #697

Closed
marcromeyn opened this issue Aug 30, 2022 · 0 comments · Fixed by #700
Closed
Assignees
Milestone

Comments

@marcromeyn
Copy link
Contributor

marcromeyn commented Aug 30, 2022

As of now a EmbeddingTable holds a single feature which doesn't allow for shared embedding-tables. To support this we propose to add the capability to a table to add features as follows:

item_id_col = ...
user_item_history = ...

table = EmbeddingTable(64, item_id_col, user_item_history)

table.add_feature(col)

table.schema # -> Schema(item_id_col, user_item_history)

# Ways to call this
table(tf.Tensor([1,2,3])) # Tensor[3, 64]
table({"item_id": tf.Tensor([1,2,3])}) # Dict[str, Tensor[3, 64]]
table({
	"item_id": tf.Tensor([1,2,3]),
	"user_item_history": tf.RaggedTensor([1], [2, 4], [3])
}) # Dict[str, Tensor[3, 64]]
@marcromeyn marcromeyn changed the title Add capability to EmbeddingTable to hold multiple features that share id-encoding [TASK] Add capability to EmbeddingTable to hold multiple features that share id-encoding Aug 30, 2022
@marcromeyn marcromeyn transferred this issue from NVIDIA-Merlin/Merlin Aug 30, 2022
@marcromeyn marcromeyn added this to the Merlin 22.09 milestone Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants