-
Notifications
You must be signed in to change notification settings - Fork 3
my recent changes #9
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
base: master
Are you sure you want to change the base?
Conversation
| PY2 = sys.version_info.major == 2 | ||
|
|
||
| try: | ||
| from pymor.core.pickle import dumps, load |
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 would prefer to not let have simdb any special cases for pyMOR. One could think of some mechanism, however, to customize pickling.
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 ran across the need to use pyMORs more advanced pickling in simdb quite often in the recent past, so any mechanism in simdb would be appreciated.
|
|
||
| @atexit.register | ||
| def _exit_hook(): | ||
| declare_finished() |
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.
What is the benefit of these changes?
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.
In an interactive (notebook) session, I want to manually declare the run finished to start postprocessing. In particular in a notebook, the run is only declared finished upon closing the notebook, so any code relying on asserting that the current run is finished usually requires a notebook restart, and so on...
| dump({kk: vv}, f, protocol=-1) | ||
| except PicklingError as e: | ||
| print(f'could not pickle "{kk}"') | ||
| raise e |
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.
This seems helpful. Can you make a separate PR for it?
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.
see #10
just FYI