jobs
Creates, updates, deletes, gets or lists a jobs resource.
Overview
| Name | jobs |
| Type | Resource |
| Id | aws.sagemaker.jobs |
Fields
The following fields are returned by SELECT queries:
- describe_job
- list_jobs
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The date and time that the job was created. |
end_time | string (date-time) | The date and time that the job ended. |
failure_reason | string | If the job failed, the reason it failed. |
job_arn | string | The Amazon Resource Name (ARN) of the job. (pattern: <code>arn:(aws[a-z-]):sagemaker:[a-z0-9-]+:[0-9]{12}:job/[a-zA-Z0-9]+/[a-zA-Z0-9](-[a-zA-Z0-9]){0,62}</code>) |
job_category | string | The category of the job. (AgentRFT, AgentRFTEvaluation) |
job_config_document | string | The JSON configuration document for the job. |
job_config_schema_version | string | The schema version used for the job configuration document. (pattern: <code>\d+.\d+.\d+</code>) |
job_name | string | The name of the job. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
job_status | string | The current status of the job. (InProgress, Completed, Failed, Stopping, Stopped, Deleting, DeleteFailed) |
last_modified_time | string (date-time) | The date and time that the job was last modified. |
role_arn | string | The ARN of the IAM role associated with the job. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
secondary_status | string | The detailed secondary status of the job, providing more granular information about the job's progress. Secondary statuses may change between releases. (Starting, Downloading, Training, Uploading, Stopping, Stopped, MaxRuntimeExceeded, Interrupted, Failed, Completed, Restarting, Pending, Evaluating, Deleting, DeleteFailed) |
secondary_status_transitions | array | A list of secondary status transitions for the job, with timestamps and optional status messages. |
tags | array | The tags associated with the job. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | The date and time that the job was created. |
end_time | string (date-time) | The date and time that the job ended. |
job_arn | string | The Amazon Resource Name (ARN) of the job. (pattern: <code>arn:(aws[a-z-]):sagemaker:[a-z0-9-]+:[0-9]{12}:job/[a-zA-Z0-9]+/[a-zA-Z0-9](-[a-zA-Z0-9]){0,62}</code>) |
job_category | string | The category of the job. (AgentRFT, AgentRFTEvaluation) |
job_name | string | The name of the job. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
job_secondary_status | string | The secondary status of the job, providing more granular information about the job's progress. Secondary statuses may change between releases. (Starting, Downloading, Training, Uploading, Stopping, Stopped, MaxRuntimeExceeded, Interrupted, Failed, Completed, Restarting, Pending, Evaluating, Deleting, DeleteFailed) |
job_status | string | The current status of the job. (InProgress, Completed, Failed, Stopping, Stopped, Deleting, DeleteFailed) |
last_modified_time | string (date-time) | The date and time that the job was last modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_job | select | region | Returns detailed information about a job, including its current status, secondary status, configuration, and timestamps. Use SecondaryStatus for granular progress tracking and SecondaryStatusTransitions to see the full history of status changes with timestamps. The following operations are related to DescribeJob: CreateJob ListJobs StopJob DeleteJob | |
list_jobs | select | region | Lists jobs in a specified category. You can filter results by creation time, last modified time, name, and status. Results are sorted by the field you specify in SortBy. Use pagination to retrieve large result sets efficiently. The following operations are related to ListJobs: CreateJob DescribeJob | |
create_job | insert | region, JobName, RoleArn, JobCategory, JobConfigSchemaVersion, JobConfigDocument | 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 | |
delete_job | delete | region | Deletes a job. This operation is idempotent. If the job is currently running, you must stop it before deleting it by calling StopJob. The following operations are related to DeleteJob: CreateJob StopJob DescribeJob | |
stop_job | exec | region, JobName, JobCategory | Stops a running job. When you call StopJob, Amazon SageMaker sets the job status to Stopping. After the job stops, the status changes to Stopped. Partial results may be available in the output location if the job was in progress. To delete a stopped job, call DeleteJob. The following operations are related to StopJob: CreateJob DescribeJob DeleteJob |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_job
- list_jobs
Returns detailed information about a job, including its current status, secondary status, configuration, and timestamps. Use SecondaryStatus for granular progress tracking and SecondaryStatusTransitions to see the full history of status changes with timestamps. The following operations are related to DescribeJob: CreateJob ListJobs StopJob DeleteJob
SELECT
creation_time,
end_time,
failure_reason,
job_arn,
job_category,
job_config_document,
job_config_schema_version,
job_name,
job_status,
last_modified_time,
role_arn,
secondary_status,
secondary_status_transitions,
tags
FROM aws.sagemaker.jobs
WHERE region = '{{ region }}' -- required
;
Lists jobs in a specified category. You can filter results by creation time, last modified time, name, and status. Results are sorted by the field you specify in SortBy. Use pagination to retrieve large result sets efficiently. The following operations are related to ListJobs: CreateJob DescribeJob
SELECT
creation_time,
end_time,
job_arn,
job_category,
job_name,
job_secondary_status,
job_status,
last_modified_time
FROM aws.sagemaker.jobs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_job
- Manifest
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
INSERT INTO aws.sagemaker.jobs (
JobName,
RoleArn,
JobCategory,
JobConfigSchemaVersion,
JobConfigDocument,
Tags,
region
)
SELECT
'{{ JobName }}' /* required */,
'{{ RoleArn }}' /* required */,
'{{ JobCategory }}' /* required */,
'{{ JobConfigSchemaVersion }}' /* required */,
'{{ JobConfigDocument }}' /* required */,
'{{ Tags }}',
'{{ region }}'
RETURNING
job_arn
;
# Description fields are for documentation purposes
- name: jobs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the jobs resource.
- name: JobName
value: "{{ JobName }}"
description: |
The name of the job. The name must be unique within your account and Amazon Web Services Region.
- name: RoleArn
value: "{{ RoleArn }}"
description: |
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.
- name: JobCategory
value: "{{ JobCategory }}"
description: |
The category of the job. The category determines the type of workload that the job runs.
valid_values: ['AgentRFT', 'AgentRFTEvaluation']
- name: JobConfigSchemaVersion
value: "{{ JobConfigSchemaVersion }}"
description: |
The version of the configuration schema to use for the job configuration document. Use ListJobSchemaVersions to get available schema versions for a job category.
- name: JobConfigDocument
value: "{{ JobConfigDocument }}"
description: |
The JSON configuration document for the job. The document must conform to the schema specified by JobConfigSchemaVersion. Use DescribeJobSchemaVersion to retrieve the schema for validation.
- name: Tags
description: |
An array of key-value pairs to apply to the job as tags. For more information, see Tagging Amazon Web Services Resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
DELETE examples
- delete_job
Deletes a job. This operation is idempotent. If the job is currently running, you must stop it before deleting it by calling StopJob. The following operations are related to DeleteJob: CreateJob StopJob DescribeJob
DELETE FROM aws.sagemaker.jobs
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- stop_job
Stops a running job. When you call StopJob, Amazon SageMaker sets the job status to Stopping. After the job stops, the status changes to Stopped. Partial results may be available in the output location if the job was in progress. To delete a stopped job, call DeleteJob. The following operations are related to StopJob: CreateJob DescribeJob DeleteJob
EXEC aws.sagemaker.jobs.stop_job
@region='{{ region }}' --required
@@json=
'{
"JobName": "{{ JobName }}",
"JobCategory": "{{ JobCategory }}"
}'
;