Braket / Client / create_job
create_job¶
- Braket.Client.create_job(**kwargs)¶
Creates an Amazon Braket hybrid job.
See also: AWS API Documentation
Request Syntax
response = client.create_job( clientToken='string', algorithmSpecification={ 'scriptModeConfig': { 'entryPoint': 'string', 's3Uri': 'string', 'compressionType': 'NONE'|'GZIP' }, 'containerImage': { 'uri': 'string' } }, inputDataConfig=[ { 'channelName': 'string', 'contentType': 'string', 'dataSource': { 's3DataSource': { 's3Uri': 'string' } } }, ], outputDataConfig={ 'kmsKeyId': 'string', 's3Path': 'string' }, checkpointConfig={ 'localPath': 'string', 's3Uri': 'string' }, jobName='string', roleArn='string', stoppingCondition={ 'maxRuntimeInSeconds': 123 }, instanceConfig={ 'instanceType': 'ml.m4.xlarge'|'ml.m4.2xlarge'|'ml.m4.4xlarge'|'ml.m4.10xlarge'|'ml.m4.16xlarge'|'ml.g4dn.xlarge'|'ml.g4dn.2xlarge'|'ml.g4dn.4xlarge'|'ml.g4dn.8xlarge'|'ml.g4dn.12xlarge'|'ml.g4dn.16xlarge'|'ml.m5.large'|'ml.m5.xlarge'|'ml.m5.2xlarge'|'ml.m5.4xlarge'|'ml.m5.12xlarge'|'ml.m5.24xlarge'|'ml.c4.xlarge'|'ml.c4.2xlarge'|'ml.c4.4xlarge'|'ml.c4.8xlarge'|'ml.p2.xlarge'|'ml.p2.8xlarge'|'ml.p2.16xlarge'|'ml.p3.2xlarge'|'ml.p3.8xlarge'|'ml.p3.16xlarge'|'ml.p3dn.24xlarge'|'ml.p4d.24xlarge'|'ml.c5.xlarge'|'ml.c5.2xlarge'|'ml.c5.4xlarge'|'ml.c5.9xlarge'|'ml.c5.18xlarge'|'ml.c5n.xlarge'|'ml.c5n.2xlarge'|'ml.c5n.4xlarge'|'ml.c5n.9xlarge'|'ml.c5n.18xlarge', 'volumeSizeInGb': 123, 'instanceCount': 123 }, hyperParameters={ 'string': 'string' }, deviceConfig={ 'device': 'string' }, tags={ 'string': 'string' }, associations=[ { 'arn': 'string', 'type': 'RESERVATION_TIME_WINDOW_ARN' }, ] )
- Parameters:
clientToken (string) –
[REQUIRED]
The client token associated with this request that guarantees that the request is idempotent.
This field is autopopulated if not provided.
algorithmSpecification (dict) –
[REQUIRED]
Definition of the Amazon Braket job to be created. Specifies the container image the job uses and information about the Python scripts used for entry and training.
scriptModeConfig (dict) –
Configures the paths to the Python scripts used for entry and training.
entryPoint (string) – [REQUIRED]
The entry point in the algorithm scripts from where the execution begins in the hybrid job.
s3Uri (string) – [REQUIRED]
The URI that specifies the S3 path to the algorithm scripts used by an Amazon Braket hybrid job.
compressionType (string) –
The type of compression used to store the algorithm scripts in Amazon S3 storage.
containerImage (dict) –
The container image used to create an Amazon Braket hybrid job.
uri (string) – [REQUIRED]
The URI locating the container image.
inputDataConfig (list) –
A list of parameters that specify the name and type of input data and where it is located.
(dict) –
A list of parameters that specify the input channels, type of input data, and where it is located.
channelName (string) – [REQUIRED]
A named input source that an Amazon Braket hybrid job can consume.
contentType (string) –
The MIME type of the data.
dataSource (dict) – [REQUIRED]
The location of the input data.
s3DataSource (dict) – [REQUIRED]
Amazon S3 path of the input data used by the hybrid job.
s3Uri (string) – [REQUIRED]
Depending on the value specified for the
S3DataType
, identifies either a key name prefix or a manifest that locates the S3 data source.
outputDataConfig (dict) –
[REQUIRED]
The path to the S3 location where you want to store hybrid job artifacts and the encryption key used to store them.
kmsKeyId (string) –
The AWS Key Management Service (AWS KMS) key that Amazon Braket uses to encrypt the hybrid job training artifacts at rest using Amazon S3 server-side encryption.
s3Path (string) – [REQUIRED]
Identifies the S3 path where you want Amazon Braket to store the hybrid job training artifacts. For example,
s3://bucket-name/key-name-prefix
.
checkpointConfig (dict) –
Information about the output locations for hybrid job checkpoint data.
localPath (string) –
(Optional) The local directory where checkpoint data is stored. The default directory is
/opt/braket/checkpoints/
.s3Uri (string) – [REQUIRED]
Identifies the S3 path where you want Amazon Braket to store checkpoint data. For example,
s3://bucket-name/key-name-prefix
.
jobName (string) –
[REQUIRED]
The name of the Amazon Braket hybrid job.
roleArn (string) –
[REQUIRED]
The Amazon Resource Name (ARN) of an IAM role that Amazon Braket can assume to perform tasks on behalf of a user. It can access user resources, run an Amazon Braket job container on behalf of user, and output results and hybrid job details to the users’ s3 buckets.
stoppingCondition (dict) –
The user-defined criteria that specifies when a hybrid job stops running.
maxRuntimeInSeconds (integer) –
The maximum length of time, in seconds, that an Amazon Braket hybrid job can run.
instanceConfig (dict) –
[REQUIRED]
Configuration of the resource instances to use while running the hybrid job on Amazon Braket.
instanceType (string) – [REQUIRED]
Configures the type of resource instances to use while running an Amazon Braket hybrid job.
volumeSizeInGb (integer) – [REQUIRED]
The size of the storage volume, in GB, to provision.
instanceCount (integer) –
Configures the number of resource instances to use while running an Amazon Braket hybrid job on Amazon Braket. The default value is 1.
hyperParameters (dict) –
Algorithm-specific parameters used by an Amazon Braket hybrid job that influence the quality of the training job. The values are set with a map of JSON key:value pairs, where the key is the name of the hyperparameter and the value is the value of the hyperparameter.
Warning
Do not include any security-sensitive information including account access IDs, secrets, or tokens in any hyperparameter fields. As part of the shared responsibility model, you are responsible for any potential exposure, unauthorized access, or compromise of your sensitive data if caused by security-sensitive information included in the request hyperparameter variable or plain text fields.
(string) –
(string) –
deviceConfig (dict) –
[REQUIRED]
The quantum processing unit (QPU) or simulator used to create an Amazon Braket hybrid job.
device (string) – [REQUIRED]
The primary device ARN used to create and run an Amazon Braket hybrid job.
tags (dict) –
Tags to be added to the hybrid job you’re creating.
(string) –
(string) –
associations (list) –
The list of Amazon Braket resources associated with the hybrid job.
(dict) –
The Amazon Braket resource and the association type.
arn (string) – [REQUIRED]
The Amazon Braket resource arn.
type (string) – [REQUIRED]
The association type for the specified Amazon Braket resource arn.
- Return type:
dict
- Returns:
Response Syntax
{ 'jobArn': 'string' }
Response Structure
(dict) –
jobArn (string) –
The ARN of the Amazon Braket hybrid job created.
Exceptions