aws / aws/sagemaker-python-sdk

ModelBuilder import issues in a SageMaker Studio Notebook

Open
#5,371 2 comments 7 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.3k
Forks
1.3k
Avg merge
1d 22h
Merged PRs (30d)
35

Description

## Issue

Hello,

I'm trying to update from SageMaker v2 --> v3, and have had issues with importing the `ModelBuilder` module. I'm trying to follow this documentation: https://github.com/aws/sagemaker-python-sdk/blob/master/v3-examples/ml-ops-examples/v3-pipeline-train-create-registry.ipynb

The error received when importing the `ModelBuilder` module:

```
ModuleNotFoundError: No module named 'sagemaker.serve.spec'
```

## Repro steps

1. Start a SageMaker Studio Jupyter Notebook
2. Install the latest SageMaker v3.1.0 from github directly: `!pip install git+https://github.com/aws/sagemaker-python-sdk.git@v3.1.0`
3. Import the module: `from sagemaker.serve.model_builder import ModelBuilder`

## Screenshot

Image

Contributor guide

Open the contributing guide

Research direction

Start with the v3-examples/ml-ops-examples/v3-pipeline-train-create-registry.ipynb example and reproduce the import in a SageMaker Studio Jupyter Notebook using the reported installation command. Check the `from sagemaker.serve.model_builder import ModelBuilder` entry point and the missing `sagemaker.serve.spec` error; done means the documented import works without ModuleNotFoundError.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.