aws / aws/amazon-sagemaker-examples
instance_type is a PipelineVariable (<class 'sagemaker.workflow.parameters.ParameterString'>). Its interpreted value in execution time should not be of GPU types since GPU training is not supported for Scikit-Learn. The input argument instance_type of function (sagemaker.image_uris.retrieve) is a pipeline variable (<class 'sagemaker.workflow.parameters.ParameterString'>), which is not allowed. The default_value of this Parameter object will be used to override it. Please make sure the default_value is valid
- Dominant language
- Jupyter Notebook
- Stars
- 11k
- Forks
- 7k
- Avg merge
- 8h 29m
- Merged PRs (30d)
- 8
Description
**Link to the notebook**
[Parameterize SageMaker Pipelines.](https://github.com/aws/amazon-sagemaker-examples/blob/main/sagemaker-pipeline-parameterization/parameterized-pipeline.ipynb)
**Describe the bug**
I am building a Sagemaker pipeline and trying to parameterize the instance type in the training step (and processing step as well). The parametrization itself is working and I can change the instance type in run time. However, this confusing message that pops while building the pipeline was scary for me at first. So, I suggest checking it.
**To reproduce**
```
est_cls = sagemaker.sklearn.estimator.SKLearn
instance= ParameterString(name = "instance", default_value = "ml.m5.xlarge")
PP_Step = FrameworkProcessor(role=role.default_value,
instance_count= 1,
instance_type= instance.to_string(),
estimator_cls=est_cls,
framework_version = "1.0-1")
PP_Step _args = PP_Step .run(code="code.py",
source_dir="cod",
job_name = "TestName",
arguments=[])
_Step = ProcessingStep(name="PP_Step",
step_args=PP_Step _args)
```
**Logs**
instance_type is a PipelineVariable (). Its interpreted value in execution time should not be of GPU types since GPU training is not supported for Scikit-Learn.
The input argument instance_type of function (sagemaker.image_uris.retrieve) is a pipeline variable (), which is not allowed. The default_value of this Parameter object will be used to override it. Please make sure the default_value is valid.
Contributor guide
Research direction
Open sagemaker-pipeline-parameterization/parameterized-pipeline.ipynb and reproduce the parameterized instance_type example with FrameworkProcessor and SKLearn. Start by tracing the warning from sagemaker.image_uris.retrieve and compare it with the runtime parameter behavior. Done means the message is no longer confusing while valid Scikit-Learn pipeline parameterization remains supported.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100