Skip to content

Model.deploy() returning None instead of predictor/endpoint object #4619

Closed

Description

@vaibhavsingh007

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

from sagemaker.model import Model
from sagemaker.predictor import Predictor

instance_type, instance_count = "ml.m5.xlarge", 1

predictor = model.deploy(
    initial_instance_count=instance_count,
    instance_type=instance_type,
    predictor_cls=Predictor
)

Above code snippet from this article returns None for predictor instead of the endpoint object.

To reproduce
A clear, step-by-step set of instructions to reproduce the bug.
The provided code need to be complete and runnable, if additional data is needed, please include them in the issue.

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

Endpoint object per the article linked above, that can be used to invoke and delete the endpoint.

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.216.1
  • Framework name (eg. PyTorch) or algorithm (eg. KMeans): Not sure
  • Framework version: NA
  • Python version: 3.9.6
  • CPU or GPU: NA (using Sagemaker Jumpstart, instance_type="ml.m5.xlarge")
  • Custom Docker image (Y/N): N

Additional context
Add any other context about the problem here.

Trying to test with the following jumpstart model:
model_id, model_version = "huggingface-spc-bert-base-cased", "1.0.0"

Activity

  1. self-assigned this
    on Feb 3, 2025
  2. mollyheamazon commented on Feb 3, 2026

    @mollyheamazon
    Contributor

    Hi @vaibhavsingh007

    Great news! This issue has been resolved with the release of SageMaker Python SDK v3.

    How to Get the Latest Version

    You can upgrade to the latest v3 package using pip:

    pip install --upgrade sagemaker
    
    ##Or specify the version explicitly:
    pip install sagemaker>=3.0.0

    Additional Resources:

     PyPI: https://pypi.org/project/sagemaker/
     Documentation: https://sagemaker.readthedocs.io/

    If you're still experiencing this issue after upgrading, please feel free to reopen this issue or create a new one with updated details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions