Skip to content

The sagemaker model object URI is over-written when calling the compile API  #1947

@kkoppolu1

Description

@kkoppolu1

Describe the bug
The sagemaker Model object can be created by supplying the image_uri attribute. However, when the compile API is invoked on the object, the image URI gets over-written. The overwrite is happening at https://github.com/aws/sagemaker-python-sdk/blob/master/src/sagemaker/model.py#L403.

To reproduce

  1. Create a sagemaker Model object like MXNetModel or PyTorchModel with an image_uri set.
  2. Invoke compile with target instance from the "ml" family (eg ml_c5).
  3. Inspect the image URI of the object.
    NOTE: If it is the same, it maybe because the value you chose is the same as the value being set. Try another value for the image_uri.

Expected behavior
When the model is created with a specific image_uri, it is expected that the model adheres to it and does not overwrite it.

Screenshots or logs
If applicable, add screenshots or logs to help explain your problem.

System information
A description of your system. Please provide:

  • SageMaker Python SDK version: 2.0
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): MXNet and PyTorch. Could impact other frameworks.
  • Framework version: MXNet: 1.7. PyTorch: 1.4
  • Python version: py3
  • CPU or GPU: CPU. Impacts GPU as well.
  • Custom Docker image (Y/N): N

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions