

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

# トレーニングプランの提供内容を検索する
<a name="search-training-plan-offerings-api-cli-sdk"></a>

トレーニングプランを作成するには、まず [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SearchTrainingPlanOfferings.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SearchTrainingPlanOfferings.html) API オペレーションを呼び出し、プランの要件 (インスタンスタイプ、カウント、希望する期間など) を入力パラメータとして渡します。トレーニングプランはターゲットリソースに固有です。プランを使用するターゲットリソース (`training-job` または `hyperpod-cluster`) は必ず指定します。API は、要件に一致する利用可能なサービスのリストを返します。適切な提供内容が見つからない場合は、要件を調整して再度検索する必要がある場合があります。

この API コールは、キャパシティのニーズに最適なトレーニングプランサービスを取得します。レスポンスで返される各 [https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_TrainingPlanOffering.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_TrainingPlanOffering.html) は、一意の提供内容 ID によって識別されます。リストの最初の提供内容は、要件に最適な内容です。指定された日付内に適切なトレーニングプランが利用できない場合、空のリストが表示されます。検索条件を調整し、新しいサービスセットを探します。
+ 予約期間は 1～182 日間で 1 日単位で利用できます。
+ 予約インスタンスの数量オプションは、1、2、4、8、16、32、64 です。

SageMaker トレーニングプランでサポートされている使用可能なインスタンスのリストについては、「[サポートされているインスタンスタイプ AWS リージョン、および料金](reserve-capacity-with-training-plans.md#training-plans-supported-instances-and-regions)」を参照してください。

次の の例では、 AWS CLI コマンドを使用して、指定されたインスタンスタイプ、カウント、時間情報を含むトレーニングプランサービスをリクエストします。

```
# List training plan offerings with instance type, instance count, duration in hours, start time after, and end time before.
aws sagemaker search-training-plan-offerings \
--target-resources "training-job" \
--instance-type "ml.p4d.24xlarge" \
--instance-count 1 \
--duration-hours 15 \
--start-time-after "1737484800"
--end-time-before "1737657600"
```

この JSON ドキュメントは、SageMaker トレーニングプラン API からのサンプルレスポンスです。レスポンスは、指定されたキャパシティ要件に一致する複数の利用可能なトレーニングプランの提供に関する情報を提供します。これには、期間、前払い料金、開始/終了時間が異なる 3 つの異なるサービスが含まれており、すべて同じインスタンスタイプを使用し、トレーニングジョブを対象としています。

```
{
    "TrainingPlanOfferings": [
        {
            "TrainingPlanOfferingId": "tpo-SHA-256-hash-value",
            "TargetResources": [
                "training-job"
            ],
            "RequestedStartTimeAfter": "2025-01-21T11:08:27.704000-08:00",
            "DurationHours": 15,
            "DurationMinutes": 51,
            "UpfrontFee": "xxxx.xx",
            "CurrencyCode": "USD",
            "ReservedCapacityOfferings": [
                {
                    "InstanceType": "ml.p4d.24xlarge",
                    "InstanceCount": 1,
                    "AvailabilityZone": "us-west-2a",
                    "DurationHours": 15,
                    "DurationMinutes": 51,
                    "StartTime": "2025-01-21T11:39:00-08:00",
                    "EndTime": "2025-01-22T03:30:00-08:00"
                }
            ]
        },
        {
            "TrainingPlanOfferingId": "tpo-SHA-256-hash-value",
            "TargetResources": [
                "training-job"
            ],
            "RequestedStartTimeAfter": "2025-01-21T11:08:27.704000-08:00",
            "DurationHours": 39,
            "DurationMinutes": 51,
            "UpfrontFee": "xxxx.xx",
            "CurrencyCode": "USD",
            "ReservedCapacityOfferings": [
                {
                    "InstanceType": "ml.p4d.24xlarge",
                    "InstanceCount": 1,
                    "AvailabilityZone": "us-west-2a",
                    "DurationHours": 39,
                    "DurationMinutes": 51,
                    "StartTime": "2025-01-21T11:39:00-08:00",
                    "EndTime": "2025-01-23T03:30:00-08:00"
                }
            ]
        },
        {
            "TrainingPlanOfferingId": "tpo-SHA-256-hash-value",
            "TargetResources": [
                "training-job"
            ],
            "RequestedStartTimeAfter": "2025-01-21T11:08:27.704000-08:00",
            "DurationHours": 24,
            "DurationMinutes": 0,
            "UpfrontFee": "xxxx.xx",
            "CurrencyCode": "USD",
            "ReservedCapacityOfferings": [
                {
                    "InstanceType": "ml.p4d.24xlarge",
                    "InstanceCount": 1,
                    "AvailabilityZone": "us-west-2a",
                    "DurationHours": 24,
                    "DurationMinutes": 0,
                    "StartTime": "2025-01-22T03:30:00-08:00",
                    "EndTime": "2025-01-23T03:30:00-08:00"
                }
            ]
        }
    ]
}
```

以下は、 を使用して UltraServers を含むトレーニングプランサービス AWS CLI を検索する方法のサンプルコマンドです。

```
aws sagemaker search-training-plan-offerings \
--ultra-server-type ml.c6i-32xlargesc \
--ultra-server-count 1 \
--duration-hours 24 \
--target-resources hyperpod-cluster
--start-time-after "1737484800" \
--end-time-before "1737657600"
```

```
{
    "TrainingPlanOfferings": [
        {
            "TrainingPlanOfferingId": "tpo-SHA-256-hash-value",
            "TargetResources": [
                "training-job"
            ],
            "RequestedStartTimeAfter": "2025-07-21T16:59:25.760000+00:00",
            "DurationHours": 24,
            "DurationMinutes": 0,
            "UpfrontFee": "0.24",
            "CurrencyCode": "USD",
            "ReservedCapacityOfferings": [
                {
                    "ReservedCapacityType": "UltraServer",
                    "UltraServerType": "ml.u-p6e-gb200x72",
                    "UltraServerCount": 1,
                    "InstanceType": "ml.p6e-gb200.36xlarge",
                    "InstanceCount": 18,
                    "AvailabilityZone": "us-east-2a",
                    "DurationHours": 24,
                    "DurationMinutes": 0,
                    "StartTime": "2025-07-22T11:30:00+00:00",
                    "EndTime": "2025-07-23T11:30:00+00:00"
                }
            ]
        }
    ]
}
```

以下のセクションでは、時系列予測に使用される `SearchTrainingPlanOfferings` API の必須およびオプションの入力リクエストパラメータを定義します。

## 必須パラメータ
<a name="search-training-plan-options-required-params"></a>

[https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SearchTrainingPlanOfferings.html](https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_SearchTrainingPlanOfferings.html) API を呼び出して、要件を満たすトレーニングプランサービスを一覧表示する場合は、次の値を指定する必要があります。
+ `TargetResources`: プランが使用されるターゲットリソース (`training-job` または `hyperpod-cluster`)。デフォルト値は `training-job` です。トレーニングプランはターゲットリソースに固有です。
  + SageMaker トレーニングジョブ用に設計されたトレーニングプランは、トレーニングジョブのスケジュールと実行にのみ使用できます。
  + HyperPod クラスターのトレーニングプランは、クラスターのインスタンスグループにコンピューティングリソースを提供するためにのみ使用できます。
+ `InstanceType`: プロビジョンするインスタンスのタイプ。`InstanceType` はサポートされているタイプである必要があります。

  SageMaker トレーニングプランでサポートされている使用可能なインスタンスのリストについては、「[サポートされているインスタンスタイプ AWS リージョン、および料金](reserve-capacity-with-training-plans.md#training-plans-supported-instances-and-regions)」を参照してください。
+ `InstanceCount`: プロビジョンするインスタンス数。インスタンスの数が 1 より大きい場合は、2 の累乗である必要があります。
+ `DurationHour`: リクエストされたプランの合計時間数。`DurationHour` は、24 の最も近い倍数に切り上げられます。

## 任意指定のパラメータ
<a name="search-training-plan-options-optional-params"></a>

次のセクションでは、表形式データを使用する場合に `SearchTrainingPlanOfferings` API アクションに渡すことができるいくつかのオプションのパラメータの詳細を説明します。
+ `StartTimeAfter`: プランでリクエストする開始時刻を指定します。`StartTimeAfter` は、将来の `timestamp` または将来の `ISO 8601 date/time` の値にする必要があります。
+ `EndTimeBefore`: プランのリクエストされた終了時刻を `timestamp` または `ISO 8601 date/time` 形式で指定します。`EndTimeBefore` は、開始時刻 から 24 時間以上後とする必要があります。
+ `UltraServerType` : 検索する UltraServer のタイプを指定します。UltraServer の詳細については、「[SageMaker AI での UltraServer](reserve-capacity-with-training-plans.md#training-plans-ultraservers)」を参照してください。
+ `UltraServerCount`: 検索する UltraServer の数を指定します。