

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# エンドポイントの設定と作成
<a name="clarify-online-explainability-create-endpoint"></a>

モデルに合わせて新しいエンドポイント設定を作成し、この設定を使用してエンドポイントを作成します。[事前チェックステップ](https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-online-explainability-precheck.html)で検証されたモデルコンテナを使用してエンドポイントを作成し、SageMaker Clarify オンライン説明可能性機能を有効にすることができます。

`sagemaker_client` オブジェクトを使用し、[CreateEndpointConfig](https://docs.aws.amazon.com//sagemaker/latest/APIReference/API_CreateEndpointConfig.html) API を使用してエンドポイントを作成します。`ExplainerConfig` パラメータ内のメンバー `ClarifyExplainerConfig` を次のように設定します。

```
sagemaker_client.create_endpoint_config(
    EndpointConfigName='name-of-your-endpoint-config',
    ExplainerConfig={
        'ClarifyExplainerConfig': {
            'EnableExplanations': '`true`',
            'InferenceConfig': {
                ...
            },
            'ShapConfig': {
                ...
            }
        },
    },
    ProductionVariants=[{
        'VariantName': 'AllTraffic',
        'ModelName': 'name-of-your-model',
        'InitialInstanceCount': 1,
        'InstanceType': 'ml.m5.xlarge',
    }]
     ...
)
sagemaker_client.create_endpoint(
    EndpointName='name-of-your-endpoint',
    EndpointConfigName='name-of-your-endpoint-config'
)
```

`sagemaker_client` オブジェクトへの最初の呼び出しにより、説明可能性機能が有効になった新しいエンドポイント設定が作成されます。2 回目の呼び出しでは、エンドポイント設定を使用してエンドポイントを起動します。

**注記**  
また、[SageMaker AI リアルタイム推論マルチモデルエンドポイント](https://docs.aws.amazon.com/sagemaker/latest/dg/multi-model-endpoints.html)の背後にある 1 つのコンテナに複数のモデルをホストし、SageMaker Clarify を使用してオンライン説明可能性を設定することもできます。