aws / aws/sagemaker-python-sdk

[Bug]: PySDK V3: pydantic-core (2.42.0) incompatibility with sagemaker.ai_registry dataset import

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

Description

**PySDK Version**
- [ ] PySDK V3 (3.x)

**Describe the bug**
Fails with error below to import `from sagemaker.ai_registry.dataset import DataSet `
`SystemError: The installed pydantic-core version (2.42.0) is incompatible with the current pydantic version, which requires 2.41.5. If you encounter this error, make sure that you haven't upgraded pydantic-core manually.`
**To reproduce**
Run the below code in SageMakerAI Studio notebooks

!pip install --force-reinstall sagemaker sagemaker-serve sagemaker-mlops sagemaker-train sagemaker-core
or
!pip install 'sagemaker>=3.0,<4.0' boto3 pydantic-core -q --force-reinstall --no-deps # failed

from sagemaker.ai_registry.dataset import DataSet

**Expected behavior**
Fails with error below to import `from sagemaker.ai_registry.dataset import DataSet `
`SystemError: The installed pydantic-core version (2.42.0) is incompatible with the current pydantic version, which requires 2.41.5. If you encounter this error, make sure that you haven't upgraded pydantic-core manually.`

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

Image
Image

**System information**
A description of your system. Please provide:
- **SageMaker Python SDK version**: V3
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**:
- **Framework version**:
- **Python version**:
- **CPU or GPU**: SageMakerAI Studio notebooks
- **Custom Docker image (Y/N)**: N

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the import from sagemaker.ai_registry.dataset after running the listed pip commands in a SageMaker AI Studio notebook. Inspect the package dependency declarations for sagemaker, sagemaker-core, and pydantic to identify the incompatible pydantic-core constraint. Done means the installation commands complete and importing DataSet no longer raises the reported version error.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.