-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Closed
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixoncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queue
Description
🚀 The feature, motivation and pitch
In python3.10, we can write typing.Union[X, Y]
as X | Y
directly, which improves the readibility. I hope we can write it in torchscript, but currently torch.jit.script complains that Expression of type | cannot be used in a type expression
See: https://peps.python.org/pep-0604/
Alternatives
No response
Additional context
No response
### Tasks
Metadata
Metadata
Assignees
Labels
enhancementNot as big of a feature, but technically not a bug. Should be easy to fixNot as big of a feature, but technically not a bug. Should be easy to fixoncall: jitAdd this issue/PR to JIT oncall triage queueAdd this issue/PR to JIT oncall triage queue