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

Keep broadcasting information in make_shared_replacements #4492

Merged
merged 1 commit into from
Mar 10, 2021
Merged

Keep broadcasting information in make_shared_replacements #4492

merged 1 commit into from
Mar 10, 2021

Conversation

ExpectationMax
Copy link
Contributor

@ExpectationMax ExpectationMax commented Feb 27, 2021

It seems like broadcasting information gets lost when applying
pm.make_shared_replacements, leading to problems with the metropolis
sampler. Potentially related issues below:

This fix was previously suggested in the following issue:

It could be that further adaptations are necessary as indicated in the
issue. Strangely, this does not seem to lead to problems when using
NUTS.

This fixes issue #4491 and #3337

TODOs:

  • are the changes—especially new features—covered by tests and docstrings? (should add test)
  • linting/style checks have been run
  • right before it's ready to merge, mention the PR in the RELEASE-NOTES.md

@twiecki
Copy link
Member

twiecki commented Feb 27, 2021

Nice, that's an easy fix. Can you add a test that fails before and passes now with this?

@ExpectationMax
Copy link
Contributor Author

Sure! I'll take care of it in the next days :)

@michaelosthege
Copy link
Member

Hi @ExpectationMax !
We just merged the rename of our backend dependency (#4471).
You'll have to rebase your branch..

@ExpectationMax
Copy link
Contributor Author

@twiecki I think everything should be ready from my side :)

Copy link
Member

@michaelosthege michaelosthege left a comment

Choose a reason for hiding this comment

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

I added two small suggestions - @ExpectationMax @twiecki please consider them before merging :)

RELEASE-NOTES.md Outdated Show resolved Hide resolved
pymc3/tests/test_broadcasting.py Outdated Show resolved Hide resolved
pymc3/tests/test_broadcasting.py Outdated Show resolved Hide resolved
It seems like broadcasting information gets lost when applying
`pm.make_shared_replacements`, leading to problems with the metropolis
sampler. Potentially related issues below:
 - #1083
 - #1304
 - #1983

This fix was previously suggested in the following issue:
 - #3337

It could be that further adaptations are necessary as indicated in the
issue. Strangely, this does not seem to lead to problems when using
NUTS.
Copy link
Member

@ricardoV94 ricardoV94 left a comment

Choose a reason for hiding this comment

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

LGTM, I don't expect the changes to have any meaningful side-effects and seems to solve the known issues.

@ricardoV94
Copy link
Member

Thanks @ExpectationMax

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

Successfully merging this pull request may close these issues.

None yet

4 participants