PySDK Version
Describe the bug
Hi team, I have a quick question, does SageMaker Pipeline in SageMaker Python SDK v3 support fine-tuning (such as SFTTrainer, DPOTrainer, RLAIFTrainer)?
I have this kind of codes. I created SFTTrainer() with PipelineSession in the sagemaker_session. However, the train() is not defered, but automatially launches training job for fine-tuning.
To reproduce
session = PipelineSession()
sft_trainer = SFTTrainer(
model="huggingface-reasoning-qwen3-1-7b",
training_type=TrainingType.LORA,
training_dataset=f"{TRIAGE_DATA_PREFIX}/anycompany_triage_sft.jsonl",
model_package_group="anycompany-triage-agent",
s3_output_path=f"{PIPELINE_OUTPUT_PREFIX}/sft-output",
sagemaker_session=session,
)
step_sft_args = sft_trainer.train() # Expect to be deferred inside pipeline-definition context, but automatically run
step_sft = TrainingStep(
name="SFTTuneTriage",
step_args=step_sft_args,
)
...
Expected behavior
The function is not automatically run, but defined as a pipeline in SageMaker Pipeline.
System information
A description of your system. Please provide:
- SageMaker Python SDK version: 3.17.0
PySDK Version
Describe the bug
Hi team, I have a quick question, does SageMaker Pipeline in SageMaker Python SDK v3 support fine-tuning (such as SFTTrainer, DPOTrainer, RLAIFTrainer)?
I have this kind of codes. I created SFTTrainer() with PipelineSession in the sagemaker_session. However, the train() is not defered, but automatially launches training job for fine-tuning.
To reproduce
Expected behavior
The function is not automatically run, but defined as a pipeline in SageMaker Pipeline.
System information
A description of your system. Please provide: