Skip to content

/AWS1/CL_CRL=>GETTRAINEDMODEL()

About GetTrainedModel

Returns information about a trained model.

Method Signature

IMPORTING

Required arguments:

iv_trainedmodelarn TYPE /AWS1/CRLTRAINEDMODELARN /AWS1/CRLTRAINEDMODELARN

The Amazon Resource Name (ARN) of the trained model that you are interested in.

iv_membershipidentifier TYPE /AWS1/CRLUUID /AWS1/CRLUUID

The membership ID of the member that created the trained model that you are interested in.

Optional arguments:

iv_versionidentifier TYPE /AWS1/CRLUUID /AWS1/CRLUUID

The version identifier of the trained model to retrieve. If not specified, the operation returns information about the latest version of the trained model.

RETURNING

oo_output TYPE REF TO /aws1/cl_crlgettrainedmodelrsp /AWS1/CL_CRLGETTRAINEDMODELRSP

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_crl~gettrainedmodel(
  iv_membershipidentifier = |string|
  iv_trainedmodelarn = |string|
  iv_versionidentifier = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lv_uuid = lo_result->get_membershipidentifier( ).
  lv_uuid = lo_result->get_collaborationidentifier( ).
  lv_trainedmodelarn = lo_result->get_trainedmodelarn( ).
  lv_uuid = lo_result->get_versionidentifier( ).
  LOOP AT lo_result->get_incrementaltrndatachnls( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_modeltrainingdatachanne = lo_row_1->get_channelname( ).
      lv_uuid = lo_row_1->get_versionidentifier( ).
      lv_namestring = lo_row_1->get_modelname( ).
    ENDIF.
  ENDLOOP.
  lv_namestring = lo_result->get_name( ).
  lv_resourcedescription = lo_result->get_description( ).
  lv_trainedmodelstatus = lo_result->get_status( ).
  lo_statusdetails = lo_result->get_statusdetails( ).
  IF lo_statusdetails IS NOT INITIAL.
    lv_string = lo_statusdetails->get_statuscode( ).
    lv_string = lo_statusdetails->get_message( ).
  ENDIF.
  lv_configuredmodelalgorith = lo_result->get_cfguredmdelalgassociat01( ).
  lo_resourceconfig = lo_result->get_resourceconfig( ).
  IF lo_resourceconfig IS NOT INITIAL.
    lv_integer = lo_resourceconfig->get_instancecount( ).
    lv_instancetype = lo_resourceconfig->get_instancetype( ).
    lv_integer = lo_resourceconfig->get_volumesizeingb( ).
  ENDIF.
  lv_traininginputmode = lo_result->get_traininginputmode( ).
  lo_stoppingcondition = lo_result->get_stoppingcondition( ).
  IF lo_stoppingcondition IS NOT INITIAL.
    lv_integer = lo_stoppingcondition->get_maxruntimeinseconds( ).
  ENDIF.
  lv_metricsstatus = lo_result->get_metricsstatus( ).
  lv_string = lo_result->get_metricsstatusdetails( ).
  lv_logsstatus = lo_result->get_logsstatus( ).
  lv_string = lo_result->get_logsstatusdetails( ).
  lv_string = lo_result->get_trncontainerimagedigest( ).
  lv_timestamp = lo_result->get_createtime( ).
  lv_timestamp = lo_result->get_updatetime( ).
  LOOP AT lo_result->get_hyperparameters( ) into ls_row_2.
    lv_key = ls_row_2-key.
    lo_value = ls_row_2-value.
    IF lo_value IS NOT INITIAL.
      lv_string = lo_value->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_environment( ) into ls_row_3.
    lv_key = ls_row_3-key.
    lo_value_1 = ls_row_3-value.
    IF lo_value_1 IS NOT INITIAL.
      lv_string = lo_value_1->get_value( ).
    ENDIF.
  ENDLOOP.
  lv_kmskeyarn = lo_result->get_kmskeyarn( ).
  LOOP AT lo_result->get_tags( ) into ls_row_4.
    lv_key_1 = ls_row_4-key.
    lo_value_2 = ls_row_4-value.
    IF lo_value_2 IS NOT INITIAL.
      lv_tagvalue = lo_value_2->get_value( ).
    ENDIF.
  ENDLOOP.
  LOOP AT lo_result->get_datachannels( ) into lo_row_5.
    lo_row_6 = lo_row_5.
    IF lo_row_6 IS NOT INITIAL.
      lv_mlinputchannelarn = lo_row_6->get_mlinputchannelarn( ).
      lv_modeltrainingdatachanne = lo_row_6->get_channelname( ).
      lv_s3datadistributiontype = lo_row_6->get_s3datadistributiontype( ).
    ENDIF.
  ENDLOOP.
ENDIF.