Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for numpy 2.0 #21684

Merged

Conversation

johnwparent
Copy link
Contributor

@johnwparent johnwparent commented Jul 4, 2024

Changes:

  • [workspace] Upgrade pybind11 to latest commit (Replace removed itemset method pybind11#72).
  • Disable Gynmasium-related regression tests on macOS. DrakeGym might not work anymore on macOS.
  • Update some unit test syntax for latest numpy.
  • Revert our temporary pin to numpy < 2. We no longer constraint numpy at all.
  • Fix namedview repr to add <> to comply with Python's required semantics.

Towards #21577.


This change is Reviewable

@johnwparent
Copy link
Contributor Author

cc @BetsyMcPhail

@jwnimmer-tri jwnimmer-tri self-assigned this Jul 4, 2024
@jwnimmer-tri
Copy link
Collaborator

Thanks, looks promising so far!

The next step is to push a second commit onto this branch that reverts #21582, and then launch every macOS Unprovisioned Experimental build (to see how it works versus numpy 2).

@johnwparent
Copy link
Contributor Author

@jwnimmer-tri pushed the revert, how do we kick off the extra jobs?

@jwnimmer-tri
Copy link
Collaborator

Docs at https://drake.mit.edu/jenkins.html, but here it is:

@drake-jenkins-bot mac-arm-sonoma-unprovisioned-clang-bazel-experimental-release please
@drake-jenkins-bot mac-arm-ventura-unprovisioned-clang-bazel-experimental-release please
@drake-jenkins-bot mac-arm-ventura-unprovisioned-clang-cmake-experimental-packaging please
@drake-jenkins-bot mac-arm-ventura-unprovisioned-clang-wheel-experimental-release please

@johnwparent
Copy link
Contributor Author

Thanks!

@jwnimmer-tri
Copy link
Collaborator

@drake-jenkins-bot mac-arm-sonoma-unprovisioned-clang-bazel-experimental-release please
@drake-jenkins-bot mac-arm-ventura-unprovisioned-clang-bazel-experimental-release please

I pushed some unit test fixes. We'll see how new builds fare.

If the Gym tests are still broken with upstream bugs (they were yesterday), then we'll just disavow Gym support on macOS and disable them.

@jwnimmer-tri jwnimmer-tri changed the title Update Pybind11 commit and sha to point to RobotLocomotion/pybind11/pull/72 [workspace] Upgrade pybind11 to latest commit Jul 8, 2024
@jwnimmer-tri
Copy link
Collaborator

... then we'll just disavow Gym support on macOS and disable them.

I've pushed this change now too.

Remaining work is to fix the namedvector test failure, and get our macOS CI machines up an running again.

@jwnimmer-tri

This comment was marked as outdated.

@jwnimmer-tri
Copy link
Collaborator

I'm going to let the current CI job finish to see where we stand, and then push the pybind11 git sha bump.

If the only remaining CI failure is the namedview test failure, I'll also push a nerf for that test.

Conceivably this will be green and ready to merge tomorrow morning.

@jwnimmer-tri jwnimmer-tri changed the title [workspace] Upgrade pybind11 to latest commit Add support for numpy 2.0 Jul 8, 2024
@jwnimmer-tri jwnimmer-tri added priority: high release notes: fix This pull request contains fixes (no new features) labels Jul 8, 2024
Copy link
Collaborator

@jwnimmer-tri jwnimmer-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r2, 2 of 4 files at r3, 2 of 3 files at r4, 3 of 3 files at r5, 3 of 3 files at r6, all commit messages.
Reviewable status: LGTM missing from assignee jwnimmer-tri(platform), needs at least two assigned reviewers, labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits) (waiting on @johnwparent)

@jwnimmer-tri
Copy link
Collaborator

@drake-jenkins-bot mac-arm-sonoma-unprovisioned-clang-bazel-experimental-release please
@drake-jenkins-bot mac-arm-ventura-unprovisioned-clang-bazel-experimental-release please

@jwnimmer-tri
Copy link
Collaborator

I am somewhat hopeful that CI might pass this time around. In any cases, we're close.

+@EricCousineau-TRI are you able to feature-review this? Goal would be to land it before Monday.

Copy link
Contributor

@EricCousineau-TRI EricCousineau-TRI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm_strong: feature
+@ggould-tri for platform please!

Reviewed 3 of 3 files at r2, 2 of 4 files at r3, 2 of 3 files at r4, 3 of 3 files at r5, 3 of 3 files at r6, all commit messages.
Reviewable status: LGTM missing from assignee ggould-tri(platform), labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits) (waiting on @johnwparent)

Copy link
Contributor

@ggould-tri ggould-tri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 3 of 3 files at r2, 2 of 4 files at r3, 2 of 3 files at r4, 3 of 3 files at r5, 3 of 3 files at r6, all commit messages.
Reviewable status: labeled "do not merge", commits need curation (https://drake.mit.edu/reviewable.html#curated-commits) (waiting on @johnwparent)

@jwnimmer-tri jwnimmer-tri merged commit a1dad61 into RobotLocomotion:master Jul 9, 2024
10 of 11 checks passed
@jwnimmer-tri jwnimmer-tri added status: squashing now https://drake.mit.edu/reviewable.html#curated-commits and removed status: do not merge labels Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high release notes: fix This pull request contains fixes (no new features) status: squashing now https://drake.mit.edu/reviewable.html#curated-commits
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants