-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Make batchrunner's "variable parameters" optional. #492
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
|
Can anyone help write a test? I looked at it for a while but wasn't sure how to best approach it. I haven't written tests before :) I was thinking to just copy the function at the bottom of test_batchrunner.py and set Also I don't understand why the function |
| """ | ||
| def __init__(self, model_cls, variable_parameters=None, | ||
| def __init__(self, model_cls, variable_parameters={}, |
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.
It's generally not a good practice to use a mutable value (e.g. {}) as a default argument. In this case I don't think anything harmful would happen, but I'd suggest leaving None as the default value just in case, and for general Pythonic-ness. Then you can add something like if not variable_parameters: variable_parameters = {}
|
It's been a while since I've looked at the test code, but it looks like in |
|
@dmasad -- can you remind me / us where this left off? other than fixing conflicts? (I can't remember what as the explicit ask on this.) |
|
This is 'fixed' but the new code isn't covered by any tests. Unfortunately I haven't had the time to look into that and I don't think I'll have time in upcoming weeks either. Also the variable_parameters={} should be taken care of as Dmasad already mentioned, which should be very simple to do. |
|
Turns out this is slightly more complicated than expected because |
|
Closing; superseded by #596 |
Fixes #466