Skip to content

Commit 6f61647

Browse files
authored
Update Torch and TorchVision to more secure versions (#4830)
1 parent d642794 commit 6f61647

File tree

13 files changed

+14
-22
lines changed

13 files changed

+14
-22
lines changed

prepare_data/sm-ground_truth_rlhf_llm_finetuning.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"outputs": [],
5858
"source": [
5959
"!git clone https://github.com/CarperAI/trlx.git\n",
60-
"!pip install torch==2.0.0 --extra-index-url https://download.pytorch.org/whl/cu116 # for cuda\n",
60+
"!pip install torch>=2.6.0 --extra-index-url https://download.pytorch.org/whl/cu116 # for cuda\n",
6161
"%cd trlx\n",
6262
"!git checkout 355c9741f2e606de796f5c6f9b682f7dd00f97c5\n",
6363
"!pip install -e .\n",

build_and_train_models/sm-training_compliler_single_node_single_gpu_bert/sm-training_compliler_single_node_single_gpu_bert.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@
9999
"execution_count": null,
100100
"metadata": {},
101101
"outputs": [],
102-
"source": [
103-
"!pip install \"sagemaker>=2.133.0\" botocore boto3 awscli s3fs typing-extensions \"torch==1.12.0\" --upgrade"
104-
]
102+
"source": "!pip install \"sagemaker>=2.133.0\" botocore boto3 awscli s3fs typing-extensions \"torch>=2.6.0\" --upgrade"
105103
},
106104
{
107105
"cell_type": "code",

deploy_and_monitor/sm-batch_transform_with_torchserve/docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN cd /tmp \
2626
&& python3 get-pip.py
2727

2828
RUN python -m pip install --no-cache-dir torchserve
29-
RUN python -m pip install --no-cache-dir torch==1.7.1
29+
RUN python -m pip install --no-cache-dir torch>=2.6.0
3030

3131
COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
3232
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh

deploy_and_monitor/sm-mme_with_torchserve/sm-mme_with_torchserve.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,7 @@
241241
"id": "aa1bdc87",
242242
"metadata": {},
243243
"outputs": [],
244-
"source": [
245-
"!pip install -U torch==2.2.0 diffusers==0.13.0 transformers"
246-
]
244+
"source": "!pip install -U torch>=2.6.0 diffusers==0.13.0 transformers"
247245
},
248246
{
249247
"cell_type": "code",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
transformers==4.40.0
2-
torch==2.2.0
2+
torch>=2.6.0
33
pandas

responsible_ai/sm-clarify_text_explainability_text_sentiment_analysis/sm-clarify_text_explainability_text_sentiment_analysis.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
},
116116
"outputs": [],
117117
"source": [
118-
"!pip install \"torch==2.2.0\" --upgrade --quiet\n",
118+
"!pip install \"torch>=2.6.0\" --upgrade --quiet\n",
119119
"!pip install captum --upgrade --quiet"
120120
]
121121
},

archived/albert-base-v2/albert-base-v2.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@
7979
"execution_count": null,
8080
"metadata": {},
8181
"outputs": [],
82-
"source": [
83-
"!pip install botocore boto3 awscli s3fs typing-extensions pandas numpy \"sagemaker>=2.133.0\" \"torch==1.12.0\" --upgrade"
84-
]
82+
"source": "!pip install botocore boto3 awscli s3fs typing-extensions pandas numpy \"sagemaker>=2.133.0\" \"torch>=2.6.0\" --upgrade"
8583
},
8684
{
8785
"cell_type": "code",

archived/deploy_huggingface_model_on_Inf1_instance/inf1_bert_compile_and_deploy.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"!pip install -U transformers==4.15.0\n",
6666
"!pip install -U sagemaker\n",
6767
"# In this example, we are using torch 1.9 which is the latest torch version Neo supports for inferentia target\n",
68-
"!pip install -U torch==1.9.1\n",
68+
"!pip install -U torch>=2.6.0\n",
6969
"!pip install -U sagemaker"
7070
]
7171
},

archived/nlp_score_dashboard_sec/sec-dashboard/SEC_Section_Extraction_Functions.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"source": [
4747
"# %%capture\n",
4848
"!pip install transformers==4.11.3 --ignore-installed ruamel-yaml\n",
49-
"!pip install torch==1.9.1 --no-cache-dir\n",
49+
"!pip install torch>=2.6.0--no-cache-dir\n",
5050
"!pip install altair==4.1.0\n",
5151
"!pip install vega==3.5.0"
5252
]

archived/pytorch_mnist_elastic_inference.ipynb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,7 @@
9090
"scrolled": true
9191
},
9292
"outputs": [],
93-
"source": [
94-
"pip install torchvision==0.5.0 --no-cache-dir"
95-
]
93+
"source": "pip install torch>=2.6.0 --no-cache-dir"
9694
},
9795
{
9896
"cell_type": "code",

0 commit comments

Comments
 (0)