Skip to main content

PyTorch Lightning Training Studio App

The PyTorch Lightning Training Studio App is a full-stack AI application built using the Lightning framework to enable running experiments or sweeps with state-of-the-art sampling hyper-parameters algorithms and efficient experiment pruning strategies and more.

Learn more here.


Installation

Create a new virtual environment with python 3.8+

python -m venv .venv
source .venv/bin/activate

Clone and install lightning-hpo.

git clone https://github.com/Lightning-AI/lightning-hpo && cd lightning-hpo

pip install -e . -r requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --pre

Make sure everything works fine.

python -m lightning run app app.py

Check the documentation to learn more !


Run the Training Studio App locally

In your first terminal, run the Lightning App.

lightning run app app.py

In second terminal, connect to the Lightning App and download its CLI.

lightning connect localhost --yes
lightning --help

Usage: lightning [OPTIONS] COMMAND [ARGS]...

  --help     Show this message and exit.

Lightning App Commands
Usage: lightning [OPTIONS] COMMAND [ARGS]...

  --help     Show this message and exit.

Lightning App Commands
  create data        Create a Data association by providing a public S3 bucket and an optional mount point.
                     The contents of the bucket can be then mounted on experiments and sweeps and
                     accessed through the filesystem.
  delete data        Delete a data association. Note that this will not delete the data itself,
                     it will only make it unavailable to experiments and sweeps.
  delete experiment  Delete an experiment. Note that artifacts will still be available after the operation.
  delete sweep       Delete a sweep. Note that artifacts will still be available after the operation.
  download artifacts Download artifacts for experiments or sweeps.
  run experiment     Run an experiment by providing a script, the cloud compute type and optional
                     data entries to be made available at a given path.
  run sweep          Run a sweep by providing a script, the cloud compute type and optional
                     data entries to be made available at a given path. Hyperparameters can be
                     provided as lists (`model.lr="[0.01, 0.1]"`) or using distributions
                     (`model.lr="uniform(0.01, 0.1)"`, `model.lr="log_uniform(0.01, 0.1)"`).
                     Hydra multirun override syntax is also supported.
  show artifacts     Show artifacts for experiments or sweeps, in flat or tree layout.
  show data          List all data associations.
  show experiments   Show experiments and their statuses.
  show logs          Show logs of an experiment or a sweep. Optionally follow logs as they stream.
  show sweeps        Show all sweeps and their statuses, or the experiments for a given sweep.
  stop experiment    Stop an experiment. Note that currently experiments cannot be resumed.
  stop sweep         Stop all experiments in a sweep. Note that currently sweeps cannot be resumed.

You are connected to the local Lightning App. Return to the primary CLI with `lightning disconnect`.

Run your first Sweep from sweep_examples/scripts folder

lightning run sweep train.py --model.lr "[0.001, 0.01, 0.1]" --data.batch "[32, 64]" --algorithm="grid_search" --requirements 'jsonargparse[signatures]>=4.15.2'

Scale by running the Training Studio App in the Cloud

Below, we are about to train a 1B+ LLM Model with multi-node.

lightning run app app.py --cloud

Connect to the App once ready.

lightning connect {APP_NAME} --yes

Run your first multi node training experiment from sweep_examples/scripts folder (2 nodes of 4 V100 GPUS each).

lightning run experiment big_model.py --requirements deepspeed lightning-transformers==0.2.5 --num_nodes=2 --cloud_compute=gpu-fast-multi --disk_size=80

Metadata

Release files for lightning-training-studio 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightning-training-studio 0.0.7
File Size Uploaded
lightning_training_studio-0.0.7.tar.gz 1.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightning-training-studio 0.0.7
File Interpreter ABI Platform
lightning_training_studio-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 2.1 MB

Release files / lightning_training_studio-0.0.7.tar.gz

Download URL lightning_training_studio-0.0.7.tar.gz
Size 1.0 MB
Tags Source
SHA-256 checksum
How to use checksums
a426ffae546b94de0a1436200ddb73538605e71d7d5f03cbe1bdbee81c00dbee
BLAKE2b-256 checksum
How to use checksums
e58785c90a3cf15da580eb962c2ba862746b58c7fe185d25d0c2d761c48c0fbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / lightning_training_studio-0.0.7-py3-none-any.whl

Download URL lightning_training_studio-0.0.7-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
453078f0ef9456339b1b405ac7df286dffa247a86c8bd81133081b5e9164c0ae
BLAKE2b-256 checksum
How to use checksums
424509b98ca69efe12203d876762fa7298a5f635f6108eaa7d7d0bf5eed5d798
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.0.7 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page