

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 取得 Amazon SageMaker AI Boto 3 用戶端
<a name="automatic-model-tuning-ex-client"></a>

匯入 Amazon SageMaker Python SDK 適用於 Python (Boto3) 的 AWS SDK和其他 Python 程式庫。在新的 Jupyter 筆記本中，將下列程式碼貼到第一個儲存格：

```
import sagemaker
import boto3

import numpy as np                                # For performing matrix operations and numerical processing
import pandas as pd                               # For manipulating tabular data
from time import gmtime, strftime
import os

region = boto3.Session().region_name
smclient = boto3.Session().client('sagemaker')
```

上述程式碼儲存格會定義 `region` 及 `smclient` 物件，您將藉此用來呼叫內建 XGBoost 演算法並設定 SageMaker AI 超參數調校任務。

## 後續步驟
<a name="automatic-model-tuning-ex-next-role"></a>

[取得 SageMaker AI 執行角色](automatic-model-tuning-ex-role.md)