Skip to content

Commit b1bda18

Browse files
authored
[SageMaker] Add warning about SageMaker SDK v3 breaking changes (#2095)
* Add warning about SageMaker SDK v3 breaking changes * Update SageMaker SDK version in notebooks to avoid breaking changes in v3 * Add missing warnings about SageMaker SDK v3 breaking changes * Update warnings regarding SageMaker Python SDK
1 parent 8209c51 commit b1bda18

File tree

10 files changed

+57
-7
lines changed

10 files changed

+57
-7
lines changed

docs/sagemaker/notebooks/sagemaker-sdk/deploy-embedding-models/sagemaker-notebook.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,15 @@
5353
"metadata": {},
5454
"outputs": [],
5555
"source": [
56-
"!pip install \"sagemaker>=2.221.1\" --upgrade --quiet\n"
56+
"!pip install \"sagemaker<3.0.0\" --upgrade --quiet"
57+
]
58+
},
59+
{
60+
"cell_type": "markdown",
61+
"metadata": {},
62+
"source": [
63+
"> [!WARNING]\n",
64+
"> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install \"sagemaker<3.0.0\"`."
5765
]
5866
},
5967
{

docs/sagemaker/notebooks/sagemaker-sdk/deploy-llama-3-3-70b-inferentia2/sagemaker-notebook.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,15 @@
4646
"metadata": {},
4747
"outputs": [],
4848
"source": [
49-
"!pip install sagemaker --upgrade --quiet"
49+
"!pip install 'sagemaker<3.0.0' --upgrade --quiet"
50+
]
51+
},
52+
{
53+
"cell_type": "markdown",
54+
"metadata": {},
55+
"source": [
56+
"> [!WARNING]\n",
57+
"> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install \"sagemaker<3.0.0\"`."
5058
]
5159
},
5260
{

docs/sagemaker/notebooks/sagemaker-sdk/evaluate-llm-lighteval/sagemaker-notebook.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,15 @@
2525
"metadata": {},
2626
"outputs": [],
2727
"source": [
28-
"!pip install sagemaker --upgrade --quiet"
28+
"!pip install 'sagemaker<3.0.0' --upgrade --quiet"
29+
]
30+
},
31+
{
32+
"cell_type": "markdown",
33+
"metadata": {},
34+
"source": [
35+
"> [!WARNING]\n",
36+
"> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install \"sagemaker<3.0.0\"`."
2937
]
3038
},
3139
{

docs/sagemaker/notebooks/sagemaker-sdk/fine-tune-embedding-models/sagemaker-notebook.ipynb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,15 @@
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
42-
"!pip install transformers \"datasets[s3]==2.18.0\" \"sagemaker>=2.190.0\" \"huggingface_hub[cli]\" --upgrade --quiet"
42+
"!pip install transformers \"datasets[s3]==2.18.0\" \"sagemaker<3.0.0\" \"huggingface_hub[cli]\" --upgrade --quiet"
43+
]
44+
},
45+
{
46+
"cell_type": "markdown",
47+
"metadata": {},
48+
"source": [
49+
"> [!WARNING]\n",
50+
"> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install \"sagemaker<3.0.0\"`."
4351
]
4452
},
4553
{

docs/sagemaker/source/dlcs/available.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ Let's say you want to use the training DLC for GPUs in
7272

7373
The Python SagemMaker SDK util functions are not always up to date but it is much simpler than reconstructing the image URI yourself.
7474

75+
> [!WARNING]
76+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
77+
7578
```python
7679
from sagemaker.huggingface import HuggingFaceModel, get_huggingface_llm_image_uri
7780

docs/sagemaker/source/index.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ We develop new tools to simplify the adoption of custom AI accelerators like AWS
1212

1313
By combining Hugging Face's open-source models and libraries with AWS's scalable and secure cloud services, developers can more easily and affordably incorporate advanced AI capabilities into their applications.
1414

15+
> [!WARNING]
16+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
17+
1518
## Deploy models on AWS
1619

1720
Deploying Hugging Face models on AWS is streamlined through various services, each suited for different deployment scenarios. Here's how you can deploy your models using AWS and Hugging Face offerings.

docs/sagemaker/source/tutorials/jumpstart/jumpstart-quickstart.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ In this quickstart guide, we will deploy [Qwen/Qwen2.5-14B-Instruct](https://hug
1515
| SageMaker Studio domain and user profile | We recommend using SageMaker Studio for straightforward deployment and inference. Follow this [guide](https://docs.aws.amazon.com/sagemaker/latest/dg/onboard-quick-start.html). |
1616
| Service quotas | Most LLMs need GPU instances (e.g. ml.g5). Verify you have quota for `ml.g5.24xlarge` or [request it](https://docs.aws.amazon.com/sagemaker/latest/dg/canvas-requesting-quota-increases.html). |
1717

18+
> [!WARNING]
19+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
20+
1821
## 2· Endpoint deployment
1922

2023
Let's explain how you would deploy a Hugging Face model to SageMaker browsing through the Jumpstart catalog:

docs/sagemaker/source/tutorials/sagemaker-sdk/deploy-sagemaker-sdk.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,12 @@ To start training locally, you need to setup an appropriate [IAM role](https://d
3232
Upgrade to the latest `sagemaker` version.
3333

3434
```bash
35-
pip install sagemaker --upgrade
35+
pip install 'sagemaker<3.0.0'
3636
```
3737

38+
> [!WARNING]
39+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
40+
3841
**SageMaker environment**
3942

4043
Setup your SageMaker environment as shown below:

docs/sagemaker/source/tutorials/sagemaker-sdk/sagemaker-sdk-quickstart.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ The get started guide will show you how to quickly use Hugging Face on Amazon Sa
1111
Get started by installing the necessary Hugging Face libraries and SageMaker. You will also need to install [PyTorch](https://pytorch.org/get-started/locally/) if you don't already have it installed. If you run this example in SageMaker Studio, it is already installed in the notebook kernel!
1212

1313
```python
14-
pip install "sagemaker>=2.140.0" "transformers==4.26.1" "datasets[s3]==2.10.1" --upgrade
14+
pip install "sagemaker<3.0.0" "transformers==4.26.1" "datasets[s3]==2.10.1" --upgrade
1515
```
1616

17+
> [!WARNING]
18+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
19+
1720
If you want to run this example in [SageMaker Studio](https://docs.aws.amazon.com/sagemaker/latest/dg/studio.html), upgrade [ipywidgets](https://ipywidgets.readthedocs.io/en/latest/) for the 🤗 Datasets library and restart the kernel:
1821

1922
```python

docs/sagemaker/source/tutorials/sagemaker-sdk/training-sagemaker-sdk.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,12 @@ To start training locally, you need to setup an appropriate [IAM role](https://d
3030
Upgrade to the latest `sagemaker` version:
3131

3232
```bash
33-
pip install sagemaker --upgrade
33+
pip install 'sagemaker<3.0.0'
3434
```
3535

36+
> [!WARNING]
37+
> [SageMaker Python SDK v3 has been recently released](https://github.com/aws/sagemaker-python-sdk), so unless specified otherwise, all the documentation and tutorials are still using the [SageMaker Python SDK v2](https://github.com/aws/sagemaker-python-sdk/tree/master-v2). We are actively working on updating all the tutorials and examples, but in the meantime make sure to install the SageMaker SDK as `pip install "sagemaker<3.0.0"`.
38+
3639
**SageMaker environment**
3740

3841
Setup your SageMaker environment as shown below:

0 commit comments

Comments
 (0)