Pull Request resolved: https://github.com/pytorch/pytorch/pull/153943
Approved by: https://github.com/malfet
This commit is contained in:
Tom Ritchford
2025-07-04 15:22:25 +00:00
committed by PyTorch MergeBot
parent 7275f28045
commit 9968edd002
2 changed files with 2 additions and 10 deletions

View File

@ -32,7 +32,7 @@ from typing import (
TypeVar as _TypeVar,
Union as _Union,
)
from typing_extensions import ParamSpec as _ParamSpec
from typing_extensions import ParamSpec as _ParamSpec, TypeIs as _TypeIs
if TYPE_CHECKING:
@ -63,15 +63,7 @@ from torch._utils_internal import (
# TODO(torch_deploy) figure out how to freeze version.py in fbcode build
if _running_with_deploy():
__version__ = "torch-deploy-1.8"
# TODO: Remove this ugly hack when deploy typing extensions are updated to 4.10+
if not TYPE_CHECKING:
import typing_extensions
_TypeIs = typing_extensions.TypeGuard
typing_extensions.TypeIs = _TypeIs
else:
from typing_extensions import TypeIs as _TypeIs
from torch.torch_version import __version__ as __version__
__all__ = [