mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Pull Request resolved: https://github.com/pytorch/pytorch/pull/153943 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
7275f28045
commit
9968edd002
@ -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__ = [
|
||||
|
Reference in New Issue
Block a user