Skip to content

Conversation

BenZickel
Copy link
Contributor

See #3424 for details.

fritzo
fritzo previously approved these changes Apr 7, 2025
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.

LGTM once ci passes. I very much appreciate your maintenance contributions!

@BenZickel
Copy link
Contributor Author

@fritzo , last remaining failure is exactly at this line. The unpickled easyguide actually works (the line after the line I mentioned).

The error message is

File "c:\SW\pyro-ppl\pyro\nn\module.py", line 527, in __call__
    result = super().__call__(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 1739, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 1750, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\SW\pyro-ppl\pyro\contrib\easyguide\easyguide.py", line 104, in forward
    result = self.guide(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\SW\pyro-ppl\tests\contrib\easyguide\test_easyguide.py", line 79, in guide
    self.group(match="state_[0-9]*").map_estimate()
  File "c:\SW\pyro-ppl\pyro\contrib\easyguide\easyguide.py", line 313, in map_estimate
    site["name"]: self.guide.map_estimate(site["name"])
                  ^^^^^^^^^^
  File "c:\SW\pyro-ppl\pyro\contrib\easyguide\easyguide.py", line 243, in guide
    return self._guide()
           ^^^^^^^^^^^^^
  File "c:\SW\pyro-ppl\pyro\nn\module.py", line 527, in __call__
    result = super().__call__(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 1739, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\ProgramData\Anaconda3\Lib\site-packages\torch\nn\modules\module.py", line 1750, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "c:\SW\pyro-ppl\pyro\contrib\easyguide\easyguide.py", line 104, in forward
    result = self.guide(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: PickleGuide.guide() missing 3 required positional arguments: 'batch', 'subsample', and 'full_size'

Any idea what is going on here? I'm not sure it is related to Python 3.12.

@fritzo
Copy link
Member

fritzo commented Apr 8, 2025

@BenZickel I'm not sure what's wrong. Given that easyguide is in pyro.contrib, and that it has few users, and that those users rarely pickle their easyguides, I think it's ok to mark this test xfail and point to a new issue to track the bug.

@pytest.mark.xfail(reason="https://github.com/pyro-ppl/pyro/issues/XXXXXX")

@BenZickel BenZickel requested a review from fritzo April 9, 2025 23:36
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.

Thanks, @BenZickel!

@fritzo fritzo merged commit 428fba7 into pyro-ppl:dev Apr 10, 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