-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fixes in smc backend refactoring, added test #2286
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
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, will merge when tests pass
@@ -13,15 +14,13 @@ | |||
@pytest.mark.xfail(condition=(theano.config.floatX == "float32"), reason="Fails on float32") | |||
class TestSMC(SeededTest): | |||
|
|||
def setup_method(self): | |||
super(TestSMC, self).setup_method() | |||
def setup_class(self): |
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.
just want to make sure this is intentional -- you'll now reuse the same test folder for every test in the class
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.
ah good point! will fix that!
edit: no fix needed, as we set the rm_flag=True it removes the previous results
with open(self.atmip_path(prev), 'rb') as buff: | ||
return pickle.load(buff) | ||
|
||
with model: |
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 that this nesting is explicit, but just for interest's sake:
starting with python 2.7 you can use multiple context managers in one line
with open(...) as buff, model:
step = pickle.load(buff)
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.
cool! didnt know that! but here I think it is indeed better to have them nested for clarity
thanks! |
Fixes to refactoring from @ColCarrol , added test that tests stage_handler features.