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.
Specify one of the following job categories, which determines the type of workload that the job runs:
- AgentRFT
-
Fine-tune a model using multi-turn reinforcement learning with reward signals.
- AgentRFTEvaluation
-
Evaluate a fine-tuned or base model by running multi-turn rollouts against a held-out prompt dataset. This category computes metrics such as pass@k and mean reward.
- DataQualityEvaluation
-
Evaluate the quality of a generated or bring-your-own dataset using quality metrics or your own specification.
- DataTransformation
-
Transform datasets into the format you need, for example for model customization.
- GapAnalysis
-
Run a gap analysis job. Analyze completed model evaluation results against your evaluation criteria to find the records that fail and categorize the failures behind model underperformance in your domain.
- GenAIEvaluation
-
Evaluate models against evaluation criteria, such as large language model (LLM)-as-a-judge evaluators, or score your own pre-generated responses. Use this category to check response quality before you deploy.
- SyntheticDataGeneration
-
Generate synthetic training and testing datasets from your context data and specifications.
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
5704 5705 5706 5707 5708 5709 5710 5711 5712 5713 5714 5715 5716 5717 5718 5719 5720 5721 5722 5723 5724 5725 5726 5727 5728 5729 5730 5731 5732 5733 5734 5735 5736 5737 5738 5739 5740 5741 5742 5743 5744 5745 5746 5747 5748 5749 5750 5751 5752 5753 5754 5755 5756 5757 5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 | |