Skip to content

Commit 6b692a6

Browse files
aporialiaofacebook-github-bot
authored andcommitted
Add enumerator to logging stats (#3073)
Summary: Pull Request resolved: #3073 Pull Request resolved: #3018 Add enumerator to the stats logging. We will use this in the next diff to generate a hash for the planner input context. Reviewed By: iamzainhuda Differential Revision: D76278097 fbshipit-source-id: 9146284394c061b366d22742cc68f500fbeacf21
1 parent 6c9da98 commit 6b692a6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

torchrec/distributed/planner/stats.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
)
3838
from torchrec.distributed.planner.types import (
3939
CriticalPathEstimate,
40+
Enumerator,
4041
ParameterConstraints,
4142
Perf,
4243
ShardingOption,
@@ -157,6 +158,7 @@ def log(
157158
best_plan: List[ShardingOption],
158159
constraints: Optional[Dict[str, ParameterConstraints]] = None,
159160
sharders: Optional[List[ModuleSharder[nn.Module]]] = None,
161+
enumerator: Optional[Enumerator] = None,
160162
debug: bool = True,
161163
) -> None:
162164
"""
@@ -1133,6 +1135,7 @@ def log(
11331135
best_plan: List[ShardingOption],
11341136
constraints: Optional[Dict[str, ParameterConstraints]] = None,
11351137
sharders: Optional[List[ModuleSharder[nn.Module]]] = None,
1138+
enumerator: Optional[Enumerator] = None,
11361139
debug: bool = True,
11371140
) -> None:
11381141
pass

torchrec/distributed/planner/types.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -951,6 +951,7 @@ def log(
951951
best_plan: List[ShardingOption],
952952
constraints: Optional[Dict[str, ParameterConstraints]] = None,
953953
sharders: Optional[List[ModuleSharder[nn.Module]]] = None,
954+
enumerator: Optional[Enumerator] = None,
954955
debug: bool = False,
955956
) -> None:
956957
"""

0 commit comments

Comments
 (0)