Skip to content

Commit

Permalink
fix optimizer config to apply correctly in tests (pytorch#2436)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#2436

tsia, same as D63468297

Differential Revision: D63555376
  • Loading branch information
iamzainhuda authored and facebook-github-bot committed Sep 30, 2024
1 parent db14fef commit 4ec4a5e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ModelParallelHierarchicalTest(ModelParallelTestShared):
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down Expand Up @@ -162,7 +162,7 @@ def test_sharding_nccl_twrw(
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down Expand Up @@ -286,7 +286,7 @@ def test_sharding_empty_rank(
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down Expand Up @@ -355,7 +355,7 @@ def test_embedding_tower_nccl(
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down
6 changes: 3 additions & 3 deletions torchrec/distributed/tests/test_sequence_model_parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class SequenceModelParallelTest(MultiProcessTestBase):
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down Expand Up @@ -150,7 +150,7 @@ def test_sharding_nccl_dp(
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down Expand Up @@ -203,7 +203,7 @@ def test_sharding_nccl_tw(
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class SequenceModelParallelHierarchicalTest(MultiProcessTestBase):
[
None,
{
"embeddingbags": (torch.optim.SGD, {"lr": 0.01}),
"embedding_bags": (torch.optim.SGD, {"lr": 0.01}),
"embeddings": (torch.optim.SGD, {"lr": 0.2}),
},
]
Expand Down

0 comments on commit 4ec4a5e

Please sign in to comment.