libZSservicesZSamazonka-sagemakerZSamazonka-sagemaker
Copyright(c) 2013-2021 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay+amazonka@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone

Amazonka.SageMaker.CreateCompilationJob

Description

Starts a model compilation job. After the model has been compiled, Amazon SageMaker saves the resulting model artifacts to an Amazon Simple Storage Service (Amazon S3) bucket that you specify.

If you choose to host your model using Amazon SageMaker hosting services, you can use the resulting model artifacts as part of the model. You can also use the artifacts with Amazon Web Services IoT Greengrass. In that case, deploy them as an ML resource.

In the request body, you provide the following:

  • A name for the compilation job
  • Information about the input model artifacts
  • The output location for the compiled model and the device (target) that the model runs on
  • The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform the model compilation job.

You can also provide a Tag to track the model compilation job's resource use and costs. The response body contains the CompilationJobArn for the compiled job.

To stop a model compilation job, use StopCompilationJob. To get information about a particular model compilation job, use DescribeCompilationJob. To get information about multiple model compilation jobs, use ListCompilationJobs.

Synopsis

Creating a Request

data CreateCompilationJob Source #

See: newCreateCompilationJob smart constructor.

Constructors

CreateCompilationJob' 

Fields

  • vpcConfig :: Maybe NeoVpcConfig

    A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.

  • tags :: Maybe [Tag]

    An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

  • compilationJobName :: Text

    A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account.

  • roleArn :: Text

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

    During model compilation, Amazon SageMaker needs your permission to:

    • Read input data from an S3 bucket
    • Write model artifacts to an S3 bucket
    • Write logs to Amazon CloudWatch Logs
    • Publish metrics to Amazon CloudWatch

    You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles.

  • inputConfig :: InputConfig

    Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.

  • outputConfig :: OutputConfig

    Provides information about the output location for the compiled model and the target device the model runs on.

  • stoppingCondition :: StoppingCondition

    Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker ends the compilation job. Use this API to cap model training costs.

Instances

Instances details
Eq CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Read CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Show CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Generic CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Associated Types

type Rep CreateCompilationJob :: Type -> Type #

NFData CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Methods

rnf :: CreateCompilationJob -> () #

Hashable CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

ToJSON CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

AWSRequest CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Associated Types

type AWSResponse CreateCompilationJob #

ToHeaders CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

ToPath CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

ToQuery CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

type Rep CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

