@@ -181,7 +181,7 @@ setup_pip_pytorch_version() {
181181 if [[ -z " $PYTORCH_VERSION " ]]; then
182182 # Install latest prerelease version of torch, per our nightlies, consistent
183183 # with the requested cuda version
184- pip_install --pre torch -f " https://download.pytorch.org/whl/nightly /${WHEEL_DIR} torch_nightly .html"
184+ pip_install --pre torch -f " https://download.pytorch.org/whl/test /${WHEEL_DIR} torch_test .html"
185185 # CUDA and CPU are ABI compatible on the CPU-only parts, so strip
186186 # in this case
187187 export PYTORCH_VERSION=" $( pip show torch | grep ^Version: | sed ' s/Version: *//' | sed ' s/+.\+//' ) "
@@ -191,7 +191,7 @@ setup_pip_pytorch_version() {
191191 -f " https://download.pytorch.org/whl/${UPLOAD_CHANNEL} /torch_${UPLOAD_CHANNEL} .html"
192192 fi
193193 if [[ -z " $TORCHDATA_VERSION " ]]; then
194- pip_install --pre torchdata -f " https://download.pytorch.org/whl/nightly /cpu/torch_nightly .html"
194+ pip_install --pre torchdata -f " https://download.pytorch.org/whl/test /cpu/torch_test .html"
195195 export TORCHDATA_VERSION=" $( pip show torchdata | grep ^Version: | sed ' s/Version: *//' | sed ' s/+.\+//' ) "
196196 else
197197 pip_install " torchdata==$TORCHDATA_VERSION " \
@@ -207,13 +207,13 @@ setup_pip_pytorch_version() {
207207setup_conda_pytorch_constraint () {
208208 CONDA_CHANNEL_FLAGS=${CONDA_CHANNEL_FLAGS:- }
209209 if [[ -z " $PYTORCH_VERSION " ]]; then
210- export CONDA_CHANNEL_FLAGS=" ${CONDA_CHANNEL_FLAGS} -c pytorch-nightly "
210+ export CONDA_CHANNEL_FLAGS=" ${CONDA_CHANNEL_FLAGS} -c pytorch-${UPLOAD_CHANNEL} "
211211 PYTHON=" python"
212212 # Check if we have python 3 instead and prefer that
213213 if python3 --version > /dev/null 2> /dev/null; then
214214 PYTHON=" python3"
215215 fi
216- export PYTORCH_VERSION=" $( conda search --json ' pytorch[channel=pytorch-nightly] ' | ${PYTHON} -c " import sys, json, re; print(re.sub(r'\\ +.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))" ) "
216+ export PYTORCH_VERSION=" $( conda search --json pytorch[channel= pytorch-${UPLOAD_CHANNEL} ] | ${PYTHON} -c " import sys, json, re; print(re.sub(r'\\ +.*$', '', json.load(sys.stdin)['pytorch'][-1]['version']))" ) "
217217 else
218218 export CONDA_CHANNEL_FLAGS=" ${CONDA_CHANNEL_FLAGS} -c pytorch -c pytorch-${UPLOAD_CHANNEL} "
219219 fi
@@ -233,7 +233,7 @@ setup_conda_pytorch_constraint() {
233233 fi
234234 fi
235235 if [[ -z " $TORCHDATA_VERSION " ]]; then
236- export TORCHDATA_VERSION=" $( conda search --json ' torchdata[channel=pytorch-nightly ]' | ${PYTHON} -c " import sys, json, re; print(re.sub(r'\\ +.*$', '', json.load(sys.stdin)['torchdata'][-1]['version']))" ) "
236+ export TORCHDATA_VERSION=" $( conda search --json ' torchdata[channel=pytorch-test ]' | ${PYTHON} -c " import sys, json, re; print(re.sub(r'\\ +.*$', '', json.load(sys.stdin)['torchdata'][-1]['version']))" ) "
237237 fi
238238 export CONDA_TORCHDATA_CONSTRAINT=" - torchdata==$TORCHDATA_VERSION "
239239}
0 commit comments