Conversation
| PY2 = sys.version_info.major == 2 | ||
|
|
||
| try: | ||
| from pymor.core.pickle import dumps, load |
There was a problem hiding this comment.
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.
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.
What is the benefit of these changes?
There was a problem hiding this comment.
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.
This seems helpful. Can you make a separate PR for it?
just FYI