create_job
async
¶
create_job(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = 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/async_sage_maker.py
5199 5200 5201 5202 5203 5204 5205 5206 5207 5208 5209 5210 5211 5212 5213 5214 5215 5216 5217 5218 5219 5220 5221 5222 5223 5224 5225 5226 5227 5228 5229 5230 5231 5232 5233 5234 5235 5236 5237 5238 5239 5240 5241 5242 5243 5244 5245 5246 5247 5248 5249 5250 5251 5252 5253 5254 5255 5256 5257 5258 5259 5260 5261 5262 5263 5264 5265 5266 5267 5268 5269 | |