Skip to content

Fixes #3430 (serializing an easyguide corrupts it). #3433

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

Merged
merged 1 commit into from
Apr 14, 2025

Conversation

BenZickel
Copy link
Contributor

@BenZickel BenZickel commented Apr 14, 2025

  • The issue is that on Python 3.12 the super() object of easyguide.Group started having the __getstate__ attribute (this doesn't happen in python 3.9), which is then called to return the state object, which is then modified without making a copy before modification, which causes the corruption.
  • The solution is to ensure that we always make a copy of the state object before modifying it.
  • This was tested on both python 3.9 and 3.12.

Copy link
Member

@fritzo fritzo left a comment

Choose a reason for hiding this comment

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

Nice work figuring this out!

@fritzo fritzo merged commit 147b357 into pyro-ppl:dev Apr 14, 2025
9 checks passed
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