Skip to content

Create Model Step fails when when we pass the URL as a Pipeline Parameter for model_data #3091

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

Closed
rohangpatil opened this issue May 3, 2022 · 4 comments
Labels
component: pipelines Relates to the SageMaker Pipeline Platform type: bug

Comments

@rohangpatil
Copy link

Describe the bug
A clear and concise description of what the bug is.

To reproduce
The below code works

model = XGBoostModel(
      model_data="s3://<...>/model.tar.gz",
      role=role,
      sagemaker_session=sagemaker_session,
      entry_point="inference_entrypoint.py",
      framework_version="1.5-1",
    )

This doesnt work.

model_url = ParameterString(name="ModelURL")
model = XGBoostModel(
      model_data=model_url,
      role=role,
      sagemaker_session=sagemaker_session,
      entry_point="inference_entrypoint.py",
      framework_version="1.5-1",
    )

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots or logs
This is not what is expected.
Screen Shot 2022-05-03 at 11 28 49 AM
This is expected
Screen Shot 2022-05-03 at 11 30 04 AM

System information
A description of your system. Please provide:

SageMaker Python SDK version: 2.87.0
Framework name (eg. PyTorch) or algorithm (eg. KMeans): XGBoost
Framework version: 1.5-1
Python version: 3.7.10
CPU or GPU: CPU
Custom Docker image (Y/N): N

Additional context
Add any other context about the problem here.

@jessieweiyi
Copy link

jessieweiyi commented May 5, 2022

This issue is similar to #3078. Related to ParameterString.

@jerrypeng7773
Copy link
Contributor

We have a PR under review to fix this, as a workaround, you can give the parameter a default value like this

model_url = ParameterString(name="ModelURL", default="my-model")

and then override this parameter to the actual value while starting the pipeline execution.

Sorry for the inconvenience.

@rohangpatil
Copy link
Author

We have a PR under review to fix this, as a workaround, you can give the parameter a default value like this

model_url = ParameterString(name="ModelURL", default="my-model")

and then override this parameter to the actual value while starting the pipeline execution.

Sorry for the inconvenience.

Thanks! Some how this workaround works.

@qidewenwhen
Copy link
Member

@rohangpatil The fix has been released. Could you check if it works for you?
Closing this issue and feel free to reopen if you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pipelines Relates to the SageMaker Pipeline Platform type: bug
Projects
None yet
Development

No branches or pull requests

5 participants