-
Notifications
You must be signed in to change notification settings - Fork 52
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
Builder: tidy correctness examples #1630
Conversation
It occurs to me that some of these could be in |
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 like the idea of higher-level builders provided in this library! I bet if we look at our generators, we'll find other useful patterns to add to this library!
Thanks for taking a look! Most of what you suggested is now in. I'll sum up the remaining items. I think these can all be no-ops, or separate PRs if we do want them to be acted upon.
|
Just pushed a fix for #1626 so hopefully that can be merged and we can move this to |
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.
Very very cool!!!! I found a few code-level suggestions to offer, but I really like the idea of continuing to "upstream" useful utilities that help make the Python generator code easier to read/write.
I think it might be even more natural for these to live right in the |
@sampsyo fair enough! Let's merge this into the builder API itself then |
Thank you both for your time!! I've resolved most of the comments, either via commits or via new issues. What's left is: |
Excellent! |
Just a quick pass to lift a few common Python methods into their own file. This is presently just for the arbiter and the reduction tree, but the incoming FIFO/PIFO/PIFO tree work will benefit from these as well.
One additional observation has to do with how
cb.if_
andcb.while_
often get used. I will make comments in the code below. If you like it, we can put those changes in too.