Amazon Augmented AI Runtime

2019/12/03 - Amazon Augmented AI Runtime - 5 new api methods

Changes  This release adds support for Amazon Augmented AI, which makes it easy to build workflows for human review of machine learning predictions.

DeleteHumanLoop (new) Link ¶

Deletes the specified human loop for a flow definition.

See also: AWS API Documentation

Request Syntax

client.delete_human_loop(
    HumanLoopName='string'
)
type HumanLoopName

string

param HumanLoopName

[REQUIRED]

The name of the human loop you want to delete.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

StopHumanLoop (new) Link ¶

Stops the specified human loop.

See also: AWS API Documentation

Request Syntax

client.stop_human_loop(
    HumanLoopName='string'
)
type HumanLoopName

string

param HumanLoopName

[REQUIRED]

The name of the human loop you want to stop.

rtype

dict

returns

Response Syntax

{}

Response Structure

  • (dict) --

StartHumanLoop (new) Link ¶

Starts a human loop, provided that at least one activation condition is met.

See also: AWS API Documentation

Request Syntax

client.start_human_loop(
    HumanLoopName='string',
    FlowDefinitionArn='string',
    HumanLoopInput={
        'InputContent': 'string'
    },
    DataAttributes={
        'ContentClassifiers': [
            'FreeOfPersonallyIdentifiableInformation'|'FreeOfAdultContent',
        ]
    }
)
type HumanLoopName

string

param HumanLoopName

[REQUIRED]

The name of the human loop.

type FlowDefinitionArn

string

param FlowDefinitionArn

[REQUIRED]

The Amazon Resource Name (ARN) of the flow definition.

type HumanLoopInput

dict

param HumanLoopInput

[REQUIRED]

An object containing information about the human loop.

  • InputContent (string) -- [REQUIRED]

    Serialized input from the human loop.

type DataAttributes

dict

param DataAttributes

Attributes of the data specified by the customer.

  • ContentClassifiers (list) -- [REQUIRED]

    Declares that your content is free of personally identifiable information or adult content. Amazon SageMaker may restrict the Amazon Mechanical Turk workers that can view your task based on this information.

    • (string) --

rtype

dict

returns

Response Syntax

{
    'HumanLoopArn': 'string',
    'HumanLoopActivationResults': {
        'HumanLoopActivationReason': {
            'ConditionsMatched': True|False
        },
        'HumanLoopActivationConditionsEvaluationResults': 'string'
    }
}

Response Structure

  • (dict) --

    • HumanLoopArn (string) --

      The Amazon Resource Name (ARN) of the human loop.

    • HumanLoopActivationResults (dict) --

      An object containing information about the human loop activation.

      • HumanLoopActivationReason (dict) --

        An object containing information about why a human loop was triggered.

        • ConditionsMatched (boolean) --

          True if the specified conditions were matched to trigger the human loop.

      • HumanLoopActivationConditionsEvaluationResults (string) --

        A copy of the human loop activation conditions of the flow definition, augmented with the results of evaluating those conditions on the input provided to the StartHumanLoop operation.

ListHumanLoops (new) Link ¶

Returns information about human loops, given the specified parameters.

See also: AWS API Documentation

Request Syntax

client.list_human_loops(
    CreationTimeAfter=datetime(2015, 1, 1),
    CreationTimeBefore=datetime(2015, 1, 1),
    SortOrder='Ascending'|'Descending',
    NextToken='string',
    MaxResults=123
)
type CreationTimeAfter

datetime

param CreationTimeAfter

(Optional) The timestamp of the date when you want the human loops to begin. For example, 1551000000 .

type CreationTimeBefore

datetime

param CreationTimeBefore

(Optional) The timestamp of the date before which you want the human loops to begin. For example, 1550000000 .

type SortOrder

string

param SortOrder

An optional value that specifies whether you want the results sorted in Ascending or Descending order.

type NextToken

string

param NextToken

A token to resume pagination.

type MaxResults

integer

param MaxResults

The total number of items to return. If the total number of available items is more than the value specified in MaxResults , then a NextToken will be provided in the output that you can use to resume pagination.

rtype

dict

returns

Response Syntax

{
    'HumanLoopSummaries': [
        {
            'HumanLoopName': 'string',
            'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping',
            'CreationTime': datetime(2015, 1, 1),
            'FailureReason': 'string',
            'FlowDefinitionArn': 'string'
        },
    ],
    'NextToken': 'string'
}

Response Structure

  • (dict) --

    • HumanLoopSummaries (list) --

      An array of objects containing information about the human loops.

      • (dict) --

        Summary information about the human loop.

        • HumanLoopName (string) --

          The name of the human loop.

        • HumanLoopStatus (string) --

          The status of the human loop. Valid values:

        • CreationTime (datetime) --

          When Amazon Augmented AI created the human loop.

        • FailureReason (string) --

          The reason why the human loop failed. A failure reason is returned only when the status of the human loop is Failed .

        • FlowDefinitionArn (string) --

          The Amazon Resource Name (ARN) of the flow definition.

    • NextToken (string) --

      A token to resume pagination.

DescribeHumanLoop (new) Link ¶

Returns information about the specified human loop.

See also: AWS API Documentation

Request Syntax

client.describe_human_loop(
    HumanLoopName='string'
)
type HumanLoopName

string

param HumanLoopName

[REQUIRED]

The name of the human loop.

rtype

dict

returns

Response Syntax

{
    'CreationTimestamp': datetime(2015, 1, 1),
    'FailureReason': 'string',
    'FailureCode': 'string',
    'HumanLoopStatus': 'InProgress'|'Failed'|'Completed'|'Stopped'|'Stopping',
    'HumanLoopName': 'string',
    'HumanLoopArn': 'string',
    'FlowDefinitionArn': 'string',
    'HumanLoopInput': {
        'InputContent': 'string'
    },
    'HumanLoopOutput': {
        'OutputS3Uri': 'string'
    }
}

Response Structure

  • (dict) --

    • CreationTimestamp (datetime) --

      The timestamp when Amazon Augmented AI created the human loop.

    • FailureReason (string) --

      The reason why a human loop has failed. The failure reason is returned when the human loop status is Failed .

    • FailureCode (string) --

      A failure code denoting a specific type of failure.

    • HumanLoopStatus (string) --

      The status of the human loop. Valid values:

    • HumanLoopName (string) --

      The name of the human loop.

    • HumanLoopArn (string) --

      The Amazon Resource Name (ARN) of the human loop.

    • FlowDefinitionArn (string) --

      The Amazon Resource Name (ARN) of the flow definition.

    • HumanLoopInput (dict) --

      An object containing information about the human loop input.

      • InputContent (string) --

        Serialized input from the human loop.

    • HumanLoopOutput (dict) --

      An object containing information about the output of the human loop.

      • OutputS3Uri (string) --

        The location of the Amazon S3 object where Amazon Augmented AI stores your human loop output. The output is stored at the following location: s3://S3OutputPath/HumanLoopName/CreationTime/output.json .