From 4288634d1989eefc589f0db59ff70a5f3232a74c Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Thu, 22 Oct 2026 16:04:00 -0700 Subject: [PATCH 1/2] fix(serve): pin pandas to 2.x in test extra to unblock unit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The sagemaker-serve unit-tests job runs py310/py311/py312 tox envs. pandas is pulled in transitively (via mlflow) and is unpinned, so pip resolves the newly released pandas 3.1.0 on py311/py312 (3.x requires Python >=3.11). That build leaves the C extensions unbuilt in CI ("ImportError: C extension: None not built"), so pytest fails at collection and the whole job goes red — even though py310 (pandas 2.3.3) passes all tests. This is environment/dependency churn, unrelated to any product change. Pin pandas to the 2.x line in the test extra so all three envs resolve the known-good 2.3.3 (what py310 already uses). Verified locally: `pandas>=2.3.0,<3` resolves to 2.3.3 and imports cleanly on Python 3.12. --- sagemaker-serve/pyproject.toml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sagemaker-serve/pyproject.toml b/sagemaker-serve/pyproject.toml index 6be2f1ba81..f8fb3a6d3c 100644 --- a/sagemaker-serve/pyproject.toml +++ b/sagemaker-serve/pyproject.toml @@ -69,6 +69,12 @@ test = [ "onnxruntime", "torch>=2.0.0", "tritonclient[http]", + # pandas is pulled in transitively (e.g. via mlflow). Pin to the 2.x line: + # pandas 3.x requires Python >=3.11, and on the py311/py312 unit-test envs + # its CI install leaves the C extensions unbuilt ("ImportError: C extension: + # None not built"), which fails pytest at collection time. 2.3.3 is the + # version the py310 env already resolves to and passes on. + "pandas>=2.3.0,<3", ] dev = [ "pytest", From 372ddb3cea4af068042a156c9b90c9599fe092fa Mon Sep 17 00:00:00 2001 From: Roja Reddy Sareddy Date: Thu, 22 Oct 2026 16:23:25 -0700 Subject: [PATCH 2/2] fix(serve): cap pandas below 3.1.0 (last-known-good 3.0.6) Refine the pin to the last-known-good state: before pandas 3.1.0 was released, the py311/py312 unit-test envs resolved pandas 3.0.6 and passed; py310 resolves 2.3.3 (pandas 3.x requires Python >=3.11). 3.1.0's wheels are built against a newer NumPy C-ABI than those envs resolve, so it fails to import at collection. `>=2.3.0,<3.1.0` restores py311/py312 to 3.0.6 and keeps py310 on 2.3.3 -- exactly the configuration that was green before the 3.1.0 release. A hard ==3.0.6 is intentionally avoided because it would break the py310 env. --- sagemaker-serve/pyproject.toml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sagemaker-serve/pyproject.toml b/sagemaker-serve/pyproject.toml index f8fb3a6d3c..5ac819cc95 100644 --- a/sagemaker-serve/pyproject.toml +++ b/sagemaker-serve/pyproject.toml @@ -69,12 +69,13 @@ test = [ "onnxruntime", "torch>=2.0.0", "tritonclient[http]", - # pandas is pulled in transitively (e.g. via mlflow). Pin to the 2.x line: - # pandas 3.x requires Python >=3.11, and on the py311/py312 unit-test envs - # its CI install leaves the C extensions unbuilt ("ImportError: C extension: - # None not built"), which fails pytest at collection time. 2.3.3 is the - # version the py310 env already resolves to and passes on. - "pandas>=2.3.0,<3", + # pandas is pulled in transitively (e.g. via mlflow). Cap below 3.1.0: + # pandas 3.1.0 ships wheels built against a newer NumPy C-ABI than the + # py311/py312 test envs resolve, so it fails to import ("ImportError: + # C extension: None not built") at pytest collection time. The previous + # release 3.0.6 was passing on py311/py312; py310 stays on the 2.x line + # (2.3.3) because pandas 3.x requires Python >=3.11. + "pandas>=2.3.0,<3.1.0", ] dev = [ "pytest",