-
Notifications
You must be signed in to change notification settings - Fork 14
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
Unified API #8
Unified API #8
Conversation
batch, | ||
inplace=False, | ||
) | ||
for key in expected: |
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.
i don't get what this little bit is doing down here
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.
I just wanted to test that inplace=True
indeed modifies the input state in-place, whilst inplace=False
leaves the input state untouched.
Definitely this could be improved, although perhaps in a later PR
) -> TransformState: | ||
"""Initiate a state. | ||
|
||
Args: |
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.
explain this a bit?
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.
Lol yep definitely
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.
LGTM, just left some clarifying questions!
This PR provides a unified API for uqlib methods.
The unified API is optax/BlackJAX style with
init
,update
andbuild
functions:examples/lightning_autoencoder.py has a full example of how to use the API with pytorch lightning in a way that you can seamlessly swap between
sghmc
andvi.diag
.