Skip to content

/AWS1/CL_SGM=>CREATETRAININGPLAN()

About CreateTrainingPlan

Creates a new training plan in SageMaker to reserve compute capacity.

Amazon SageMaker Training Plan is a capability within SageMaker that allows customers to reserve and manage GPU capacity for large-scale AI model training. It provides a way to secure predictable access to computational resources within specific timelines and budgets, without the need to manage underlying infrastructure.

How it works

Plans can be created for specific resources such as SageMaker Training Jobs or SageMaker HyperPod clusters, automatically provisioning resources, setting up infrastructure, executing workloads, and handling infrastructure failures.

Plan creation workflow

  • Users search for available plan offerings based on their requirements (e.g., instance type, count, start time, duration) using the SearchTrainingPlanOfferings API operation.

  • They create a plan that best matches their needs using the ID of the plan offering they want to use.

  • After successful upfront payment, the plan's status becomes Scheduled.

  • The plan can be used to:

    • Queue training jobs.

    • Allocate to an instance group of a SageMaker HyperPod cluster.

  • When the plan start date arrives, it becomes Active. Based on available reserved capacity:

    • Training jobs are launched.

    • Instance groups are provisioned.

Plan composition

A plan can consist of one or more Reserved Capacities, each defined by a specific instance type, quantity, Availability Zone, duration, and start and end times. For more information about Reserved Capacity, see ReservedCapacitySummary .

Method Signature

IMPORTING

Required arguments:

iv_trainingplanname TYPE /AWS1/SGMTRAININGPLANNAME /AWS1/SGMTRAININGPLANNAME

The name of the training plan to create.

iv_trainingplanofferingid TYPE /AWS1/SGMTRNPLANOFFERINGID /AWS1/SGMTRNPLANOFFERINGID

The unique identifier of the training plan offering to use for creating this plan.

Optional arguments:

it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST

An array of key-value pairs to apply to this training plan.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmcreatetrnplanrsp /AWS1/CL_SGMCREATETRNPLANRSP

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->/aws1/if_sgm~createtrainingplan(
  it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
    (
      new /aws1/cl_sgmtag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_trainingplanname = |string|
  iv_trainingplanofferingid = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_trainingplanarn = lo_result->get_trainingplanarn( ).
ENDIF.