sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

How to create a hyperparameter tuning step in SageMaker pipeline?

Open dennisqian1 opened this issue 5 years ago • 8 comments

Describe the feature you'd like I am trying to use the latest SageMaker Python SDK (v2.23.0) to implement a SageMaker pipeline that includes a hyperparameter tuning job. However I didn't see anything in module sagemaker.workflow.steps or sagemaker.workflow.step_collections that I can use. There is a TrainingStep class but it's not for HPO.

How would this feature be used? Please describe. The new Step class will be used to do hyperparameter tuning in a SageMaker pipeline.

Describe alternatives you've considered N/A

Additional context N/A

dennisqian1 avatar Dec 28 '20 20:12 dennisqian1

Is there any plan of including this feature request into a future release?

dennisqian1 avatar Jan 22 '21 20:01 dennisqian1

how to get this implemented on pipeline. at least make some document to do this .

codeloki15 avatar Feb 15 '21 18:02 codeloki15

Hi there, thanks for your interests in SageMaker Pipelines.

We do not have a specific plan to release this feature right now. However your feedback is very important to us. We are always reprioritize our roadmap based on customer input.

wangweixun avatar Mar 04 '21 02:03 wangweixun

Hi, This feature is really important and necessary for us and it seems very odd not to be included in SM Pipelines where it's in the Step Functions Workflow API

melzareix avatar Mar 30 '21 09:03 melzareix

please check my medium book I have mentioned a method to implement hyperparameteron sm pipeline.... AWS please get us the feature as well..

https://codeloki.medium.com/understanding-aws-sagemaker-studio-with-model-building-training-and-deployment-along-with-the-12287ac56188

codeloki15 avatar Jun 08 '21 17:06 codeloki15

You can also use Callback step and offload HPO tuning to a lambda that returns the model artifacts of the best trained estimator and then use a createmodel step to create a model from that. But this is a round about way that has a lot of moving parts. It would be better to add HPO Step in pipelines. Apache Airflow has it, Step. function have it, Pipelines need it and fast.

chubzor avatar Jun 23 '21 14:06 chubzor

You can also use Callback step and offload HPO tuning to a lambda that returns the model artifacts of the best trained estimator and then use a createmodel step to create a model from that. But this is a round about way that has a lot of moving parts. It would be better to add HPO Step in pipelines. Apache Airflow has it, Step. function have it, Pipelines need it and fast.

you can provide the HPO to the training step outside the AWS studio but still you need to hung your pipeline which will wait for best param and then it will kick back .. still it is not not a good idea. to hung a pipeline.. Just wanted to share alternative.

codeloki15 avatar Jun 23 '21 14:06 codeloki15

Hi there,

We have launched the tuning step today. Please find the docs here

https://aws.amazon.com/about-aws/whats-new/2021/07/amazon-sagemaker-pipeline-introduces-a-automatic-hyperparameter-tuning-step/

https://docs.aws.amazon.com/sagemaker/latest/dg/build-and-manage-steps.html#step-type-tuning

enjoy =)

jerrypeng7773 avatar Jul 13 '21 19:07 jerrypeng7773