Skip to content

Commit 8aaa9cb

Browse files
committed
Revert numpy lower bound fix, fix for unit test of djl and pandas
1 parent 2417501 commit 8aaa9cb

3 files changed

Lines changed: 22 additions & 7 deletions

File tree

sagemaker-core/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727
"packaging>=20.0",
2828
"protobuf>=3.12,<5.0",
2929
"pandas>=1.0.0",
30-
"numpy>=1.23.0",
30+
"numpy>=1.9.0",
3131
# Dependencies migrated from sagemaker_utils
3232
"smdebug_rulesconfig>=1.0.1",
3333
"schema>=0.7.5",

sagemaker-core/tests/unit/image_uris/test_djl.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,12 @@ def _test_djl_uris(account, region, version, tag, djl_framework):
8686
# Known missing framework:version:region combinations that don't exist in ECR
8787
KNOWN_MISSING_COMBINATIONS = {
8888
"djl-lmi": {
89-
"0.36.0": {"ap-east-2"},
89+
"0.36.0-lmi18.0.0-cu128": {"ap-east-2"},
90+
"0.35.0-lmi17.0.0-cu128": {"ap-east-2"},
91+
"0.34.0-lmi16.0.0-cu128": {"ap-east-2"},
92+
"0.33.0-lmi15.0.0-cu128": {"ap-east-2"},
93+
"0.32.0-lmi14.0.0-cu126": {"ap-east-2"},
94+
"0.31.0-lmi13.0.0-cu124": {"ap-east-2"},
9095
"0.30.0-lmi12.0.0-cu124": {"ap-east-2"},
9196
"0.29.0-lmi11.0.0-cu124": {"ap-east-2"},
9297
"0.28.0-lmi10.0.0-cu124": {"ap-east-2"},
@@ -206,7 +211,8 @@ def _test_djl_uris(account, region, version, tag, djl_framework):
206211
},
207212
},
208213
"djl-tensorrtllm": {
209-
"0.33.0": {"ap-east-2"},
214+
"0.33.0-tensorrtllm0.21.0-cu128": {"ap-east-2"},
215+
"0.32.0-tensorrtllm0.12.0-cu125": {"ap-east-2"},
210216
"0.30.0-tensorrtllm0.12.0-cu125": {"ap-east-2"},
211217
"0.29.0-tensorrtllm0.11.0-cu124": {"ap-east-2"},
212218
"0.28.0-tensorrtllm0.9.0-cu122": {"ap-east-2"},

sagemaker-core/tests/unit/test_analytics.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,8 @@
1717
import pytest
1818
from unittest.mock import Mock, patch, MagicMock, mock_open
1919
from collections import OrderedDict
20-
21-
# Mock pandas before importing analytics
2220
import sys
2321

24-
sys.modules["pandas"] = MagicMock()
25-
2622
from sagemaker.core.analytics import (
2723
AnalyticsMetricsBase,
2824
HyperparameterTuningJobAnalytics,
@@ -33,6 +29,19 @@
3329
)
3430

3531

32+
@pytest.fixture(autouse=True)
33+
def mock_pandas_for_analytics():
34+
"""Mock pandas for analytics tests only, with proper cleanup."""
35+
original_pandas = sys.modules.get("pandas")
36+
sys.modules["pandas"] = MagicMock()
37+
yield
38+
# Restore original pandas after each test
39+
if original_pandas is not None:
40+
sys.modules["pandas"] = original_pandas
41+
elif "pandas" in sys.modules:
42+
del sys.modules["pandas"]
43+
44+
3645
class TestAnalyticsMetricsBase:
3746
"""Test AnalyticsMetricsBase abstract class."""
3847

0 commit comments

Comments
 (0)