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

Estimator Output Path cannot accept Execution Input placeholder #85

Closed
lgimyuen opened this issue Sep 15, 2020 · 4 comments · Fixed by #173
Closed

Estimator Output Path cannot accept Execution Input placeholder #85

lgimyuen opened this issue Sep 15, 2020 · 4 comments · Fixed by #173
Assignees

Comments

@lgimyuen
Copy link

The arguments of sagemaker.estimator.Estimator() and sagemaker.tuner.HyperparameterTuner() doesn't accept ExecutionInput or StepInput as placeholder. E.g. for the output_path of sagemaker.estimator.Estimator() has to be fixed in the definition of workflow.

The current way around this is not to make use of stepfunctions.steps.sagemaker.TuningStep and use the generic step functions.steps.Task to invoke the arn:aws:states:::sagemaker:createHyperParameterTuningJob.sync with parameters from ExecutionInput and StepInput

@jackmuskopf
Copy link

jackmuskopf commented Apr 6, 2021

Same issue with stepfunctions.steps.ProcessingStep

@jackmuskopf
Copy link

jackmuskopf commented Apr 6, 2021

For instance, how do we do something like this using the stepfunctions.steps.ProcessingStep class? Specifically, S3Uri.$

"ProcessingOutputConfig": {
      "Outputs": [
        {
          "OutputName": "CleanData",
          "S3Output": {
            "S3Uri.$": "States.Format('s3://my-bucket/my/data/path/clean/{}', $$.Execution.Input['ExecutionName'])",
            "LocalPath": "/opt/ml/processing/output",
            "S3UploadMode": "EndOfJob"
          }
        }
      ]
    }

@ca-nguyen
Copy link
Contributor

Hi @jackmuskopf, thank you for your feature request!
Using placeholders with Sagemaker steps has been a popular requested feature - will start work on making TuningStep Placeholder compatible shortly.

Same issue with stepfunctions.steps.ProcessingStep

Support to use placeholders with ProcessingStep has been merged and will be added with the next release (see commit)

The DataScience SDK does not currently support StepFunctions Intrinsic Functions, but with this change, it will possible to configure any property in the parameters arg with Placeholders.

For example:

parameters = {
   "ProcessingOutputConfig": {
      "Outputs": [
        {
          "OutputName": "CleanData",
          "S3Output": {
            "S3Uri": execution_input['s3_uri'],
            "LocalPath": "/opt/ml/processing/output",
            "S3UploadMode": "EndOfJob"
          }
        }
      ]
    }
}

@ca-nguyen
Copy link
Contributor

Hi @jackmuskopf,

Support for placeholders for Tuning was added with #173.
It will be possible to use ExecutionInput or StepInput to define the values dynamically for any property defined in the parameter arg (see CreateHyperParameterTuningJob for the schema to follow)

Changes will be included in the the next release

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 a pull request may close this issue.

3 participants