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

Update package dependencies #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DhruvSrikanth
Copy link

@DhruvSrikanth DhruvSrikanth commented Oct 28, 2023

Simply updating the requirements of the package.

@DhruvSrikanth
Copy link
Author

DhruvSrikanth commented Jan 9, 2024

Following up on this since it would be helpful to merge for others facing basic dependency issues such as the ones this fix solves. Happy to elaborate as well. @hawkinsp @PetarV-

@DhruvSrikanth
Copy link
Author

Following up on this.

hawkinsp added a commit to hawkinsp/benchmark that referenced this pull request Jul 18, 2024
…bind 2.0.

Incorporates the nanobind_bazel change from google#1795.

nanobind 2.0 reworked the nanobind::enum_ class so it uses a real Python enum or intenum rather than its previous hand-rolled implementation.
google-deepmind/clrs#119 (comment)

As a consequence of that change, nanobind now checks when casting an integer to a enum value that the integer corresponds to a valid enum. Counter::Flags is a bitmask, and many combinations are not valid enum members.

This change:
a) sets nb::is_arithmetic(), which means Counter::Flags becomes an IntEnum that can be freely cast to an integer.
b) defines the | operator for flags to return an integer, not an enum, avoiding the error.
c) changes Counter's constructor to accept an int, not a Counter::Flags enum. Since Counter::Flags is an IntEnum now, it can be freely coerced to an int.

If wjakob/nanobind#599 is merged into nanobind, then we can perhaps use a flag enum here instead.
@RerRayne
Copy link
Collaborator

Hi @DhruvSrikanth,
Could you elaborate a bit on how you came up with this list of dependencies? I tried the one that is now used and didn't encounter any dependency problems.

@DhruvSrikanth
Copy link
Author

Hi @RerRayne,
Its what I needed to install to get it working. There were some dependencies missing previously from requirements.txt. That being said I see that the dependencies have since been updated so I think we can close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants