create_job
¶
create_job(
*,
config_overrides: Optional[SageMakerClientConfig] = None,
job_name: Optional[JobName] = None,
role_arn: Optional[RoleArn] = None,
job_category: Optional[JobCategory] = None,
job_config_schema_version: Optional[JobSchemaVersion] = None,
job_config_document: Optional[JobConfigDocument] = None,
tags: Optional[TagList] = None,
) -> CreateJobResponse
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
Parameters:
-
job_name(Optional[JobName], default:None) –The name of the job. The name must be unique within your account and Amazon Web Services Region.
-
role_arn(Optional[RoleArn], default:None) –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.
-
job_category(Optional[JobCategory], default:None) –The category of the job. The category determines the type of workload that the job runs.
-
job_config_schema_version(Optional[JobSchemaVersion], default:None) –The version of the configuration schema to use for the job configuration document. Use
ListJobSchemaVersionsto get available schema versions for a job category. -
job_config_document(Optional[JobConfigDocument], default:None) –The JSON configuration document for the job. The document must conform to the schema specified by
JobConfigSchemaVersion. UseDescribeJobSchemaVersionto retrieve the schema for validation. -
tags(Optional[TagList], default:None) –An array of key-value pairs to apply to the job as tags. For more information, see Tagging Amazon Web Services Resources.
Raises:
-
ResourceInUse–Resource being accessed is in use.
-
ResourceLimitExceeded–You have exceeded an SageMaker resource limit. For example, you might have too many training jobs created.
-
ResourceNotFound–Resource being access is not found.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_sagemaker/_services/sage_maker.py
5150 5151 5152 5153 5154 5155 5156 5157 5158 5159 5160 5161 5162 5163 5164 5165 5166 5167 5168 5169 5170 5171 5172 5173 5174 5175 5176 5177 5178 5179 5180 5181 5182 5183 5184 5185 5186 5187 5188 5189 5190 5191 5192 5193 5194 5195 5196 5197 5198 5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 | |