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
7819 7820 7821 7822 7823 7824 7825 7826 7827 7828 7829 7830 7831 7832 7833 7834 7835 7836 7837 7838 7839 7840 7841 7842 7843 7844 7845 7846 7847 7848 7849 7850 7851 7852 7853 7854 7855 7856 7857 7858 7859 7860 7861 7862 7863 7864 7865 7866 7867 7868 7869 7870 7871 7872 7873 7874 7875 7876 7877 7878 7879 7880 7881 7882 7883 7884 7885 7886 7887 7888 7889 7890 7891 7892 7893 7894 7895 7896 7897 7898 7899 7900 7901 | |