Closed
Description
I cannot set TrainingStep's 'hyperparameters' parameter using ExecutionInput on v2.2.0. v2.1.0 works well.
When I used v2.1.0 this code worked, and I was able to set hyperparameters when I executed workflow.
training_step = steps.TrainingStep(
"SageMaker Training Step",
estimator=sklearn,
data={"train": sagemaker.TrainingInput(execution_input["PreprocessingOutputDataTrain"], content_type="text/csv")},
job_name=execution_input["TrainingJobName"],
hyperparameters=execution_input["TrainingParameters"],
wait_for_completion=True,
)
When I used v2.2.0 I needed to add get_schema_as_dict() to ExecutionInput. After that, 'hyperparameters' was not updated by ExecutionInput. It seems that the estimator's 'hyperparameters' setting only is set (ExecutionInput is ignored).
training_step = steps.TrainingStep(
"SageMaker Training Step",
estimator=sklearn,
data={"train": sagemaker.TrainingInput(execution_input["PreprocessingOutputDataTrain"], content_type="text/csv")},
job_name=execution_input["TrainingJobName"],
hyperparameters=execution_input["TrainingParameters"].get_schema_as_dict(),
wait_for_completion=True,
)
Metadata
Metadata
Assignees
Labels
No labels