Search training plan offerings
To create a training plan, start by calling the SearchTrainingPlanOfferings
API operation, passing your plan
requirements (such as instance type, count, and desired time window) as input parameters.
Training plans are specific to their target resource. Ensure that you specify which target
resource the plan will be used for (training-job
or
hyperpod-cluster
). The API returns a list of available offerings that match
your requirements. If no suitable offerings are found, you may need to adjust your
requirements and search again.
This API call retrieves the training plan offerings that best meet your capacity needs.
Each TrainingPlanOffering
returned in the response is identified by a
unique offering ID. The first offering in the list represents the best match for your
requirements. If no suitable training plan is available within your specified dates, the
list is empty. Adjust your search criteria and look for a new set of offerings.
Important
You can use SageMaker training plans to reserve instances with the following reservation duration and instance quantity options.
-
Reservation durations are available in 1-day increments from 1 to 182 days.
-
The reservation instance quantity options are 1, 2, 4, 8, 16, 32 or 64 instances.
To learn about the list of available instances supported by SageMaker training plans, see Supported instance types and AWS Regions.
The following example uses an AWS CLI command to request training plan offerings with a specified instance type, count, and time information.
# 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.p5.48xlarge
" \ --instance-count4
\ --duration-hours96
\ --start-time-after "1727838000
" \ --end-time-before "1729709600
"
This JSON document is a sample response from the SageMaker training plans API. The response provides information about a single available training plan offering that matches the specified capacity requirements.
{ "TrainingPlanOfferings": [ { "CurrencyCode": "USD", "DurationHours": 96, "DurationMinutes": 0, "RequestedStartTimeAfter": "2024-09-27T18:00:00-07:00", "RequestedEndTimeBefore": "2024-11-23T17:00:00-07:00", "ReservedCapacityOfferings": [ { "AvailabilityZone": "us-east-1f", "DurationHours": 96, "EndTime": "2024-10-02T04:30:00-07:00", "InstanceType": "ml.p5.48xlarge", "InstanceCount": 4, "StartTime": "2024-09-28T04:30:00-07:00", } ], "TargetResources": "training-job", "TrainingPlanOfferingId": "tpo-
SHA-256-hash-value
", "UpfrontFee": "xxxx.xx", } ] }
The following sections define the mandatory and optional input request parameters for
the SearchTrainingPlanOfferings
API operation.
Required parameters
When calling the SearchTrainingPlanOfferings
API to list training plan offerings
that meet your requirements, you must provide the following values:
-
TargetResources
: The target resources (training-job
orhyperpod-cluster
) for which the plan will be used. The default value istraining-job
. Training plans are specific to their target resource.-
A training plan designed for SageMaker training jobs can only be used to schedule and run training jobs.
-
A training plan for HyperPod clusters can be used exclusively to provide compute resources to a cluster's instance group.
-
-
InstanceType
: The type of instance to provision. TheInstanceType
must be of a supported type.To learn about the list of available instances supported by SageMaker training plans, see Supported instance types and AWS Regions.
-
InstanceCount
: The number of instances to provision. If the number of instances is greater than 1, it should be a power of 2.
Optional parameters
The following sections provide details on some optional parameters that you can pass
to your SearchTrainingPlanOfferings
API request.
-
DurationHour
: The total duration of your requested plan in hours. TheDurationHour
is rounded up to the nearest multiple of 24. -
StartTimeAfter
: Specify the requested start time of the plan. TheStartTimeAfter
should be atimestamp
or anISO 8601 date/time
value in the future. -
EndTimeBefore
: Specify the requested end time of the plan in atimestamp
or anISO 8601 date/time
format. TheEndTimeBefore
should be at least 24 hours after the start time .