Skip to content

Commit

Permalink
periodic update, 08.18.2018
Browse files Browse the repository at this point in the history
  • Loading branch information
eslesar-aws committed Aug 15, 2018
1 parent 82f1b47 commit 5499fdf
Show file tree
Hide file tree
Showing 51 changed files with 505 additions and 150 deletions.
18 changes: 10 additions & 8 deletions doc_source/API_CreateModel.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# CreateModel<a name="API_CreateModel"></a>

Creates a model in Amazon SageMaker\. In the request, you name the model and describe one or more containers\. For each container, you specify the docker image containing inference code, artifacts \(from prior training\), and custom environment map that the inference code uses when you deploy the model into production\.
Creates a model in Amazon SageMaker\. In the request, you name the model and describe a primary container\. For the primary container, you specify the docker image containing inference code, artifacts \(from prior training\), and custom environment map that the inference code uses when you deploy the model for predictions\.

Use this API to create a model only if you want to use Amazon SageMaker hosting services\. To host your model, you create an endpoint configuration with the `CreateEndpointConfig` API, and then create an endpoint with the `CreateEndpoint` API\.
Use this API to create a model if you want to use Amazon SageMaker hosting services or run a batch transform job\.

Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment\.
To host your model, you create an endpoint configuration with the `CreateEndpointConfig` API, and then create an endpoint with the `CreateEndpoint` API\. Amazon SageMaker then deploys all of the containers that you defined for the model in the hosting environment\.

In the `CreateModel` request, you must define a container with the `PrimaryContainer` parameter\.
To run a batch transform using your model, you start a job with the `CreateTransformJob` API\. Amazon SageMaker uses your model and your dataset to get inferences which are then saved to a specified S3 location\.

In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances\. In addition, you also use the IAM role to manage permissions the inference code needs\. For example, if the inference code access any other AWS resources, you grant necessary permissions via this role\.
In the `CreateModel` request, you must define a container with the `PrimaryContainer` parameter\.

In the request, you also provide an IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute hosting instances or for batch transform jobs\. In addition, you also use the IAM role to manage permissions the inference code needs\. For example, if the inference code access any other AWS resources, you grant necessary permissions via this role\.

## Request Syntax<a name="API_CreateModel_RequestSyntax"></a>