type Rep CreateCompilationJob = D1 ('MetaData "CreateCompilationJob" "Amazonka.SageMaker.CreateCompilationJob" "libZSservicesZSamazonka-sagemakerZSamazonka-sagemaker" 'False) (C1 ('MetaCons "CreateCompilationJob'" 'PrefixI 'True) ((S1 ('MetaSel ('Just "vpcConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe NeoVpcConfig)) :*: (S1 ('MetaSel ('Just "tags") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Tag])) :*: S1 ('MetaSel ('Just "compilationJobName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: ((S1 ('MetaSel ('Just "roleArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "inputConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 InputConfig)) :*: (S1 ('MetaSel ('Just "outputConfig") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 OutputConfig) :*: S1 ('MetaSel ('Just "stoppingCondition") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 StoppingCondition)))))
type AWSResponse CreateCompilationJob Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

newCreateCompilationJob Source #

Create a value of CreateCompilationJob with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:vpcConfig:CreateCompilationJob', createCompilationJob_vpcConfig - A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.

$sel:tags:CreateCompilationJob', createCompilationJob_tags - An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

$sel:compilationJobName:CreateCompilationJob', createCompilationJob_compilationJobName - A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account.

$sel:roleArn:CreateCompilationJob', createCompilationJob_roleArn - The Amazon Resource Name (ARN) of an IAM role that enables Amazon SageMaker to perform tasks on your behalf.

During model compilation, Amazon SageMaker needs your permission to:

  • Read input data from an S3 bucket
  • Write model artifacts to an S3 bucket
  • Write logs to Amazon CloudWatch Logs
  • Publish metrics to Amazon CloudWatch

You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles.

$sel:inputConfig:CreateCompilationJob', createCompilationJob_inputConfig - Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.

$sel:outputConfig:CreateCompilationJob', createCompilationJob_outputConfig - Provides information about the output location for the compiled model and the target device the model runs on.

$sel:stoppingCondition:CreateCompilationJob', createCompilationJob_stoppingCondition - Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker ends the compilation job. Use this API to cap model training costs.

Request Lenses

createCompilationJob_vpcConfig :: Lens' CreateCompilationJob (Maybe NeoVpcConfig) Source #

A VpcConfig object that specifies the VPC that you want your compilation job to connect to. Control access to your models by configuring the VPC. For more information, see Protect Compilation Jobs by Using an Amazon Virtual Private Cloud.

createCompilationJob_tags :: Lens' CreateCompilationJob (Maybe [Tag]) Source #

An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.

createCompilationJob_compilationJobName :: Lens' CreateCompilationJob Text Source #

A name for the model compilation job. The name must be unique within the Amazon Web Services Region and within your Amazon Web Services account.

createCompilationJob_roleArn :: Lens' CreateCompilationJob Text Source #

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

During model compilation, Amazon SageMaker needs your permission to:

  • Read input data from an S3 bucket
  • Write model artifacts to an S3 bucket
  • Write logs to Amazon CloudWatch Logs
  • Publish metrics to Amazon CloudWatch

You grant permissions for all of these tasks to an IAM role. To pass this role to Amazon SageMaker, the caller of this API must have the iam:PassRole permission. For more information, see Amazon SageMaker Roles.

createCompilationJob_inputConfig :: Lens' CreateCompilationJob InputConfig Source #

Provides information about the location of input model artifacts, the name and shape of the expected data inputs, and the framework in which the model was trained.

createCompilationJob_outputConfig :: Lens' CreateCompilationJob OutputConfig Source #

Provides information about the output location for the compiled model and the target device the model runs on.

createCompilationJob_stoppingCondition :: Lens' CreateCompilationJob StoppingCondition Source #

Specifies a limit to how long a model compilation job can run. When the job reaches the time limit, Amazon SageMaker ends the compilation job. Use this API to cap model training costs.

Destructuring the Response

data CreateCompilationJobResponse Source #

See: newCreateCompilationJobResponse smart constructor.

Constructors

CreateCompilationJobResponse' 

Fields

  • httpStatus :: Int

    The response's http status code.

  • compilationJobArn :: Text

    If the action is successful, the service sends back an HTTP 200 response. Amazon SageMaker returns the following data in JSON format:

    • CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job.

Instances

Instances details
Eq CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Read CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Show CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Generic CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

Associated Types

type Rep CreateCompilationJobResponse :: Type -> Type #

NFData CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

type Rep CreateCompilationJobResponse Source # 
Instance details

Defined in Amazonka.SageMaker.CreateCompilationJob

type Rep CreateCompilationJobResponse = D1 ('MetaData "CreateCompilationJobResponse" "Amazonka.SageMaker.CreateCompilationJob" "libZSservicesZSamazonka-sagemakerZSamazonka-sagemaker" 'False) (C1 ('MetaCons "CreateCompilationJobResponse'" 'PrefixI 'True) (S1 ('MetaSel ('Just "httpStatus") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "compilationJobArn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text)))

newCreateCompilationJobResponse Source #

Create a value of CreateCompilationJobResponse with all optional fields omitted.

Use generic-lens or optics to modify other optional fields.

The following record fields are available, with the corresponding lenses provided for backwards compatibility:

$sel:httpStatus:CreateCompilationJobResponse', createCompilationJobResponse_httpStatus - The response's http status code.

$sel:compilationJobArn:CreateCompilationJobResponse', createCompilationJobResponse_compilationJobArn - If the action is successful, the service sends back an HTTP 200 response. Amazon SageMaker returns the following data in JSON format:

  • CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job.

Response Lenses

createCompilationJobResponse_compilationJobArn :: Lens' CreateCompilationJobResponse Text Source #

If the action is successful, the service sends back an HTTP 200 response. Amazon SageMaker returns the following data in JSON format:

  • CompilationJobArn: The Amazon Resource Name (ARN) of the compiled job.