Repository navigation
Unconditional LazyTransform workaround - #1099
Merged
gmoss13 merged 5 commits intoMar 24, 2024
Merged
Conversation
There was a problem hiding this comment.
Hello @gmoss13, the Unconditional class not being a proper LazyTransform / LazyDistribution has been bugging me for a while. I should fix that 😅 In the mean time, you can create an UnconditionaLazyTransform by subclassing both Unconditional and LazyTransform. See my suggestions.
Contributor
Author
|
Hi @francois-rozet, thanks a lot for jumping in with a solution, you beat me to it 😄 |
francois-rozet
approved these changes
Mar 22, 2024
francois-rozet
suggested changes
Mar 22, 2024
Contributor
Author
|
Changing from |
manuelgloeckler
approved these changes
Mar 24, 2024
manuelgloeckler
left a comment
Contributor
There was a problem hiding this comment.
Looks good from my point of view.
One could add some docs for a few functions, but not necessarily.
Contributor
Author
|
Thanks Manuel! Adding docstring and merging! |
janfb
deleted the
1074-compatibility-fo-lazytransform-and-affinetransform-
branch
June 20, 2024 10:34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes
Currently, the z-scoring layer for zuko transforms uses the
Unconditionalclass from zuko, however this throws a pyright error when creating zuko flows, asUnconditionaldoes not inherit fromLazyTransform, which is expected to be the class of all transforms in a zukoFlowobject. Here we create a temporary workaround, and will also start an issue in zuko for this.Does this close any currently open issues?
Fixes #1074
Checklist
guidelines
with
pytest.mark.slow.guidelines
main(or there are no conflicts withmain)