CreateJob
Creates a model customization job in Amazon SageMaker. A job runs a workload based on the job category and configuration you provide. You specify the job category, a schema-versioned configuration document, and an IAM role that grants Amazon SageMaker permission to access resources on your behalf.
Use the AgentRFT category to fine-tune a model using multi-turn reinforcement learning with reward signals. Use the AgentRFTEvaluation category to evaluate a fine-tuned or base model by running multi-turn rollouts against a held-out prompt dataset and computing metrics such as pass@k and mean reward.
Before creating a job, call ListJobSchemaVersions and DescribeJobSchemaVersion to retrieve the configuration schema for your job category. The JobConfigDocument must conform to the schema specified by JobConfigSchemaVersion.
The following operations are related to CreateJob:
-
DescribeJob -
ListJobs -
StopJob -
DeleteJob -
ListJobSchemaVersions -
DescribeJobSchemaVersion
Request Syntax
{
"JobCategory": "string",
"JobConfigDocument": "string",
"JobConfigSchemaVersion": "string",
"JobName": "string",
"RoleArn": "string",
"Tags": [
{
"Key": "string",
"Value": "string"
}
]
}
Request Parameters
For information about the parameters that are common to all actions, see Common Parameters.
The request accepts the following data in JSON format.
- JobCategory
-
The category of the job. The category determines the type of workload that the job runs.
Type: String
Valid Values:
AgentRFT | AgentRFTEvaluationRequired: Yes
- JobConfigDocument
-
The JSON configuration document for the job. The document must conform to the schema specified by
JobConfigSchemaVersion. UseDescribeJobSchemaVersionto retrieve the schema for validation.Type: String
Length Constraints: Minimum length of 1. Maximum length of 262144.
Required: Yes
- JobConfigSchemaVersion
-
The version of the configuration schema to use for the job configuration document. Use
ListJobSchemaVersionsto get available schema versions for a job category.Type: String
Length Constraints: Minimum length of 5. Maximum length of 16.
Pattern:
\d+\.\d+\.\d+Required: Yes
- JobName
-
The name of the job. The name must be unique within your account and AWS Region.
Type: String
Length Constraints: Minimum length of 1. Maximum length of 63.
Pattern:
[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}Required: Yes
- RoleArn
-
The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to perform the job. The role must have the necessary permissions to access the resources required by the job configuration.
Type: String
Length Constraints: Minimum length of 20. Maximum length of 2048.
Pattern:
arn:aws[a-z\-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+Required: Yes
- Tags
-
An array of key-value pairs to apply to the job as tags. For more information, see Tagging AWS Resources.
Type: Array of Tag objects
Array Members: Minimum number of 0 items. Maximum number of 50 items.
Required: No
Response Elements
If the action is successful, the service sends back an HTTP 200 response with an empty HTTP body.
Errors
For information about the errors that are common to all actions, see Common Error Types.
- ResourceInUse
-
Resource being accessed is in use.
HTTP Status Code: 400
- ResourceLimitExceeded
-
You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
HTTP Status Code: 400
- ResourceNotFound
-
Resource being access is not found.
HTTP Status Code: 400
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: