sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

Add numpy 2.0 support

Open rsareddy0329 opened this issue 6 months ago • 1 comments

Issue #, if available: https://github.com/aws/sagemaker-python-sdk/issues/4882

Description of changes:

  • Added numpy 2.0 support

Testing done:

  • Checking with the relevant teams on integ tests failure of xgboost, sklearn and tensorflow. Will post here based on latest updates.

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • [ ] I have read the CONTRIBUTING doc
  • [ ] I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • [ ] I used the commit message format described in CONTRIBUTING
  • [ ] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • [ ] I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • [ ] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [ ] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • [ ] I have checked that my tests are not configured for a specific region or account (if appropriate)
  • [ ] I have used unique_name_from_base to create resource names in integ tests (if appropriate)
  • [ ] If adding any dependency in requirements.txt files, I have spell checked and ensured they exist in PyPi

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

rsareddy0329 avatar Jun 10 '25 05:06 rsareddy0329

Please, PLEASE get this in production ASAP! We are a lot of ML-guys waiting for it :)

JakobAgeras avatar Jun 16 '25 10:06 JakobAgeras

Is it just the few failing integration tests left to fix up? I'd offer to help fix them but it's a little hard to see why they are failing from the output.

jmahlik avatar Jun 23 '25 21:06 jmahlik

Happy to help if needed. Would love to have numpy 2.x support

obohrer-otm avatar Jul 15 '25 14:07 obohrer-otm

Our ML team also hanging on this! Any required help we can support.

DavidRooney avatar Jul 23 '25 14:07 DavidRooney

Hey there, is this PR getting merged soon, seeing that NumPy v1 EoL is approaching in a month (https://endoflife.date/numpy)?

wickeat avatar Aug 15 '25 04:08 wickeat

If someone can digest/understand where it the last unittest fails, then i'm certain that a lot of people would be able (and want) to help fixing that. But it is a bit difficult to see what the issue is tbh

JakobAgeras avatar Aug 15 '25 08:08 JakobAgeras

Can we please prioritise getting this merged ASAP? As @wickeat mentioned, NumPy 1.x reaches EOL now in less than a week, and this issue has 50+ upvotes.

Would it be possible to update the packaged images to pass the failures for numpy 2.0?

Happy to help assist in debugging the specific integration issues if we can get more detailed error logs from the failing tests.

des1-gner avatar Sep 10 '25 04:09 des1-gner

It looks like all integration testing passed, and this was merged into the main branch - would you mind confirming the timeline / next steps here: https://github.com/aws/sagemaker-python-sdk/issues/4882

It looks like you changed the numpy constraint from being pinned exactly to version 1.26.4 using ==1.26.4, to now supporting a range from 1.26.4 up to (but not including) 2.3.3 using >=1.26.4,<2.3.3, which includes numpy 2.x versions. Can you confirm you have fixed the dependency issues and all the updates to other packages (scipy, pandas, scikit-learn, tensorflow, etc.) are correct and working as intended?

des1-gner avatar Oct 09 '25 21:10 des1-gner