Skip to content

Commit

Permalink
Fix OSS precommit CI (#1857)
Browse files Browse the repository at this point in the history
Summary:

precommit CI broken on trunk

Differential Revision: D55890022
  • Loading branch information
PaulZhang12 authored and facebook-github-bot committed Apr 8, 2024
1 parent 4981be5 commit 89cd759
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion torchrec/distributed/embeddingbag.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
append_prefix,
convert_to_fbgemm_types,
merge_fused_params,
none_throws,
optimizer_type_to_emb_opt_type,
)
from torchrec.modules.embedding_configs import (
Expand Down Expand Up @@ -1274,9 +1275,11 @@ def _create_mean_pooling_callback(
kt_key_ordering: torch.Tensor,
inverse_indices: Optional[Tuple[List[str], torch.Tensor]] = None,
) -> Callable[[KeyedTensor], KeyedTensor]:
inverse_indices = none_throws(inverse_indices)

with record_function("## ebc create mean pooling callback ##"):
batch_size = (
inverse_indices[1].size(dim=1) if variable_batch_per_feature else stride # pyre-ignore[16]
inverse_indices[1].size(dim=1) if variable_batch_per_feature else stride
)

if variable_batch_per_feature:
Expand Down

0 comments on commit 89cd759

Please sign in to comment.