Closed fivegrant closed 5 months ago
@mattprintz and I came up with a few TODOs
[x] Make the connection kernel a property of the subkernel. ProxyKernelClient shouldn't be the parent class.
[x] Move subkernel into BaseContext
[ ] Move the following functions into BaseContext
[x] Rename current checkpoint to something like 'most recent checkpoint'
[x] Use tempfile module instead of writing to /tmp
[x] Break out checkpoint functionality into class BaseCheckpointKernel
This PR exposes two actions
add_checkpoint
androllback
which serializes the kernel's state (variables, functions, and imported modules) and allows the kernel to be restored to the previous saved state. Currently, checkpointing is only implemented for the Python subkernel.Changes from this PR:
BaseCheckpointableSubkernel
is the new class that contains the new functionality. Subkernels still can inherit from the originalBaseSubkernel
instead if we want to avoid checkpointing for a specific language.connected_kernel
is no longer inbeaker-kernel
. Instead, it is a property of the subkernel. We're encapsulating more functionality inside of the subkernel itself.beaker-kernel
to the context along withexecute
andevaluate
.Work for Future PRs