Skip to content

Creates a model customization job in Amazon SageMaker

Description

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 list_job_schema_versions and describe_job_schema_version 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 create_job:

Usage

sagemaker_create_job(JobName, RoleArn, JobCategory,
  JobConfigSchemaVersion, JobConfigDocument, Tags)

Arguments

  • JobName

[required] The name of the job. The name must be unique within your account and Amazon Web Services Region.

  • RoleArn

[required] 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.

  • JobCategory

[required] The category of the job. The category determines the type of workload that the job runs.

  • JobConfigSchemaVersion

[required] The version of the configuration schema to use for the job configuration document. Use list_job_schema_versions to get available schema versions for a job category.

  • JobConfigDocument

[required] The JSON configuration document for the job. The document must conform to the schema specified by JobConfigSchemaVersion. Use describe_job_schema_version to retrieve the schema for validation.

  • Tags

An array of key-value pairs to apply to the job as tags. For more information, see Tagging Amazon Web Services Resources.

Value

A list with the following syntax:

list(
  JobArn = "string"
)

Request syntax

svc$create_job(
  JobName = "string",
  RoleArn = "string",
  JobCategory = "AgentRFT"|"AgentRFTEvaluation",
  JobConfigSchemaVersion = "string",
  JobConfigDocument = "string",
  Tags = list(
    list(
      Key = "string",
      Value = "string"
    )
  )
)