Skip to content

Commit 4cf1ffb

Browse files
authored
Update pep503_whl_redirect to accomodate for rocm maj.min.patch version (#6071)
I am seeing validation error here: https://github.com/pytorch/test-infra/actions/runs/12357596722/job/34504501590#step:14:2563 Executing: ```pip3 install --force-reinstall torch --index-url https://download.pytorch.org/whl/test/rocm6.2.4``` does not work, accessing https://download.pytorch.org/whl/test/6.2.4 does not work either
1 parent 1909bf4 commit 4cf1ffb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

aws/websites/download.pytorch.org/pep503_whl_redirect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ function handler(event) {
33
var uri = request.uri;
44
var uri_parts = uri.split('/')
55
var last_uri_part = uri_parts[uri_parts.length -1]
6-
var rocm_pattern = /^rocm[0-9]+\.[0-9]+$/
6+
var rocm_pattern = /^rocm[0-9]+(\.[0-9]+)*$/
77

88
if (uri.startsWith('/whl')) {
99
// Check whether the URI is missing a file name.
1010
if (uri.endsWith('/')) {
1111
request.uri += 'index.html';
1212
// Check whether the URI is folder like
13-
// I.e. does not have dots in path or rocm\d.\d or 1.8 (for lts)
13+
// I.e. does not have dots in path or rocm\d.\d or rocm\d.\d.\d or 1.8 (for lts)
1414
// For example /whl/cpu/torch
1515
} else if (last_uri_part.indexOf('.') == -1
1616
|| last_uri_part.match(rocm_pattern)

0 commit comments

Comments
 (0)