Expand Down Expand Up @@ -44,7 +46,7 @@ For information about the parameters that are common to all actions, see [Common
The request accepts the following data in JSON format\.

** [ExecutionRoleArn](#API_CreateModel_RequestSyntax) ** <a name="SageMaker-CreateModel-request-ExecutionRoleArn"></a>
The Amazon Resource Name \(ARN\) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances\. Deploying on ML compute instances is part of model hosting\. For more information, see [Amazon SageMaker Roles](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html)\.
The Amazon Resource Name \(ARN\) of the IAM role that Amazon SageMaker can assume to access model artifacts and docker image for deployment on ML compute instances or for batch transform jobs\. Deploying on ML compute instances is part of model hosting\. For more information, see [Amazon SageMaker Roles](https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-roles.html)\.
To be able to pass this role to Amazon SageMaker, the caller of this API must have the `iam:PassRole` permission\.
Type: String
Length Constraints: Minimum length of 20\. Maximum length of 2048\.
Expand All @@ -59,7 +61,7 @@ Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Required: Yes

** [PrimaryContainer](#API_CreateModel_RequestSyntax) ** <a name="SageMaker-CreateModel-request-PrimaryContainer"></a>
The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed into production\.
The location of the primary docker image containing inference code, associated artifacts, and custom environment map that the inference code uses when the model is deployed for predictions\.
Type: [ContainerDefinition](API_ContainerDefinition.md) object
Required: Yes

Expand All @@ -70,7 +72,7 @@ Array Members: Minimum number of 0 items\. Maximum number of 50 items\.
Required: No

** [VpcConfig](#API_CreateModel_RequestSyntax) ** <a name="SageMaker-CreateModel-request-VpcConfig"></a>
A [VpcConfig](API_VpcConfig.md) object that specifies the VPC that you want your model to connect to\. Control access to and from your model container by configuring the VPC\. For more information, see [Protect Models by Using an Amazon Virtual Private Cloud](host-vpc.md)\.
A [VpcConfig](API_VpcConfig.md) object that specifies the VPC that you want your model to connect to\. Control access to and from your model container by configuring the VPC\. `VpcConfig` is currently used in hosting services but not in batch transform\. For more information, see [Protect Models by Using an Amazon Virtual Private Cloud](host-vpc.md)\.
Type: [VpcConfig](API_VpcConfig.md) object
Required: No

Expand Down
8 changes: 8 additions & 0 deletions doc_source/API_CreateNotebookInstance.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ For more information, see [How It Works](https://docs.aws.amazon.com/sagemaker/l
"[DirectInternetAccess](#SageMaker-CreateNotebookInstance-request-DirectInternetAccess)": "string",
"[InstanceType](#SageMaker-CreateNotebookInstance-request-InstanceType)": "string",
"[KmsKeyId](#SageMaker-CreateNotebookInstance-request-KmsKeyId)": "string",
"[LifecycleConfigName](#SageMaker-CreateNotebookInstance-request-LifecycleConfigName)": "string",
"[NotebookInstanceName](#SageMaker-CreateNotebookInstance-request-NotebookInstanceName)": "string",
"[RoleArn](#SageMaker-CreateNotebookInstance-request-RoleArn)": "string",
"[SecurityGroupIds](#SageMaker-CreateNotebookInstance-request-SecurityGroupIds)": [ "string" ],
Expand Down Expand Up @@ -63,6 +64,13 @@ Required: Yes
If you provide a AWS KMS key ID, Amazon SageMaker uses it to encrypt data at rest on the ML storage volume that is attached to your notebook instance\.
Type: String
Length Constraints: Maximum length of 2048\.
Required: No

** [LifecycleConfigName](#API_CreateNotebookInstance_RequestSyntax) ** <a name="SageMaker-CreateNotebookInstance-request-LifecycleConfigName"></a>
The name of a lifecycle configuration to associate with the notebook instance\. For information about lifestyle configurations, see [Step 2\.1: \(Optional\) Customize a Notebook Instance ](notebook-lifecycle-config.md)\.
Type: String
Length Constraints: Maximum length of 63\.
Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Required: No

** [NotebookInstanceName](#API_CreateNotebookInstance_RequestSyntax) ** <a name="SageMaker-CreateNotebookInstance-request-NotebookInstanceName"></a>
Expand Down
8 changes: 8 additions & 0 deletions doc_source/API_CreateNotebookInstanceLifecycleConfig.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ For information about notebook instance lifestyle configurations, see [Step 2\.1

```
{
"[NotebookInstanceLifecycleConfigName](#SageMaker-CreateNotebookInstanceLifecycleConfig-request-NotebookInstanceLifecycleConfigName)": "string",
"[OnCreate](#SageMaker-CreateNotebookInstanceLifecycleConfig-request-OnCreate)": [
{
"[Content](API_NotebookInstanceLifecycleHook.md#SageMaker-Type-NotebookInstanceLifecycleHook-Content)": "string"
Expand All @@ -35,6 +36,13 @@ For information about the parameters that are common to all actions, see [Common

The request accepts the following data in JSON format\.

** [NotebookInstanceLifecycleConfigName](#API_CreateNotebookInstanceLifecycleConfig_RequestSyntax) ** <a name="SageMaker-CreateNotebookInstanceLifecycleConfig-request-NotebookInstanceLifecycleConfigName"></a>
The name of the lifecycle configuration\.
Type: String
Length Constraints: Maximum length of 63\.
Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Required: Yes

** [OnCreate](#API_CreateNotebookInstanceLifecycleConfig_RequestSyntax) ** <a name="SageMaker-CreateNotebookInstanceLifecycleConfig-request-OnCreate"></a>
A shell script that runs only once, when you create a notebook instance\.
Type: Array of [NotebookInstanceLifecycleHook](API_NotebookInstanceLifecycleHook.md) objects
Expand Down
4 changes: 3 additions & 1 deletion doc_source/API_CreatePresignedNotebookInstanceUrl.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# CreatePresignedNotebookInstanceUrl<a name="API_CreatePresignedNotebookInstanceUrl"></a>

Returns a URL that you can use to connect to the Jupyter server from a notebook instance\. In the Amazon SageMaker console, when you choose `Open` next to a notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from the notebook instance\. The console uses this API to get the URL and show the page\.
Returns a URL that you can use to connect to the Jupyter server from a notebook instance\. In the Amazon SageMaker console, when you choose `Open` next to a notebook instance, Amazon SageMaker opens a new tab showing the Jupyter server home page from the notebook instance\. The console uses this API to get the URL and show the page\.

You can restrict access to this API and to the URL that it returns to a list of IP addresses that you specify\. To restrict access, attach an IAM policy that denies access to this API unless the call comes from an IP address in the specified list to every AWS Identity and Access Management user, group, or role used to access the notebook instance\. Use the `NotIpAddress` condition operator and the `aws:SourceIP` condition context key to specify the list of IP addresses that you want to have access to the notebook instance\. For more information, see [Limit Access to a Notebook Instance by IP Address](howitworks-access-ws.md#nbi-ip-filter)\.

## Request Syntax<a name="API_CreatePresignedNotebookInstanceUrl_RequestSyntax"></a>

Expand Down
2 changes: 1 addition & 1 deletion doc_source/API_CreateTrainingJob.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Array Members: Minimum number of 0 items\. Maximum number of 50 items\.
Required: No

** [TrainingJobName](#API_CreateTrainingJob_RequestSyntax) ** <a name="SageMaker-CreateTrainingJob-request-TrainingJobName"></a>
The name of the training job\. The name must be unique within an AWS Region in an AWS account\. It appears in the Amazon SageMaker console\.
The name of the training job\. The name must be unique within an AWS Region in an AWS account\.
Type: String
Length Constraints: Minimum length of 1\. Maximum length of 63\.
Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Expand Down
56 changes: 45 additions & 11 deletions doc_source/API_CreateTransformJob.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# CreateTransformJob<a name="API_CreateTransformJob"></a>

Starts a transform job\. A transform job uses a trained model to get inferences on a dataset and saves these results to an Amazon S3 location that you specify\.

To perform batch transformations, you create a transform job and use the data that you have readily available\.

In the request body, you provide the following:
+ `TransformJobName` \- Identifies the transform job\. The name must be unique within an AWS Region in an AWS account\.
+ `ModelName` \- Identifies the model to use\. `ModelName` must be the name of an existing Amazon SageMaker model in the same AWS Region and AWS account\. For information on creating a model, see [CreateModel](API_CreateModel.md)\.
+ `TransformInput` \- Describes the dataset to be transformed and the Amazon S3 location where it is stored\.
+ `TransformOutput` \- Identifies the Amazon S3 location where you want Amazon SageMaker to save the results from the transform job\.
+ `TransformResources` \- Identifies the ML compute instances for the transform job\.

For more information about how batch transformation works Amazon SageMaker, see [How It Works](https://docs.aws.amazon.com/sagemaker/latest/dg/batch-transform.html)\.

## Request Syntax<a name="API_CreateTransformJob_RequestSyntax"></a>

```
{
"[BatchStrategy](#SageMaker-CreateTransformJob-request-BatchStrategy)": "string",
"[Environment](#SageMaker-CreateTransformJob-request-Environment)": {
"string" : "string"
},
"[MaxConcurrentTransforms](#SageMaker-CreateTransformJob-request-MaxConcurrentTransforms)": number,
"[MaxPayloadInMB](#SageMaker-CreateTransformJob-request-MaxPayloadInMB)": number,
"[MaxRecordsPerBatch](#SageMaker-CreateTransformJob-request-MaxRecordsPerBatch)": number,
"[ModelName](#SageMaker-CreateTransformJob-request-ModelName)": "string",
"[Tags](#SageMaker-CreateTransformJob-request-Tags)": [
{
Expand All @@ -18,18 +34,17 @@
"[CompressionType](API_TransformInput.md#SageMaker-Type-TransformInput-CompressionType)": "string",
"[ContentType](API_TransformInput.md#SageMaker-Type-TransformInput-ContentType)": "string",
"[DataSource](API_TransformInput.md#SageMaker-Type-TransformInput-DataSource)": {
"[S3DataSource](API_DataSource.md#SageMaker-Type-DataSource-S3DataSource)": {
"[S3DataDistributionType](API_S3DataSource.md#SageMaker-Type-S3DataSource-S3DataDistributionType)": "string",
"[S3DataType](API_S3DataSource.md#SageMaker-Type-S3DataSource-S3DataType)": "string",
"[S3Uri](API_S3DataSource.md#SageMaker-Type-S3DataSource-S3Uri)": "string"
"[S3DataSource](API_TransformDataSource.md#SageMaker-Type-TransformDataSource-S3DataSource)": {
"[S3DataType](API_TransformS3DataSource.md#SageMaker-Type-TransformS3DataSource-S3DataType)": "string",
"[S3Uri](API_TransformS3DataSource.md#SageMaker-Type-TransformS3DataSource-S3Uri)": "string"
}
},
"[SplitType](API_TransformInput.md#SageMaker-Type-TransformInput-SplitType)": "string"
},
"[TransformJobName](#SageMaker-CreateTransformJob-request-TransformJobName)": "string",
"[TransformOutput](#SageMaker-CreateTransformJob-request-TransformOutput)": {
"[Accept](API_TransformOutput.md#SageMaker-Type-TransformOutput-Accept)": "string",
"[AssembleWith](API_TransformOutput.md#SageMaker-Type-TransformOutput-AssembleWith)": "string",
"[CompressionType](API_TransformOutput.md#SageMaker-Type-TransformOutput-CompressionType)": "string",
"[KmsKeyId](API_TransformOutput.md#SageMaker-Type-TransformOutput-KmsKeyId)": "string",
"[S3OutputPath](API_TransformOutput.md#SageMaker-Type-TransformOutput-S3OutputPath)": "string"
},
Expand All @@ -46,47 +61,65 @@ For information about the parameters that are common to all actions, see [Common

The request accepts the following data in JSON format\.

** [MaxConcurrentTransforms](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-MaxConcurrentTransforms"></a>
Type: Integer
Valid Range: Minimum value of 0\.
** [BatchStrategy](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-BatchStrategy"></a>
Determines the number of records included in a single mini\-batch\. `SingleRecord` means only one record is used per mini\-batch\. `MultiRecord` means a mini\-batch is set to contain as many records that can fit within the `MaxPayloadInMB` limit\.
Batch transform will automatically split your input data into whatever payload size is specified if you set `SplitType` to `Line` and `BatchStrategy` to `MultiRecord`\. There's no need to split the dataset into smaller files or to use larger payload sizes unless the records in your dataset are very large\.
Type: String
Valid Values:` MultiRecord | SingleRecord`
Required: No

** [MaxPayloadInMB](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-MaxPayloadInMB"></a>
** [Environment](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-Environment"></a>
The environment variables to set in the Docker container\. We support up to 16 key and values entries in the map\.
Type: String to string map
Key Length Constraints: Maximum length of 1024\.
Key Pattern: `[a-zA-Z_][a-zA-Z0-9_]*`
Value Length Constraints: Maximum length of 10240\.
Required: No

** [MaxConcurrentTransforms](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-MaxConcurrentTransforms"></a>
The maximum number of parallel requests that can be sent to each instance in a transform job\. This is good for algorithms that implement multiple workers on larger instances \. The default value is `1`\. To allow Amazon SageMaker to determine the appropriate number for `MaxConcurrentTransforms`, set the value to `0`\.
Type: Integer
Valid Range: Minimum value of 0\.
Required: No

** [MaxRecordsPerBatch](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-MaxRecordsPerBatch"></a>
** [MaxPayloadInMB](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-MaxPayloadInMB"></a>
The maximum payload size allowed, in MB\. A payload is the data portion of a record \(without metadata\)\. The value in `MaxPayloadInMB` must be greater or equal to the size of a single record\. You can approximate the size of a record by dividing the size of your dataset by the number of records\. Then multiply this value by the number of records you want in a mini\-batch\. It is recommended to enter a value slightly larger than this to ensure the records fit within the maximum payload size\. The default value is `6` MB\. For an unlimited payload size, set the value to `0`\.
Type: Integer
Valid Range: Minimum value of 0\.
Required: No

** [ModelName](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-ModelName"></a>
The name of the model that you want to use for the transform job\. `ModelName` must be the name of an existing Amazon SageMaker model within an AWS Region in an AWS account\.
Type: String
Length Constraints: Maximum length of 63\.
Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Required: Yes

** [Tags](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-Tags"></a>
An array of key\-value pairs\. Adding tags is optional\. For more information, see [Using Cost Allocation Tags](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html#allocation-what) in the *AWS Billing and Cost Management User Guide*\.
Type: Array of [Tag](API_Tag.md) objects
Array Members: Minimum number of 0 items\. Maximum number of 50 items\.
Required: No

** [TransformInput](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-TransformInput"></a>
Describes the input source and the way the transform job consumes it\.
Type: [TransformInput](API_TransformInput.md) object
Required: Yes

** [TransformJobName](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-TransformJobName"></a>
The name of the transform job\. The name must be unique within an AWS Region in an AWS account\.
Type: String
Length Constraints: Minimum length of 1\. Maximum length of 63\.
Pattern: `^[a-zA-Z0-9](-*[a-zA-Z0-9])*`
Required: Yes

** [TransformOutput](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-TransformOutput"></a>
Describes the results of the transform job\.
Type: [TransformOutput](API_TransformOutput.md) object
Required: Yes

** [TransformResources](#API_CreateTransformJob_RequestSyntax) ** <a name="SageMaker-CreateTransformJob-request-TransformResources"></a>
Describes the resources, including ML instance types and ML instance count, to use for the transform job\.
Type: [TransformResources](API_TransformResources.md) object
Required: Yes

Expand All @@ -105,6 +138,7 @@ If the action is successful, the service sends back an HTTP 200 response\.
The following data is returned in JSON format by the service\.

** [TransformJobArn](#API_CreateTransformJob_ResponseSyntax) ** <a name="SageMaker-CreateTransformJob-response-TransformJobArn"></a>
The Amazon Resource Name \(ARN\) of the transform job\.
Type: String
Length Constraints: Maximum length of 256\.
Pattern: `arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:transform-job/.*`
Expand Down
Loading

0 comments on commit 5499fdf

Please sign in to comment.