Skip to content

Commit 1d8824b

Browse files
Ziliang Zhaofacebook-github-bot
authored andcommitted
Fix UnboundLocalError in weights assignment (#2493)
Summary: Pull Request resolved: #2493 See D64163927 for details. This block is not hit by testing so the typo was not captured. Reviewed By: Clara85 Differential Revision: D64609231 fbshipit-source-id: b0a4a0ce54dc8ed6d69c35c5a6f9eb77cd70a430
1 parent d1a2990 commit 1d8824b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torchrec/distributed/mc_modules.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ def compute(
663663
values=features.values(),
664664
lengths=features.lengths(),
665665
# TODO: improve this temp solution by passing real weights
666-
weights=torch.tensor(kjt.length_per_key()),
666+
weights=torch.tensor(features.length_per_key()),
667667
)
668668
}
669669
mcm = self._managed_collision_modules[table]

0 commit comments

Comments
 (0)