Skip to content

Commit a613b43

Browse files
Pin torch in various examples to avoid cuda version issues. (skypilot-org#1378)
* tutorial.rst: pin `torch` to avoid version issues. Tested: - Ran on both AWS and GCP. * Fixes two more yamls
1 parent 9c1b7d3 commit a613b43

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

docs/source/examples/spot-jobs.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ We can launch it with the following:
5454
git checkout v4.18.0
5555
pip install -e .
5656
cd examples/pytorch/question-answering/
57-
pip install -r requirements.txt
57+
pip install -r requirements.txt torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
5858
pip install wandb
5959
6060
run: |
@@ -215,4 +215,3 @@ you can still tear it down manually with
215215

216216
.. note::
217217
Tearing down the spot controller will lose all logs and status information for the spot jobs and can cause resource leakage when there are still in-progress spot jobs.
218-

docs/source/getting-started/tutorial.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ and the commands to run:
3131
3232
setup: |
3333
set -e # Exit if any command failed.
34-
conda install pytorch==1.12.1 cudatoolkit=11.3 -c pytorch -y
3534
git clone https://github.com/huggingface/transformers/ || true
3635
cd transformers
37-
pip3 install .
36+
pip install .
3837
cd examples/pytorch/text-classification
39-
pip3 install -r requirements.txt
38+
pip install -r requirements.txt torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
4039
4140
run: |
4241
set -e # Exit if any command failed.
4342
cd transformers/examples/pytorch/text-classification
44-
python3 run_glue.py \
43+
python run_glue.py \
4544
--model_name_or_path bert-base-cased \
4645
--dataset_name imdb \
4746
--do_train \

examples/spot/bert_qa.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ setup: |
2020
git checkout v4.18.0
2121
pip install -e .
2222
cd examples/pytorch/question-answering/
23-
pip install -r requirements.txt
23+
pip install -r requirements.txt torch==1.12.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
2424
pip install wandb
2525
2626
run: |

0 commit comments

Comments
 (0)