Repository navigation
Commit b92de52
fix(serve): pin pandas below 3.1.0 to unblock serve unit tests (#6524)
* fix(serve): pin pandas to 2.x in test extra to unblock unit tests
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.
* 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.
---------
Co-authored-by: Roja Reddy Sareddy <rsareddy@amazon.com>1 parent aa37a9b commit b92de52
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
72 | 79 | | |
73 | 80 | | |
74 | 81 | | |
| |||
0 commit comments