-
Notifications
You must be signed in to change notification settings - Fork 421
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
unify the definition of EmbeddingTableType
#2391
Open
beekbin
wants to merge
1
commit into
pytorch:main
Choose a base branch
from
beekbin:export-D62596655
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Sep 13, 2024
This pull request was exported from Phabricator. Differential Revision: D62596655 |
This pull request was exported from Phabricator. Differential Revision: D62596655 |
beekbin
pushed a commit
to beekbin/torchrec
that referenced
this pull request
Sep 13, 2024
Summary: Pull Request resolved: pytorch#2391 # Problem `EmbeddingTableType` is introduced recently for ZCH. There are two same definitions of `EmbeddingTableType` * one is defined in [torchrec/fb/distributed/sparsenn_configs.py](https://www.internalfb.com/code/fbsource/[3a83814d95f27eec3bf425d468a5234d6ca8a381]/fbcode/torchrec/fb/distributed/sparsenn_configs.py?lines=110) * The other is defined in [minimal_viable_ai/core/model_family_api/configs.py](https://www.internalfb.com/code/fbsource/[bbe727e13ae251889c5df57b58f2cbc05675662e]/fbcode/minimal_viable_ai/core/model_family_api/configs.py?lines=76) **Problem is that** The fields of `EmbeddingTable` defined in `minimal_viable_ai/core/model_family_api/configs.py` will be assigned to the `EmbeddingTable` defined in `torchrec/fb/distributed/sparsenn_configs.py`. The assignment happens at [minimal_viable_ai/sandbox/umia_hstu/umia_configs_utils.py ](https://fburl.com/code/5gb24p9j) for model publish. So if the EmbeddingTable are different, the assignment will fail. # solution from this diff * Option1: keep one of them, and the other import it. This would cause dependency loop; * Option2(this diff): move the definition of `EmbeddingTableType` to [torchrec/modules/embedding_configs.py](https://fburl.com/code/tvob11sz) Differential Revision: D62596655
beekbin
force-pushed
the
export-D62596655
branch
from
September 13, 2024 18:59
1523cbc
to
06cac81
Compare
Summary: Pull Request resolved: pytorch#2391 # Problem `EmbeddingTableType` is introduced recently for ZCH. There are two same definitions of `EmbeddingTableType` * one is defined in [torchrec/fb/distributed/sparsenn_configs.py](https://www.internalfb.com/code/fbsource/[3a83814d95f27eec3bf425d468a5234d6ca8a381]/fbcode/torchrec/fb/distributed/sparsenn_configs.py?lines=110) * The other is defined in [minimal_viable_ai/core/model_family_api/configs.py](https://www.internalfb.com/code/fbsource/[bbe727e13ae251889c5df57b58f2cbc05675662e]/fbcode/minimal_viable_ai/core/model_family_api/configs.py?lines=76) **Problem is that** The fields of `EmbeddingTable` defined in `minimal_viable_ai/core/model_family_api/configs.py` will be assigned to the `EmbeddingTable` defined in `torchrec/fb/distributed/sparsenn_configs.py`. The assignment happens at [minimal_viable_ai/sandbox/umia_hstu/umia_configs_utils.py ](https://fburl.com/code/5gb24p9j) for model publish. So if the EmbeddingTable are different, the assignment will fail. # solution from this diff * Option1: keep one of them, and the other import it. This would cause dependency loop; * Option2(this diff): move the definition of `EmbeddingTableType` to [torchrec/modules/embedding_configs.py](https://fburl.com/code/tvob11sz) Differential Revision: D62596655
This pull request was exported from Phabricator. Differential Revision: D62596655 |
beekbin
force-pushed
the
export-D62596655
branch
from
September 13, 2024 19:31
06cac81
to
19d3dc1
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
fb-exported
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
Problem
EmbeddingTableType
is introduced recently for ZCH.There are two same definitions of
EmbeddingTableType
Problem is that
The fields of
EmbeddingTable
defined inminimal_viable_ai/core/model_family_api/configs.py
will be assigned to theEmbeddingTable
defined intorchrec/fb/distributed/sparsenn_configs.py
.The assignment happens at minimal_viable_ai/sandbox/umia_hstu/umia_configs_utils.py for model publish.
So if the EmbeddingTable are different, the assignment will fail.
solution from this diff
EmbeddingTableType
to torchrec/modules/embedding_configs.pyDifferential Revision: D62596655