Skip to content

Commit 455de88

Browse files
sarckkfacebook-github-bot
authored andcommitted
fix py3.9 build (#2660)
Summary: Pull Request resolved: #2660 The `|` operator is only supported for python >= 3.10, which breaks python 3.9 build Reviewed By: dstaay-fb Differential Revision: D67723223 fbshipit-source-id: a49208aa8d819c3047b75a52ab7ba6cb6c2638b8
1 parent ff03e14 commit 455de88

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

torchrec/distributed/mc_modules.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666

6767
@dataclass
6868
class EmbeddingCollectionContext(Multistreamable):
69-
sharding_contexts: List[InferSequenceShardingContext | SequenceShardingContext]
69+
sharding_contexts: List[
70+
Union[InferSequenceShardingContext, SequenceShardingContext]
71+
]
7072

7173
def record_stream(self, stream: torch.Stream) -> None:
7274
for ctx in self.sharding_contexts:

0 commit comments

Comments
 (0)