Skip to content

/AWS1/IF_SGM=>CREATEAIBENCHMARKJOB()

About CreateAIBenchmarkJob

Creates a benchmark job that runs performance benchmarks against inference infrastructure using a predefined AI workload configuration. The benchmark job measures metrics such as latency, throughput, and cost for your generative AI inference endpoints.

Method Signature

METHODS /AWS1/IF_SGM~CREATEAIBENCHMARKJOB
  IMPORTING
    !IV_AIBENCHMARKJOBNAME TYPE /AWS1/SGMAIENTITYNAME OPTIONAL
    !IO_BENCHMARKTARGET TYPE REF TO /AWS1/CL_SGMAIBENCHMARKTARGET OPTIONAL
    !IO_OUTPUTCONFIG TYPE REF TO /AWS1/CL_SGMAIBENCHOUTPUTCFG OPTIONAL
    !IV_AIWORKLOADCONFIGID TYPE /AWS1/SGMAIRESOURCEIDENTIFIER OPTIONAL
    !IV_ROLEARN TYPE /AWS1/SGMROLEARN OPTIONAL
    !IO_NETWORKCONFIG TYPE REF TO /AWS1/CL_SGMAIBENCHNETCONFIG OPTIONAL
    !IT_TAGS TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_sgmcreaibenchjobrsp
  RAISING
    /AWS1/CX_SGMRESOURCEINUSE
    /AWS1/CX_SGMRESOURCELIMITEXCD
    /AWS1/CX_SGMRESOURCENOTFOUND
    /AWS1/CX_SGMCLIENTEXC
    /AWS1/CX_SGMSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_aibenchmarkjobname TYPE /AWS1/SGMAIENTITYNAME /AWS1/SGMAIENTITYNAME

The name of the AI benchmark job. The name must be unique within your Amazon Web Services account in the current Amazon Web Services Region.

io_benchmarktarget TYPE REF TO /AWS1/CL_SGMAIBENCHMARKTARGET /AWS1/CL_SGMAIBENCHMARKTARGET

The target endpoint to benchmark. Specify a SageMaker endpoint by providing its name or Amazon Resource Name (ARN).

io_outputconfig TYPE REF TO /AWS1/CL_SGMAIBENCHOUTPUTCFG /AWS1/CL_SGMAIBENCHOUTPUTCFG

The output configuration for the benchmark job, including the Amazon S3 location where benchmark results are stored.

iv_aiworkloadconfigid TYPE /AWS1/SGMAIRESOURCEIDENTIFIER /AWS1/SGMAIRESOURCEIDENTIFIER

The name or Amazon Resource Name (ARN) of the AI workload configuration to use for this benchmark job.

iv_rolearn TYPE /AWS1/SGMROLEARN /AWS1/SGMROLEARN

The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker AI to perform tasks on your behalf.

Optional arguments:

io_networkconfig TYPE REF TO /AWS1/CL_SGMAIBENCHNETCONFIG /AWS1/CL_SGMAIBENCHNETCONFIG

The network configuration for the benchmark job, including VPC settings.

it_tags TYPE /AWS1/CL_SGMTAG=>TT_TAGLIST TT_TAGLIST

The metadata that you apply to Amazon Web Services resources to help you categorize and organize them. Each tag consists of a key and a value, both of which you define.

RETURNING

oo_output TYPE REF TO /aws1/cl_sgmcreaibenchjobrsp /AWS1/CL_SGMCREAIBENCHJOBRSP

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->createaibenchmarkjob(
  io_benchmarktarget = new /aws1/cl_sgmaibenchmarktarget(
    io_endpoint = new /aws1/cl_sgmaibenchendpoint(
      it_inferencecomponents = VALUE /aws1/cl_sgmaibmkinfercomp=>tt_aibenchmarkinfrnccompntlist(
        ( new /aws1/cl_sgmaibmkinfercomp( |string| ) )
      )
      iv_identifier = |string|
      iv_targetcontainerhostname = |string|
    )
  )
  io_networkconfig = new /aws1/cl_sgmaibenchnetconfig(
    io_vpcconfig = new /aws1/cl_sgmvpcconfig(
      it_securitygroupids = VALUE /aws1/cl_sgmvpcsecgroupids_w=>tt_vpcsecuritygroupids(
        ( new /aws1/cl_sgmvpcsecgroupids_w( |string| ) )
      )
      it_subnets = VALUE /aws1/cl_sgmsubnets_w=>tt_subnets(
        ( new /aws1/cl_sgmsubnets_w( |string| ) )
      )
    )
  )
  io_outputconfig = new /aws1/cl_sgmaibenchoutputcfg(
    io_mlflowconfig = new /aws1/cl_sgmaimlflowconfig(
      iv_mlflowexperimentname = |string|
      iv_mlflowresourcearn = |string|
      iv_mlflowrunname = |string|
    )
    iv_s3outputlocation = |string|
  )
  it_tags = VALUE /aws1/cl_sgmtag=>tt_taglist(
    (
      new /aws1/cl_sgmtag(
        iv_key = |string|
        iv_value = |string|
      )
    )
  )
  iv_aibenchmarkjobname = |string|
  iv_aiworkloadconfigid = |string|
  iv_rolearn = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_aibenchmarkjobarn = lo_result->get_aibenchmarkjobarn( ).
ENDIF.