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

tests: fix random graph hash #141

Closed
wants to merge 1 commit into from
Closed

Conversation

alexfikl
Copy link
Collaborator

@alexfikl alexfikl commented Jun 24, 2024

Seems like there was a numpy int that snuck in there and something changed about its hash in 2.0.

EDIT: It was actually this: the repr for an np.int64(3) changed from '3' to 'np.int64(3)'

    def map_constant(self, expr):
        self.key_hash.update(repr(expr).encode("utf8"))

Should the PersistentHashWalkMapper be changed instead?

@inducer
Copy link
Owner

inducer commented Jun 25, 2024

Thanks for tracking down what caused this! Yes, the PersistentHashWalkMapper should be fixed. I've done that in #142. Closing here.

@inducer inducer closed this Jun 25, 2024
@alexfikl alexfikl deleted the numpy-2.0 branch June 25, 2024 18:42
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