-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add Minipyro Example #8
Conversation
This should close #2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! I requested several mostly cosmetic changes below which are somewhat in the weeds, but which I think are worth addressing to make this example more effective as documentation for the library.
We can meet tomorrow and go through the more substantive design issues in the library that this exercise has uncovered.
tests/conftest.py
Outdated
try: | ||
item.runtest() | ||
except NotImplementedError as e: | ||
pytest.xfail(str(e)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which tests imported from pyroapi
fail without this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- tests which use the jit
- tests which use clipped ADAM
- tests which use
TraceMeanField_ELBO
- Tests which use the
event_dim
arg ofplate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, can we make this more specific so that it only xfails the failing minipyro tests? Otherwise this will apply to all current and future tests in effectful
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, the pyro-api
package is the one that raises the exceptions (which are just NotImplementedError
s), not us, so it's difficult to track the cause of each issue. I can do a check based on substrings which works for now, but it's a bit of a hack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A check based on substrings is OK for now. You might also be able to restrict this to only apply to tests in test_minipyro.py
, so that it doesn't inadvertently xfail tests in other parts of the library.
Can you run |
This re-implements the minipyro example from pyro on top of the effectful library. The pyro-api tests for the parts we've implemented are all passing.