aws / aws/aws-step-functions-data-science-sdk-python
ModelDataUrl is incorrect when result_path is defined in TrainingStep
- Dominant language
- Python
- Stars
- 299
- Forks
- 84
- PR merge metrics
- No merged PRs in 30d
Description
The ModelDataUrl in the Step Functions' defenition is '“ModelDataUrl.$“: “$[‘ModelArtifacts’][‘S3ModelArtifacts’]”' even though the result_path is defined in the TrainingStep, and it causes error like this.
> “An error occurred while executing the state ‘Save Model’ (entered at the event id #8). The JSONPath ’$[‘ModelArtifacts’][‘S3ModelArtifacts’]' specified for the field ‘ModelDataUrl.$’ could not be found in the input ...
It should be '“ModelDataUrl.$“: “$[‘TrainingStepResults’][‘ModelArtifacts’][‘S3ModelArtifacts’]”'.
```
training_step = steps.TrainingStep(
‘Model Training’,
estimator=tf_estimator,
data={
‘training’: inputs
},
job_name=execution_input[‘TrainingJobName’],
result_path=‘$.TrainingStepResults’,
wait_for_completion=True
)
model_step = steps.ModelStep(
‘Save Model’,
model=training_step.get_expected_model(),
model_name=execution_input[‘ModelName’],
instance_type=‘ml.m5.xlarge’,
result_path=‘$.ModelStepResults’
)
```
Contributor guide
Research direction
Start at the TrainingStep and ModelStep definitions that build the Step Functions definition, then trace how result_path is applied to ModelDataUrl. Reproduce the supplied training_step and model_step configuration and verify that the generated path is nested under TrainingStepResults while the model output remains usable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, python
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100