Copyright | (c) 2013-2021 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay+amazonka@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
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
- data CreateCompilationJob = CreateCompilationJob' {}
- newCreateCompilationJob :: Text -> Text -> InputConfig -> OutputConfig -> StoppingCondition -> CreateCompilationJob
- createCompilationJob_vpcConfig :: Lens' CreateCompilationJob (Maybe NeoVpcConfig)
- createCompilationJob_tags :: Lens' CreateCompilationJob (Maybe [Tag])
- createCompilationJob_compilationJobName :: Lens' CreateCompilationJob Text
- createCompilationJob_roleArn :: Lens' CreateCompilationJob Text
- createCompilationJob_inputConfig :: Lens' CreateCompilationJob InputConfig
- createCompilationJob_outputConfig :: Lens' CreateCompilationJob OutputConfig
- createCompilationJob_stoppingCondition :: Lens' CreateCompilationJob StoppingCondition
- data CreateCompilationJobResponse = CreateCompilationJobResponse' {}
- newCreateCompilationJobResponse :: Int -> Text -> CreateCompilationJobResponse
- createCompilationJobResponse_httpStatus :: Lens' CreateCompilationJobResponse Int
- createCompilationJobResponse_compilationJobArn :: Lens' CreateCompilationJobResponse Text
Creating a Request
data CreateCompilationJob Source #
See: newCreateCompilationJob
smart constructor.
CreateCompilationJob' | |
|
Instances
newCreateCompilationJob Source #
:: Text | |
-> Text | |
-> InputConfig | |
-> OutputConfig | |
-> StoppingCondition | |
-> CreateCompilationJob |
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.
CreateCompilationJobResponse' | |
|
Instances
newCreateCompilationJobResponse Source #
:: Int | |
-> Text | |
-> CreateCompilationJobResponse |
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_httpStatus :: Lens' CreateCompilationJobResponse Int Source #
The response's http status code.
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.