aws / aws/sagemaker-python-sdk

Missing jumpstart region_config.json file on Sagemaker distribution (SDK v2)

クローズ
#5,550 コメント 1 件 リアクション 7 件 担当者 0 名 GitHub で見る
主要言語
Python
スター
2.3k
フォーク
1.3k
平均マージ
1日 22時間
マージ済み PR(30日)
35

説明

**PySDK Version**
- PySDK V2 (2.257.0)

**Describe the bug**
Error being logged when trying to load src/sagemaker/jumpstart/region_config.json not included in the MANIFEST.in file.

**To reproduce**
1. Install Sagemaker SDK version 2.257.0 using Poetry
2. Install ddtrace (e.g. v3.16.2)
3. Deploy and boot a Python service with sagemaker and ddtrace dependency
4. sagemaker/jumpstart/constants.py loads this file at import time and, when it’s missing, logs an ERROR with exc_info=True and continues with an empty set—so the app doesn’t crash but monitoring (e.g. Datadog via ddtrace) reports the error.

**Expected behavior**
The region_config.json included in the distribution binaries, avoiding the jumpstart error logs instead of just ignoring it.

**Screenshots or logs**
`
Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/sagemaker/jumpstart/constants.py", line 69, in _load_region_config
with open(filepath) as f:
^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/ddtrace/appsec/_common_module_patches.py", line 135, in wrapped_open_CFDDB7ABBA9081B6
raise e.with_traceback(
File "/usr/local/lib/python3.11/site-packages/sagemaker/jumpstart/constants.py", line 69, in _load_region_config
with open(filepath) as f:
^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.11/site-packages/sagemaker/jumpstart/region_config.json'
`

**System information**
- **SageMaker Python SDK version**: 2.257.0
- **Framework name (eg. PyTorch) or algorithm (eg. KMeans)**: N/A (FastAPI service)
- **Framework version**: (N/A)
- **Python version**: 3.11.9
- **CPU or GPU**: CPU
- **Custom Docker image (Y/N)**: N

**Additional context**
Possible solution we see is to add this line to add so the JumpStart region config is included in the source distribution (sdist):
`include src/sagemaker/jumpstart/region_config.json`

The sagemaker/jumpstart/constants.py loads this file at import time and, when it’s missing, logs an ERROR with exc_info=True and continues with an empty set—so the app doesn’t crash but monitoring (e.g. Datadog via ddtrace) reports the error.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start with MANIFEST.in and src/sagemaker/jumpstart/region_config.json, then inspect how the package is built and distributed. Build the source distribution and verify that sagemaker/jumpstart/region_config.json is included so importing sagemaker.jumpstart.constants no longer logs the missing-file error.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, python
領域
cloud, machine-learning
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
静か
明瞭さ
明確に書かれている
初心者へのやさしさ
58/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。