Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Adds support for Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig #142

Merged
merged 14 commits into from
Jun 19, 2021

Conversation

ca-nguyen
Copy link
Contributor

@ca-nguyen ca-nguyen commented Jun 11, 2021

Issue #, if available: #98, #97, #80

Description of changes:
Currently, it is not possible to specify the output path to TrainingStep. It needs to be defined at the Estimator level, which does not support placeholders. This change will make it possible to insert a placeholder output path from the TrainingStep definition and propagate it dynamically to the Estimator.

This change change also makes the TrainingStep data parameter compatible with placeholders.

There are other feature requests to make other TrainingStep arguments and ProcessingStep arguments compatible with placeholders. They will be addressed in a separate PR where the implementation could maybe be done at a higher level to avoid repetition.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ca-nguyen ca-nguyen requested review from shivlaks and wong-a June 11, 2021 17:15
@ca-nguyen ca-nguyen changed the title Feature: Adding placeholder output_path parameter to TrainingStep to … [DRAFT]Feature: Adding placeholder output_path parameter to TrainingStep to … Jun 11, 2021
@ca-nguyen ca-nguyen marked this pull request as ready for review June 15, 2021 02:01
@ca-nguyen ca-nguyen changed the title [DRAFT]Feature: Adding placeholder output_path parameter to TrainingStep to … Feature: Adding placeholder output_path parameter to TrainingStep to … Jun 15, 2021
@ca-nguyen ca-nguyen requested review from wong-a and yuan-bwn June 15, 2021 02:24
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
tests/unit/test_sagemaker_steps.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
tests/integ/test_sagemaker_steps.py Outdated Show resolved Hide resolved
tests/integ/test_sagemaker_steps.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
tests/unit/test_sagemaker_steps.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
Copy link
Contributor

@wong-a wong-a left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there! Remaining items:

  • Update name of output_path argument to not clash with existing output_path for Task
  • Comment and variable naming improvements
  • Unit tests

@wong-a wong-a changed the title Feature: Adding placeholder output_path parameter to TrainingStep to … Feature: Support Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig Jun 17, 2021
@ca-nguyen ca-nguyen requested a review from wong-a June 17, 2021 21:00
tests/integ/test_sagemaker_steps.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
src/stepfunctions/steps/sagemaker.py Outdated Show resolved Hide resolved
@ca-nguyen ca-nguyen requested a review from wong-a June 18, 2021 17:12
@@ -15,7 +15,9 @@
import logging

from enum import Enum
from stepfunctions.inputs import ExecutionInput, StepInput
import logging
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be removed in next commit

@shivlaks shivlaks changed the title Feature: Support Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig feat: Adds support for Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig Jun 19, 2021
@StepFunctions-Bot
Copy link
Contributor

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-sEHrOdk7acJc
  • Commit ID: 7ae50d6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@shivlaks shivlaks merged commit 764df67 into aws:main Jun 19, 2021
shivlaks added a commit that referenced this pull request Jun 21, 2021
bump for `v2.2.0` which includes the following changes:

Features
* Placeholders in TrainingStep to set S3 location for InputDataConfig and OutputDataConfig (#142)
* EventBridge service integration (#147)

Fixes
* supplying hyperparameters to training step constructor drops hyperparameters specified in estimator (#144)
@ca-nguyen ca-nguyen deleted the training-step-with-dynamic-output-path branch October 27, 2021 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants