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.
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/async_sage_maker.py
5758 5759 5760 5761 5762 5763 5764 5765 5766 5767 5768 5769 5770 5771 5772 5773 5774 5775 5776 5777 5778 5779 5780 5781 5782 5783 5784 5785 5786 5787 5788 5789 5790 5791 5792 5793 5794 5795 5796 5797 5798 5799 5800 5801 5802 5803 5804 5805 5806 5807 5808 5809 5810 5811 5812 5813 5814 5815 5816 5817 5818 5819 5820 5821 5822 5823 5824 5825 5826 5827 5828 | |