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

  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.1.0.tar.gz (4.0 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.1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for jupyter_serial_scheduler-0.1.0.tar.gz
Algorithm Hash digest
SHA256 048daef92c3b5c11e384d96bb7358ef3e0223ba191b60f9f21e0cca1a81f76f1
MD5 9d83a3ab47f46b92493c8ee442b3950e
BLAKE2b-256 28129a1f37e5af7ae00ed443aa87735b50dc82e634910fa891dd7b2ad0397bc6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for jupyter_serial_scheduler-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d39375c0c2ff29638e7a09f567220864d5030042c1c687703db6b58194e7aa56
MD5 6309274ef2865aa3bcc516d0dbc17bc3
BLAKE2b-256 d21487a75197548e75434dc0ea777cf011ab63614f772f0e3f5075c2d4f5100a

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