Skip to content

Make EB/EBC scriptable (#467)#648

Closed
divchenko wants to merge 1 commit intofacebookresearch:mainfrom
divchenko:export-D37389962
Closed

Make EB/EBC scriptable (#467)#648
divchenko wants to merge 1 commit intofacebookresearch:mainfrom
divchenko:export-D37389962

Conversation

@divchenko
Copy link

Summary:
X-link: meta-pytorch/torchrec#467

  1. Do not use property, use methods instead. This is consistent w/ KJT.
  2. _embedding_bag_configs has a complex type List[EmbeddingBagConfig] which does not script. Use List[str] to store features instead.

Differential Revision: D37389962

@facebook-github-bot
Copy link

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

Summary:
We want to make the EB/EBC scriptable by default w/o the need of running torch.fx first. Not able to script EB/EBC modules by default (especially when needed for inference) is very non-intuitive and inconvenient.
In the same time we don't plan to make ShardedEB/EBC scriptable.

1. Do not use property, use methods instead. This is consistent w/ KJT.
1. _embedding_bag_configs has a complex type List[EmbeddingBagConfig] which does not script. Use List[str] to store features instead.

Pull Request resolved: #648

X-link: meta-pytorch/torchrec#467

Reviewed By: colin2328

Differential Revision: D37389962

fbshipit-source-id: f0f1a49733381f1259714af7d03e3c083d211ad9
@facebook-github-bot
Copy link

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

facebook-github-bot pushed a commit to meta-pytorch/torchrec that referenced this pull request Jun 27, 2022
Summary:
We want to make the EB/EBC scriptable by default w/o the need of running torch.fx first. Not able to script EB/EBC modules by default (especially when needed for inference) is very non-intuitive and inconvenient.
In the same time we don't plan to make ShardedEB/EBC scriptable.

1. Do not use property, use methods instead. This is consistent w/ KJT.
1. _embedding_bag_configs has a complex type List[EmbeddingBagConfig] which does not script. Use List[str] to store features instead.

X-link: facebookresearch/ReAgent#648

Pull Request resolved: #467

Reviewed By: colin2328

Differential Revision: D37389962

fbshipit-source-id: 5ce079a946b9458ee63658cae2fd731cfc1c7958
xuruiyang pushed a commit that referenced this pull request Sep 20, 2025
Summary:
We want to make the EB/EBC scriptable by default w/o the need of running torch.fx first. Not able to script EB/EBC modules by default (especially when needed for inference) is very non-intuitive and inconvenient.
In the same time we don't plan to make ShardedEB/EBC scriptable.

1. Do not use property, use methods instead. This is consistent w/ KJT.
1. _embedding_bag_configs has a complex type List[EmbeddingBagConfig] which does not script. Use List[str] to store features instead.

Pull Request resolved: #648

X-link: meta-pytorch/torchrec#467

Reviewed By: colin2328

Differential Revision: D37389962

fbshipit-source-id: 5ce079a946b9458ee63658cae2fd731cfc1c7958
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants