mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
@ -19,4 +19,4 @@ requests
|
|||||||
setuptools>=62.3.0,<80.0
|
setuptools>=62.3.0,<80.0
|
||||||
sympy>=1.13.3
|
sympy>=1.13.3
|
||||||
types-dataclasses
|
types-dataclasses
|
||||||
typing-extensions>=4.10.0
|
typing-extensions>=4.13.2
|
||||||
|
@ -32,7 +32,7 @@ from typing import (
|
|||||||
TypeVar as _TypeVar,
|
TypeVar as _TypeVar,
|
||||||
Union as _Union,
|
Union as _Union,
|
||||||
)
|
)
|
||||||
from typing_extensions import ParamSpec as _ParamSpec
|
from typing_extensions import ParamSpec as _ParamSpec, TypeIs as _TypeIs
|
||||||
|
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
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
|
# TODO(torch_deploy) figure out how to freeze version.py in fbcode build
|
||||||
if _running_with_deploy():
|
if _running_with_deploy():
|
||||||
__version__ = "torch-deploy-1.8"
|
__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:
|
else:
|
||||||
from typing_extensions import TypeIs as _TypeIs
|
|
||||||
|
|
||||||
from torch.torch_version import __version__ as __version__
|
from torch.torch_version import __version__ as __version__
|
||||||
|
|
||||||
__all__ = [
|
__all__ = [
|
||||||
|
Reference in New Issue
Block a user