An IPython Kernel that automatically saves and restores Jupyter Notebook execution states.
Project description
ElasticKernel
Never lose your Jupyter variables to a kernel restart again.
ElasticKernel is a custom IPython kernel that automatically checkpoints your notebook's execution state and restores it after a restart or crash — no manual pickle.dump required. Pick up exactly where you left off.
🇯🇵 日本語版は README.ja.md を参照してください。
Why ElasticKernel?
Every Jupyter user has been there: a long computation finishes, then an accidental kernel
restart (or an out-of-memory crash) wipes every variable in your session. The usual
workaround is scattering pickle.dump / joblib.dump calls everywhere and remembering to
reload them by hand.
ElasticKernel removes that chore entirely:
- 🔄 Automatic state recovery — your variables survive kernel restarts and shutdowns, with zero changes to your code.
- 🧠 Dependency-aware — tracks how cells and variables depend on one another to restore a consistent state.
- ⚡ Cost-optimized checkpoints — for each variable it decides whether to serialize it or recompute it on restore, based on serialization size vs. recomputation cost (a min-cut optimization).
- 🪄 Drop-in — just pick the
Python 3 (ElasticKernel)kernel; the rest of your workflow is unchanged.
Installation & Usage
Local
-
Install the package:
$ pip install elastic-kernel
-
Install the kernel:
$ elastic-kernel install Elastic Kernel installed from: /path/to/elastic_kernel
-
Verify the kernel is installed:
$ jupyter kernelspec list Available kernels: elastic_kernel /path/to/Jupyter/kernels/elastic_kernel
-
Launch JupyterLab:
$ jupyter lab --ip=0.0.0.0
-
Open JupyterLab in your browser.
-
Select the Python 3 (ElasticKernel) kernel.
Docker
-
Pull the image:
docker pull ghcr.io/mryutaro/elastickernel
-
Start a container:
docker run -p 8888:8888 ghcr.io/mryutaro/elastickernel
-
Open JupyterLab in your browser.
-
Select the Python 3 (ElasticKernel) kernel.
How It Works
ElasticKernel extends the IPython kernel to observe each cell execution. As you run cells it builds a dependency graph of variables and the cell executions that produce them. When the kernel shuts down or restarts, it profiles serialization speed, runs a cost optimizer to split variables into a migrate set (serialized to disk) and a recompute set (regenerated by re-running cells), and writes a checkpoint. On the next start it loads the checkpoint, injects the migrated variables back into your namespace, and recomputes the rest.
Documentation
- Developer guide: docs/DEVELOPERS.md
- 日本語 README: README.ja.md
Publication
This project was presented in the following paper. If you use ElasticKernel in your research, please cite:
R. Matsumoto, K. Taniguchi, T. Hayami, K. Takahashi, and S. Date. "ElasticHub: A Cost-Efficient JupyterHub Platform via Automated Scaling with Kubernetes on Hybrid Cloud." Proceedings of the 16th International Conference on Cloud Computing and Services Science, pp. 261–268, 2026. DOI: 10.5220/0014840200004039
@inproceedings{matsumoto2026elastichub,
author = {Matsumoto, R. and Taniguchi, K. and Hayami, T. and Takahashi, K. and Date, S.},
title = {ElasticHub: A Cost-Efficient JupyterHub Platform via Automated Scaling with Kubernetes on Hybrid Cloud},
booktitle = {Proceedings of the 16th International Conference on Cloud Computing and Services Science},
year = {2026},
pages = {261--268},
isbn = {978-989-758-829-7},
issn = {2184-5042},
doi = {10.5220/0014840200004039}
}
Acknowledgments
This project includes code from ElasticNotebook, developed at the University of Illinois. ElasticNotebook is licensed under the Apache License 2.0.
Zhaoheng Li, Pranav Gor, Rahul Prabhu, Hui Yu, Yuzhou Mao, Yongjoo Park. "ElasticNotebook: Enabling Live Migration for Computational Notebooks." Proceedings of the VLDB Endowment, Vol. 17, No. 2, pp. 119-133, 2023.
License
Licensed under the Apache License 2.0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file elastic_kernel-0.0.28.tar.gz.
File metadata
- Download URL: elastic_kernel-0.0.28.tar.gz
- Upload date:
- Size: 43.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f4bf1db66b647113dffaa278079c2fcd4dcccb926f1926be1198bc80283975
|
|
| MD5 |
2f0d619846de27477ac8bce4a7bb15c5
|
|
| BLAKE2b-256 |
bf30e48f569d3a99e9f18d36c023cccb9c6a65722d580765573198efc52577f6
|
Provenance
The following attestation bundles were made for elastic_kernel-0.0.28.tar.gz:
Publisher:
publish-to-pypi.yml on MRyutaro/ElasticKernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elastic_kernel-0.0.28.tar.gz -
Subject digest:
55f4bf1db66b647113dffaa278079c2fcd4dcccb926f1926be1198bc80283975 - Sigstore transparency entry: 1816817195
- Sigstore integration time:
-
Permalink:
MRyutaro/ElasticKernel@4900c1e76bd144991429cc94a37ffbd3ef145136 -
Branch / Tag:
refs/tags/v0.0.28 - Owner: https://github.com/MRyutaro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@4900c1e76bd144991429cc94a37ffbd3ef145136 -
Trigger Event:
push
-
Statement type:
File details
Details for the file elastic_kernel-0.0.28-py3-none-any.whl.
File metadata
- Download URL: elastic_kernel-0.0.28-py3-none-any.whl
- Upload date:
- Size: 51.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
242b40d1cdbbf18480796d39da9d13f3c5d833ab33369ea24c762d7244655c23
|
|
| MD5 |
e4389cdf1c008f74fbd7ab6f23b101bc
|
|
| BLAKE2b-256 |
118c4c4422718a3040ce1ec2bf218970b5e6fff53ac401113bdb754875e83b57
|
Provenance
The following attestation bundles were made for elastic_kernel-0.0.28-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on MRyutaro/ElasticKernel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
elastic_kernel-0.0.28-py3-none-any.whl -
Subject digest:
242b40d1cdbbf18480796d39da9d13f3c5d833ab33369ea24c762d7244655c23 - Sigstore transparency entry: 1816817274
- Sigstore integration time:
-
Permalink:
MRyutaro/ElasticKernel@4900c1e76bd144991429cc94a37ffbd3ef145136 -
Branch / Tag:
refs/tags/v0.0.28 - Owner: https://github.com/MRyutaro
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@4900c1e76bd144991429cc94a37ffbd3ef145136 -
Trigger Event:
push
-
Statement type: