lightning-training-studio


Namelightning-training-studio JSON
Version 0.0.7 PyPI version JSON
download
home_pagehttps://github.com/PyTorchLightning/lightning
SummaryLightning HPO
upload_time2022-12-12 10:00:41
maintainer
docs_urlNone
authorPyTorchLightning et al.
requires_python>=3.6
licenseTBD
keywords deep learning pytorch ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">
    <h1>
        PyTorch Lightning Training Studio App
    </h1>

<div align="center">

<p align="center">
  <a href="https://www.lightning.ai/">Lightning Gallery</a> •
  <a href="https://lightning-ai.github.io/lightning-hpo">Docs</a> •
  <a href="https://github.com/Lightning-AI/lightning-hpo/tree/master/examples">Examples</a>
</p>

[![ReadTheDocs](https://readthedocs.org/projects/pytorch-lightning/badge/?version=0.0.7)](https://lightning-ai.github.io/lightning-hpo)
[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack)](https://www.pytorchlightning.ai/community)
[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lightning/blob/master/LICENSE)
</div>

The [PyTorch Lightning Training Studio App](https://lightning-ai.github.io/lightning-hpo/training_studio.html) is a full-stack AI application built using the [Lightning](https://lightning.ai/lightning-docs/) 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](https://github.com/Lightning-AI/lightning-hpo#the-training-studio-app).

</div>

______________________________________________________________________

## Installation

Create a new virtual environment with python 3.8+

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

Clone and install lightning-hpo.

```bash
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.

```bash
python -m lightning run app app.py
```

Check the [documentation](https://lightning-ai.github.io/lightning-hpo) to learn more !

______________________________________________________________________

## Run the Training Studio App locally

In your first terminal, run the Lightning App.

```bash
lightning run app app.py
```

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

```bash
lightning connect localhost --yes
```

```bash
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](./sweep_examples/scripts) folder

```bash
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.

```bash
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](./sweep_examples/scripts) folder (2 nodes of 4 V100 GPUS each).

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/PyTorchLightning/lightning",
    "name": "lightning-training-studio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "deep learning,pytorch,AI",
    "author": "PyTorchLightning et al.",
    "author_email": "thomas@grid.ai",
    "download_url": "https://files.pythonhosted.org/packages/e5/87/85c90a3cf15da580eb962c2ba862746b58c7fe185d25d0c2d761c48c0fbd/lightning_training_studio-0.0.7.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n    <h1>\n        PyTorch Lightning Training Studio App\n    </h1>\n\n<div align=\"center\">\n\n<p align=\"center\">\n  <a href=\"https://www.lightning.ai/\">Lightning Gallery</a> \u2022\n  <a href=\"https://lightning-ai.github.io/lightning-hpo\">Docs</a> \u2022\n  <a href=\"https://github.com/Lightning-AI/lightning-hpo/tree/master/examples\">Examples</a>\n</p>\n\n[![ReadTheDocs](https://readthedocs.org/projects/pytorch-lightning/badge/?version=0.0.7)](https://lightning-ai.github.io/lightning-hpo)\n[![Slack](https://img.shields.io/badge/slack-chat-green.svg?logo=slack)](https://www.pytorchlightning.ai/community)\n[![license](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/Lightning-AI/lightning/blob/master/LICENSE)\n</div>\n\nThe [PyTorch Lightning Training Studio App](https://lightning-ai.github.io/lightning-hpo/training_studio.html) is a full-stack AI application built using the [Lightning](https://lightning.ai/lightning-docs/) framework to enable running experiments or sweeps with state-of-the-art sampling hyper-parameters algorithms and efficient experiment pruning strategies and more.\n\nLearn more [here](https://github.com/Lightning-AI/lightning-hpo#the-training-studio-app).\n\n</div>\n\n______________________________________________________________________\n\n## Installation\n\nCreate a new virtual environment with python 3.8+\n\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\nClone and install lightning-hpo.\n\n```bash\ngit clone https://github.com/Lightning-AI/lightning-hpo && cd lightning-hpo\n\npip install -e . -r requirements.txt --find-links https://download.pytorch.org/whl/cpu/torch_stable.html --pre\n```\n\nMake sure everything works fine.\n\n```bash\npython -m lightning run app app.py\n```\n\nCheck the [documentation](https://lightning-ai.github.io/lightning-hpo) to learn more !\n\n______________________________________________________________________\n\n## Run the Training Studio App locally\n\nIn your first terminal, run the Lightning App.\n\n```bash\nlightning run app app.py\n```\n\nIn second terminal, connect to the Lightning App and download its CLI.\n\n```bash\nlightning connect localhost --yes\n```\n\n```bash\nlightning --help\n\nUsage: lightning [OPTIONS] COMMAND [ARGS]...\n\n  --help     Show this message and exit.\n\nLightning App Commands\nUsage: lightning [OPTIONS] COMMAND [ARGS]...\n\n  --help     Show this message and exit.\n\nLightning App Commands\n  create data        Create a Data association by providing a public S3 bucket and an optional mount point.\n                     The contents of the bucket can be then mounted on experiments and sweeps and\n                     accessed through the filesystem.\n  delete data        Delete a data association. Note that this will not delete the data itself,\n                     it will only make it unavailable to experiments and sweeps.\n  delete experiment  Delete an experiment. Note that artifacts will still be available after the operation.\n  delete sweep       Delete a sweep. Note that artifacts will still be available after the operation.\n  download artifacts Download artifacts for experiments or sweeps.\n  run experiment     Run an experiment by providing a script, the cloud compute type and optional\n                     data entries to be made available at a given path.\n  run sweep          Run a sweep by providing a script, the cloud compute type and optional\n                     data entries to be made available at a given path. Hyperparameters can be\n                     provided as lists (`model.lr=\"[0.01, 0.1]\"`) or using distributions\n                     (`model.lr=\"uniform(0.01, 0.1)\"`, `model.lr=\"log_uniform(0.01, 0.1)\"`).\n                     Hydra multirun override syntax is also supported.\n  show artifacts     Show artifacts for experiments or sweeps, in flat or tree layout.\n  show data          List all data associations.\n  show experiments   Show experiments and their statuses.\n  show logs          Show logs of an experiment or a sweep. Optionally follow logs as they stream.\n  show sweeps        Show all sweeps and their statuses, or the experiments for a given sweep.\n  stop experiment    Stop an experiment. Note that currently experiments cannot be resumed.\n  stop sweep         Stop all experiments in a sweep. Note that currently sweeps cannot be resumed.\n\nYou are connected to the local Lightning App. Return to the primary CLI with `lightning disconnect`.\n```\n\nRun your first Sweep from [sweep_examples/scripts](./sweep_examples/scripts) folder\n\n```bash\nlightning 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'\n```\n\n______________________________________________________________________\n\n## Scale by running the Training Studio App in the Cloud\n\nBelow, we are about to train a 1B+ LLM Model with multi-node.\n\n```bash\nlightning run app app.py --cloud\n```\n\nConnect to the App once ready.\n\n```\nlightning connect {APP_NAME} --yes\n```\n\nRun your first  multi node training experiment from [sweep_examples/scripts](./sweep_examples/scripts) folder (2 nodes of 4 V100 GPUS each).\n\n```bash\nlightning run experiment big_model.py --requirements deepspeed lightning-transformers==0.2.5 --num_nodes=2 --cloud_compute=gpu-fast-multi --disk_size=80\n```\n",
    "bugtrack_url": null,
    "license": "TBD",
    "summary": "Lightning HPO",
    "version": "0.0.7",
    "split_keywords": [
        "deep learning",
        "pytorch",
        "ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "53bc3683907d01a2a7449a53854d4c2f",
                "sha256": "453078f0ef9456339b1b405ac7df286dffa247a86c8bd81133081b5e9164c0ae"
            },
            "downloads": -1,
            "filename": "lightning_training_studio-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "53bc3683907d01a2a7449a53854d4c2f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 1082630,
            "upload_time": "2022-12-12T10:00:39",
            "upload_time_iso_8601": "2022-12-12T10:00:39.700695Z",
            "url": "https://files.pythonhosted.org/packages/42/45/09b98ca69efe12203d876762fa7298a5f635f6108eaa7d7d0bf5eed5d798/lightning_training_studio-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "678ad75968021e37bc00dd94f7eb4afd",
                "sha256": "a426ffae546b94de0a1436200ddb73538605e71d7d5f03cbe1bdbee81c00dbee"
            },
            "downloads": -1,
            "filename": "lightning_training_studio-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "678ad75968021e37bc00dd94f7eb4afd",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 1030456,
            "upload_time": "2022-12-12T10:00:41",
            "upload_time_iso_8601": "2022-12-12T10:00:41.555873Z",
            "url": "https://files.pythonhosted.org/packages/e5/87/85c90a3cf15da580eb962c2ba862746b58c7fe185d25d0c2d761c48c0fbd/lightning_training_studio-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-12 10:00:41",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "PyTorchLightning",
    "github_project": "lightning",
    "lcname": "lightning-training-studio"
}
        
Elapsed time: 0.02271s