torchrec icon indicating copy to clipboard operation
torchrec copied to clipboard

Clean up duplicate code in EmbeddingCollection and EmbeddingBagCollection

Open sarckk opened this issue 1 year ago • 4 comments

Summary: EmbeddingCollection and EmbeddingBagCollection contain duplicate code for methods _pre_load_state_dict_hook() and _initialize_torch_state(). Refactor this out to an abstract class ShardedTensorEmbeddingModule which both EC and EBC inherit

Differential Revision: D53198210

sarckk avatar Jan 30 '24 00:01 sarckk

This pull request was exported from Phabricator. Differential Revision: D53198210

facebook-github-bot avatar Jan 30 '24 00:01 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53198210

facebook-github-bot avatar Jan 30 '24 00:01 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53198210

facebook-github-bot avatar Jan 30 '24 00:01 facebook-github-bot

This pull request was exported from Phabricator. Differential Revision: D53198210

facebook-github-bot avatar Jan 30 '24 00:01 facebook-github-bot