-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Nested zero.Init() and dynamically defined model class #2989
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
Conversation
|
Thank you for your patience - this looks good, @tohtana - I did some testing and it works well for the cases I tried. Now something this sensitive of a change can't be merged w/o adding comprehensive tests. In both issues I have supplied ready to use the tests already, so it should be trivial to integrate those. But also think if perhaps some of my tests don't cover something cases, so please add those as well. I think these tests would go the best here: Thank you again, this is a really important PR. |
|
I don't think rebasing is going to help if the tests added in this PR fail As the error is: it usually means the test isn't set up properly. If help is needed please let me know. |
This PR aims to fix the following issues described in #2811 and #2812.
zero.Init()causes infinite recursionzero.Init()does not properly partition parameters of a model class that is dynamically defined inside the contextAccording to the discussion on #2812, this change enables
zero.Init()to detect dynamically defined classes and properly sets wrappers to the constructors of the classes. This also manages the hierarchical contexts ofzero.Init().