

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 获取 Amazon SageMaker AI Boto 3 客户端
<a name="automatic-model-tuning-ex-client"></a>

导入 Amaz SageMaker on Python 软件开发工具包和其他 Python 库。 适用于 Python (Boto3) 的 AWS SDK在新的 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`将用于调用内置 XGBoost 算法和设置 SageMaker AI 超参数调整作业的`smclient`对象。

## 下一个步骤
<a name="automatic-model-tuning-ex-next-role"></a>

[获取 A SageMaker I 执行角色](automatic-model-tuning-ex-role.md)