-
Notifications
You must be signed in to change notification settings - Fork 160
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
Ksagiyam/io do not use pickle #2787
Conversation
20e4d76
to
8b99dbc
Compare
8b99dbc
to
2e070b4
Compare
firedrake/bcs.py
Outdated
@@ -347,11 +347,11 @@ def function_arg(self, g): | |||
try: | |||
g = as_ufl(g) | |||
self._function_arg = g | |||
except UFLException: | |||
except BaseException: |
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.
ValueError
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.
Fixed.
firedrake/checkpointing.py
Outdated
|
||
def _load_ufl_element(self, path, name): | ||
if self.has_attr(path, name + "_repr"): | ||
return eval(self.get_attr(path, name + "_repr")) |
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.
locals = {}
globals = {}
eval("from ufl import *", locals, globals)
return eval(self.get_attr(path, name + "_repr"), locals, globals)
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.
Fixed.
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.
minor quibble.
93ce8e7
to
8c07488
Compare
cca43bc
to
29b1266
Compare
Merged as discussed. |
Checkpoints should now hopefully be more stable after firedrakeproject/firedrake#2787
Use
repr
instead of pickling.Involves a minor fix in UFL, so depends on firedrakeproject/ufl#34