@@ -61,7 +61,7 @@ def find_links(
6161 ``"cpu"`` or ``"cu102"``. Defaults to the available hardware of the running
6262 system.
6363 channel: Channel of the PyTorch wheels. Can be one of ``"stable"`` (default),
64- ``"test"``, and ``"nightly"``.
64+ ``"lts"``, ``" test"``, and ``"nightly"``.
6565 platform: Platform, for example ``"linux_x86_64"`` or ``"win_amd64"``. Defaults
6666 to the platform of the running system.
6767 python_version: Python version, for example ``"3"`` or ``"3.7"``. Defaults to
@@ -78,9 +78,9 @@ def find_links(
7878 else :
7979 computation_backends = set (computation_backends )
8080
81- if channel not in ("stable" , "test" , "nightly" ):
81+ if channel not in ("stable" , "lts" , " test" , "nightly" ):
8282 raise ValueError (
83- f"channel can be one of 'stable', 'test', or 'nightly', "
83+ f"channel can be one of 'stable', 'lts', ' test', or 'nightly', "
8484 f"but got { channel } instead."
8585 )
8686
@@ -276,6 +276,8 @@ def __init__(
276276 super ().__init__ (* args , ** kwargs )
277277 if channel == "stable" :
278278 urls = ["https://download.pytorch.org/whl/torch_stable.html" ]
279+ elif channel == "lts" :
280+ urls = ["https://download.pytorch.org/whl/lts/1.8/torch_lts.html" ]
279281 else :
280282 urls = [
281283 f"https://download.pytorch.org/whl/"
0 commit comments