[IPython-dev] Fwd: [SciTech] ActivePapers Python edition
Konrad Hinsen
konrad.hinsen at fastmail.net
Sun Dec 8 06:16:04 EST 2013
Thomas Kluyver writes:
> On 5 December 2013 23:29, Konrad Hinsen <konrad.hinsen at fastmail.net> wrote:
>
> BTW, that's related to one of the open questions I have with
> integrating notebooks into ActivePapers: how to handle the case of a
> notebook whose cells have been executed interactively in a different
> order? This may well result in different datasets than a complete
> linear execution, so the cell execution order needs to be stored for
> reproduction. Is this information available in a notebook?
>
> Yes - the prompt numbers by the cells record the order of execution.
If that's the same information shown in the browser, then it's only
the number of the last execution that remains available. And that
means that I cannot reconstruct the history of execution. To make it
worse, a cell could have been modified and re-executed, so the
original code is no longer available.
> However, I think that the reproducible case should normally be the
> one where the cells are run in order from top to bottom. Running
> them out of order is convenient, but to check that a notebook all
> works together, it's common to clear all output, reset the kernel,
> and run all cells in order.
That's what people should do, but I still need to decide what to do
when a user runs cells randomly and then wants to save the notebook to
an ActivePapers backend. Since any result datasets are in a
non-reproducible state, the options are
1) Refuse with an error message.
2) Re-run the notebook in order before saving.
3) Save the notebook, but mark it and all its results as stale.
Stale datasets are marked as such and require an update
before they can be used in some other computation.
I'll probably go for 3) and see how this works out.
Konrad.
More information about the IPython-dev
mailing list