A tool to execute Jupyter Notebooks sequentially with resource isolation.
Project description
Jupyter Notebook Scheduler
A simple Python script to execute multiple Jupyter Notebooks sequentially. This tool ensures that each notebook runs in a separate process, guaranteeing that GPU memory and other resources are fully released between runs.
Features
- Sequential Execution: Runs notebooks one after another.
- Resource Isolation: Each notebook runs in a fresh process, clearing the kernel and freeing GPU memory upon completion.
- Detailed Logging:
- Real-time cell-level progress in the console (clean output).
- Automatic log file generation in
logs/for each run. - Captures Cell Outputs: Actual output from code cells (print statements, etc.) is saved to the log file but hidden from the console to keep it tidy.
- Robust Error Handling:
- Stops execution if a notebook fails.
- Saves the failed notebook with the error traceback, allowing for easy debugging.
Installation
-
Clone the repository:
git clone https://github.com/chandan2300/Serial-Notebook-Executor.git cd Serial-Notebook-Executor
-
Install the package:
pip install .
Usage
Once installed, you can use the nb-scheduler command from anywhere.
-
Place Notebooks: Put your
.ipynbfiles in a directory (e.g.,notebooks/). -
Run the Scheduler:
Option A: Run default list (defined in script)
nb-scheduler
Option B: Run specific notebooks
nb-scheduler notebooks/test_nb_1.ipynb notebooks/test_nb_2.ipynb
Configuration
You can modify scheduler.py to change the list of notebooks or the directory they are located in.
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 jupyter_serial_scheduler-0.1.0.tar.gz.
File metadata
- Download URL: jupyter_serial_scheduler-0.1.0.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
048daef92c3b5c11e384d96bb7358ef3e0223ba191b60f9f21e0cca1a81f76f1
|
|
| MD5 |
9d83a3ab47f46b92493c8ee442b3950e
|
|
| BLAKE2b-256 |
28129a1f37e5af7ae00ed443aa87735b50dc82e634910fa891dd7b2ad0397bc6
|
File details
Details for the file jupyter_serial_scheduler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jupyter_serial_scheduler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d39375c0c2ff29638e7a09f567220864d5030042c1c687703db6b58194e7aa56
|
|
| MD5 |
6309274ef2865aa3bcc516d0dbc17bc3
|
|
| BLAKE2b-256 |
d21487a75197548e75434dc0ea777cf011ab63614f772f0e3f5075c2d4f5100a
|