Skip to content

Commit

Permalink
Fix UnboundLocalError in weights assignment (#2493)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ziliang Zhao authored and facebook-github-bot committed Oct 18, 2024
1 parent d1a2990 commit 1d8824b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchrec/distributed/mc_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def compute(
values=features.values(),
lengths=features.lengths(),
# TODO: improve this temp solution by passing real weights
weights=torch.tensor(kjt.length_per_key()),
weights=torch.tensor(features.length_per_key()),
)
}
mcm = self._managed_collision_modules[table]
Expand Down

0 comments on commit 1d8824b

Please sign in to comment.