Skip to main content

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

Option A: Install from PyPI (Recommended)

pip install jupyter-serial-scheduler

Option B: Install from Source

  1. Clone the repository:

    git clone https://github.com/chandan2300/Serial-Notebook-Executor.git
    cd Serial-Notebook-Executor
    
  2. Install the package:

    pip install .
    

Usage

Once installed, you can use the nb-scheduler command from anywhere.

  1. Place Notebooks: Put your .ipynb files in a directory (e.g., notebooks/).

  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_serial_scheduler-0.2.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupyter_serial_scheduler-0.2.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_serial_scheduler-0.2.0.tar.gz.

File metadata

File hashes

Hashes for jupyter_serial_scheduler-0.2.0.tar.gz
Algorithm Hash digest
SHA256 97d0ba4e83826dcf6ab282ce8b5578137646a3fe47f3dde080581665f7b649fa
MD5 9894f5827c1567a545817d90e71d9f37
BLAKE2b-256 36922ec6469484d27daf1b07c4e1e0126f35f0470e7fd3690c252c71fd84dd80

See more details on using hashes here.

File details

Details for the file jupyter_serial_scheduler-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for jupyter_serial_scheduler-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38c91d2a9cb3476837642aa4d149e078f21a50b90b498be448068379f6e3bd97
MD5 9288109cc2b569faa9fe10f8df863a9f
BLAKE2b-256 af595ccee8cf6351e57f5311fb04a7240cc77fc050ef114c8c56996bb0ec56bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page