Rich logging still auto-enabled in sagemaker.core
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- machine-learning
Research direction
Start at sagemaker-core/src/sagemaker/core/init.py:4 and compare its import-time Rich setup with the opt-in behavior described in aws/sagemaker-core#325. Verify that importing sagemaker no longer installs Rich tracebacks or replaces the root logger, and that the reported Jupyter job output remains plain and scrollable by default.
Written by the indexing model from the issue text.
Description
PySDK Version
PySDK V3
Describe the bug
sagemaker/core/init.py:4 unconditionally calls enable_textual_rich_console_and_traceback() at import time, which installs Rich tracebacks (rich.traceback.install) and replaces the root logger with RichHandler the moment sagemaker is imported.
aws/sagemaker-core#325 (merged Aug 2025) fixed this in the standalone sagemaker-core package by making Rich opt-in, but that change was never applied to the bundled copy in sagemaker-python-sdk.
To reproduce
import sagemaker
# Rich tracebacks are now globally installed
# Rich logging handler is now the root handler
# Any SageMaker job output (processing, training) renders with Rich formatting
from sagemaker.core.helper.session_helper import Session
from sagemaker.core.processing import FrameworkProcessor
sess = Session()
processor = FrameworkProcessor(
image_uri="<any-image>",
role="<any-role>",
instance_type="ml.m5.xlarge",
instance_count=1,
)
processor.run(code="script.py", source_dir="source_dir", wait=True)
# Output is non-scrollable Rich-formatted text in Jupyter
Expected behavior
Rich logging should be opt-in (as intended by sagemaker-core#325), not automatically enabled on import. Job outputs in Jupyter notebooks should be scrollable plain text by default.
Screenshots or logs
System information
SageMaker Python SDK version: 3.4.1 (sagemaker-core 2.4.1)
Python version: 3.11
- Dominant language
- Python
- Stars
- 2.3k
- Forks
- 1.3k
- Avg merge
- 3d 9h
- Merged PRs (30d)
- 42
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws/sagemaker-python-sdk
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
aws/sagemaker-python-sdk#6278 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/sagemaker-python-sdk#6253 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 93/100
aws/sagemaker-python-sdk#6232 ·
-
component: model monitor type: bug
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
aws/sagemaker-python-sdk#6206 ·
-
component: model builder type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
aws/sagemaker-python-sdk#6199 ·
All issues in aws/sagemaker-python-sdk
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100