The original issue text was:
calling ds.publish() twice should report the same run twice - the fact that it clears after publish breaks a common Jupyter workflow where you re-run some but not all of your cells.
yes, there's an edge case here where someone runs only some of the cells after restarting the kernel, but this change makes it at least less broken :)
However, Alaric had Principle Objections (see comments below).
An idea to fix this nicely came up and has been recorded in issue #6, but we need to try it and see if it works nicely in practice.
In the meantime, as a temporary fix, we should change the python Library like so:
- Add a
ds.start_run([optional description]) that starts a run, setting the description if provided. The implementation actually clears the buffered run state.
- Make
ds.publish([optional description]) NOT clear the buffered run state any more.
- Change the documentation to tell users to bracket their runs with
ds.start_run()...ds.publish(), so if there's multiple runs, each one is cleared after the previous publish due to the ds.start_run(), thereby isolating them.
- If you start to do things that record metadata before calling
ds.start_run(), you get reminded to call ds.start_run() first. This needn't be a fatal error.
ds.start_run() is really just a clear operation - but by calling it ds.start_run() we gently move users away from thinking about python library internal state and more about cleanly declaring their intentions...
The original issue text was:
However, Alaric had Principle Objections (see comments below).
An idea to fix this nicely came up and has been recorded in issue #6, but we need to try it and see if it works nicely in practice.
In the meantime, as a temporary fix, we should change the python Library like so:
ds.start_run([optional description])that starts a run, setting the description if provided. The implementation actually clears the buffered run state.ds.publish([optional description])NOT clear the buffered run state any more.ds.start_run()...ds.publish(), so if there's multiple runs, each one is cleared after the previous publish due to theds.start_run(), thereby isolating them.ds.start_run(), you get reminded to callds.start_run()first. This needn't be a fatal error.ds.start_run()is really just a clear operation - but by calling itds.start_run()we gently move users away from thinking about python library internal state and more about cleanly declaring their intentions...