File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -198,19 +198,22 @@ def postprocessing(input, output):
198198
199199@contextlib .contextmanager
200200def patch_link_collection (computation_backends , channel ):
201- if channel == Channel .STABLE :
202- urls = ["https://download.pytorch.org/whl/torch_stable.html" ]
203- elif channel == Channel .LTS :
204- # TODO: expand this when there are more LTS versions
205- urls = ["https://download.pytorch.org/whl/lts/1.8/torch_lts.html" ]
206- else :
201+ if channel == channel != Channel .LTS :
202+ find_links = []
207203 # TODO: this template is not valid for all backends
208- urls = [
209- f"https://download.pytorch.org/whl/"
210- f"{ channel . name . lower () } / { backend } /torch_ { channel . name . lower () } .html "
204+ channel_path = f" { channel . name . lower () } /" if channel != Channel . STABLE else ""
205+ index_urls = [
206+ f"https://download.pytorch.org/whl/ { channel_path } { backend } "
211207 for backend in sorted (computation_backends )
212208 ]
213- search_scope = SearchScope .create (find_links = urls , index_urls = [])
209+ else :
210+ # TODO: expand this when there are more LTS versions
211+ # TODO: switch this to index_urls when
212+ # https://github.com/pytorch/pytorch/pull/74753 is resolved
213+ find_links = ["https://download.pytorch.org/whl/lts/1.8/torch_lts.html" ]
214+ index_urls = []
215+
216+ search_scope = SearchScope .create (find_links = find_links , index_urls = index_urls )
214217
215218 @contextlib .contextmanager
216219 def context (input ):
You can’t perform that action at this time.
0 commit comments