SageMaker / Client / update_model_monitor_config

update_model_monitor_config

SageMaker.Client.update_model_monitor_config(**kwargs)

Updates a model monitor configuration. Parameters that you don’t specify keep their current values. If another request modifies the configuration at the same time, you get a ConflictException.

The operation runs synchronously and is idempotent. If you retry the request with the same ClientToken, you get the result of the original request.

Note

This operation is in public preview release for Amazon SageMaker AI and is subject to change. This feature is not recommended for production environments.

See also: AWS API Documentation

Request Syntax

response = client.update_model_monitor_config(
    ModelMonitorConfigNameOrArn='string',
    EvaluationConfig={
        'EvalCriteria': {
            'EvalCriteriaArn': 'string',
            'EvalCriteriaVersion': 'string',
            'Sampling': {
                'SamplingPercentage': 123.0,
                'MaxRecords': 123
            }
        },
        'EvalCriteriaList': [
            {
                'EvalCriteriaArn': 'string',
                'EvalCriteriaVersion': 'string',
                'Sampling': {
                    'SamplingPercentage': 123.0,
                    'MaxRecords': 123
                }
            },
        ]
    },
    ScheduleConfig={
        'ScheduleExpression': 'string'
    },
    RoleArn='string',
    Enabled=True|False,
    ClientToken='string'
)
Parameters:
  • ModelMonitorConfigNameOrArn (string) –

    [REQUIRED]

    The name or Amazon Resource Name (ARN) of the model monitor configuration. Specify one of the following:

    • The name of the model monitor configuration.

    • The Amazon Resource Name (ARN) of the model monitor configuration.

  • EvaluationConfig (dict) –

    The evaluation monitoring settings. The settings that you specify replace the current evaluation settings. If you omit this parameter, the current value doesn’t change.

    Note

    This is a Tagged Union structure. Only one of the following top level keys can be set: EvalCriteria, EvalCriteriaList.

    • EvalCriteria (dict) –

      One Eval Criteria and its sampling settings.

      • EvalCriteriaArn (string) – [REQUIRED]

        The Amazon Resource Name (ARN) of the Eval Criteria, a SageMaker AI hub content resource. The ARN can end with a version in the form major.minor.patch.

      • EvalCriteriaVersion (string) –

        The version of the Eval Criteria, in the form major.minor.patch. Each part is 1 to 4 digits.

      • Sampling (dict) – [REQUIRED]

        The sampling settings that every evaluator under the Eval Criteria shares.

        • SamplingPercentage (float) – [REQUIRED]

          The percentage of traces to sample. Valid values are from 0.01 to 100.

        • MaxRecords (integer) –

          The maximum number of records to sample. Valid values are from 1 to 5000.

    • EvalCriteriaList (list) –

      A list of Eval Criteria, each with its own sampling settings.

      • (dict) –

        One Eval Criteria and the sampling settings that every evaluator under it shares.

        • EvalCriteriaArn (string) – [REQUIRED]

          The Amazon Resource Name (ARN) of the Eval Criteria, a SageMaker AI hub content resource. The ARN can end with a version in the form major.minor.patch.

        • EvalCriteriaVersion (string) –

          The version of the Eval Criteria, in the form major.minor.patch. Each part is 1 to 4 digits.

        • Sampling (dict) – [REQUIRED]

          The sampling settings that every evaluator under the Eval Criteria shares.

          • SamplingPercentage (float) – [REQUIRED]

            The percentage of traces to sample. Valid values are from 0.01 to 100.

          • MaxRecords (integer) –

            The maximum number of records to sample. Valid values are from 1 to 5000.

  • ScheduleConfig (dict) –

    The schedule on which the model monitor configuration runs. If you omit this parameter, the current value doesn’t change.

    • ScheduleExpression (string) – [REQUIRED]

      The schedule expression for the model monitor configuration.

  • RoleArn (string) – The Amazon Resource Name (ARN) of the IAM role that the model monitor configuration uses. If you omit this parameter, the current value doesn’t change.

  • Enabled (boolean) –

    Specifies whether the model monitor configuration is enabled. Use this parameter to pause or resume the configuration.

    • true - Resume the configuration. The status becomes Active, and the configuration runs on its schedule.

    • false - Pause the configuration. The status becomes Inactive. The configuration keeps its schedule but doesn’t run.

    If you omit this parameter, the configuration stays enabled or disabled as it is. You can enable or disable a configuration only when its status is Active or Inactive. Otherwise, you get a ConflictException.

  • ClientToken (string) –

    A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry a request with the same client token, you get the result of the original request and no error.

    This field is autopopulated if not provided.

Return type:

dict

Returns:

Response Syntax

{
    'ModelMonitorConfigArn': 'string',
    'Version': 123,
    'Status': 'Creating'|'Active'|'Inactive'|'Updating'|'Deleting'|'Failed'|'DeleteFailed'
}

Response Structure

  • (dict) –

    • ModelMonitorConfigArn (string) –

      The Amazon Resource Name (ARN) of the model monitor configuration.

    • Version (integer) –

      The version of the model monitor configuration after the update is applied.

    • Status (string) –

      The status of the model monitor configuration after the update is applied: Active if the configuration is enabled, or Inactive if it’s disabled. Use this field to confirm that a pause or resume took effect.

Exceptions