create_training_session
async
¶
create_training_session(
*,
config_overrides: Optional[AsyncSageMakerClientConfig] = None,
training_session_name: Optional[TrainingSessionName] = None,
model_package_group_arn: Optional[ModelPackageGroupArn] = None,
lora_config: Optional[LoraConfig] = None,
role_arn: Optional[RoleArn] = None,
vpc_config: Optional[VpcConfig] = None,
model_config: Optional[TrainingSessionModelConfig] = None,
output_config: Optional[TrainingSessionOutputConfig] = None,
tags: Optional[TagList] = None,
) -> CreateTrainingSessionResponse
Creates a training session in Amazon SageMaker. A training session provisions compute resources for fine-tuning a foundation model using Low-Rank Adaptation (LoRA). After the session is created, you can submit training operations and sample inference requests through the Amazon SageMaker Training Session Runtime API.
The following operations are related to CreateTrainingSession:
-
DescribeTrainingSession -
ListTrainingSessions -
StopTrainingSession -
DeleteTrainingSession
Parameters:
-
training_session_name(Optional[TrainingSessionName], default:None) –The name of the training session.
-
model_package_group_arn(Optional[ModelPackageGroupArn], default:None) –The Amazon Resource Name (ARN) of the model package group where checkpoints and fine-tuned model artifacts are published.
-
lora_config(Optional[LoraConfig], default:None) –The Low-Rank Adaptation (LoRA) configuration for the training session, including the rank and alpha parameters.
-
role_arn(Optional[RoleArn], default:None) –The Amazon Resource Name (ARN) of the IAM role that Amazon SageMaker assumes to access resources on your behalf. The role must have permissions to access the output S3 path and model package group.
-
vpc_config(Optional[VpcConfig], default:None) –The Virtual Private Cloud (VPC) configuration for the training session. Specify subnets and security groups to run the training session in your VPC.
-
model_config(Optional[TrainingSessionModelConfig], default:None) –The configuration for the base model, including the model ARN and end-user license agreement (EULA) acceptance.
-
output_config(Optional[TrainingSessionOutputConfig], default:None) –The output configuration for the training session, including the S3 location and optional encryption settings.
-
tags(Optional[TagList], default:None) –An array of key-value pairs to apply to the training session 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
8555 8556 8557 8558 8559 8560 8561 8562 8563 8564 8565 8566 8567 8568 8569 8570 8571 8572 8573 8574 8575 8576 8577 8578 8579 8580 8581 8582 8583 8584 8585 8586 8587 8588 8589 8590 8591 8592 8593 8594 8595 8596 8597 8598 8599 8600 8601 8602 8603 8604 8605 8606 8607 8608 8609 8610 8611 8612 8613 8614 8615 8616 8617 8618 8619 8620 8621 8622 8623 8624 8625 8626 8627 8628 8629 8630 8631 8632 8633 8634 8635 8636 8637 | |