Amazon Lookout for Vision

2021/02/17 - Amazon Lookout for Vision - 2 updated api methods

Changes  Update lookoutvision client to latest version

StartModel (updated) Link ¶
Changes (response)
{'Status': {'HOSTED',
            'HOSTING_FAILED',
            'STARTING_HOSTING',
            'STOPPING_HOSTING',
            'SYSTEM_UPDATING'}}

Starts the running of the version of an Amazon Lookout for Vision model. Starting a model takes a while to complete. To check the current state of the model, use DescribeModel.

A model is ready to use when its status is HOSTED.

Once the model is running, you can detect custom labels in new images by calling DetectAnomalies.

This operation requires permissions to perform the lookoutvision:StartModel operation.

See also: AWS API Documentation

Request Syntax

client.start_model(
    ProjectName='string',
    ModelVersion='string',
    MinInferenceUnits=123,
    ClientToken='string'
)
type ProjectName:

string

param ProjectName:

[REQUIRED]

The name of the project that contains the model that you want to start.

type ModelVersion:

string

param ModelVersion:

[REQUIRED]

The version of the model that you want to start.

type MinInferenceUnits:

integer

param MinInferenceUnits:

[REQUIRED]

The minimum number of inference units to use. A single inference unit represents 1 hour of processing and can support up to 5 Transaction Pers Second (TPS). Use a higher number to increase the TPS throughput of your model. You are charged for the number of inference units that you use.

type ClientToken:

string

param ClientToken:

ClientToken is an idempotency token that ensures a call to StartModel completes only once. You choose the value to pass. For example, An issue, such as an network outage, might prevent you from getting a response from StartModel. In this case, safely retry your call to StartModel by using the same ClientToken parameter value. An error occurs if the other input parameters are not the same as in the first request. Using a different value for ClientToken is considered a new call to StartModel. An idempotency token is active for 8 hours.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'STARTING_HOSTING'|'HOSTED'|'HOSTING_FAILED'|'STOPPING_HOSTING'|'SYSTEM_UPDATING'
}

Response Structure

  • (dict) --

    • Status (string) --

      The current running status of the model.

StopModel (updated) Link ¶
Changes (response)
{'Status': {'HOSTED',
            'HOSTING_FAILED',
            'STARTING_HOSTING',
            'STOPPING_HOSTING',
            'SYSTEM_UPDATING'}}

Stops the hosting of a running model. The operation might take a while to complete. To check the current status, call DescribeModel.

After the model hosting stops, the Status of the model is TRAINED.

This operation requires permissions to perform the lookoutvision:StopModel operation.

See also: AWS API Documentation

Request Syntax

client.stop_model(
    ProjectName='string',
    ModelVersion='string',
    ClientToken='string'
)
type ProjectName:

string

param ProjectName:

[REQUIRED]

The name of the project that contains the model that you want to stop.

type ModelVersion:

string

param ModelVersion:

[REQUIRED]

The version of the model that you want to stop.

type ClientToken:

string

param ClientToken:

ClientToken is an idempotency token that ensures a call to StopModel completes only once. You choose the value to pass. For example, An issue, such as an network outage, might prevent you from getting a response from StopModel. In this case, safely retry your call to StopModel by using the same ClientToken parameter value. An error occurs if the other input parameters are not the same as in the first request. Using a different value for ClientToken is considered a new call to StopModel. An idempotency token is active for 8 hours.

This field is autopopulated if not provided.

rtype:

dict

returns:

Response Syntax

{
    'Status': 'STARTING_HOSTING'|'HOSTED'|'HOSTING_FAILED'|'STOPPING_HOSTING'|'SYSTEM_UPDATING'
}

Response Structure

  • (dict) --

    • Status (string) --

      The status of the model.