<div align="center">
<img src="https://github.com/Lightning-AI/lightning-bolts/raw/0.6.0.post1/docs/source/_images/logos/bolts_logo.png" width="400px">
**Deep Learning components for extending PyTorch Lightning**
______________________________________________________________________
<p align="center">
<a href="#install">Installation</a> •
<a href="https://lightning-bolts.readthedocs.io/en/latest/">Latest Docs</a> •
<a href="https://lightning-bolts.readthedocs.io/en/0.6.0.post1">Stable Docs</a> •
<a href="#what-is-bolts">About</a> •
<a href="#team">Community</a> •
<a href="https://www.pytorchlightning.ai/">Website</a> •
<a href="https://www.grid.ai/">Grid AI</a> •
<a href="#license">License</a>
</p>
[![PyPI Status](https://badge.fury.io/py/lightning-bolts.svg)](https://badge.fury.io/py/lightning-bolts)
[![PyPI Status](https://pepy.tech/badge/lightning-bolts)](https://pepy.tech/project/lightning-bolts)
[![Build Status](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_apis/build/status/Lightning-AI.lightning-bolts?branchName=master)](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_build?definitionId=31&_a=summary&repositoryFilter=13&branchFilter=4923%2C4923)
[![codecov](https://codecov.io/gh/Lightning-AI/lightning-bolts/release/0.6.0.post1/graph/badge.svg?token=O8p0qhvj90)](https://codecov.io/gh/Lightning-AI/lightning-bolts)
[![Documentation Status](https://readthedocs.org/projects/lightning-bolts/badge/?version=latest)](https://lightning-bolts.readthedocs.io/en/latest/)
[![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/PytorchLightning/lightning-bolts/blob/master/LICENSE)
</div>
______________________________________________________________________
## Getting Started
Pip / Conda
```bash
pip install lightning-bolts
```
<details>
<summary>Other installations</summary>
Install bleeding-edge (no guarantees)
```bash
pip install git+https://github.com/PytorchLightning/lightning-bolts.git@master --upgrade
```
To install all optional dependencies
```bash
pip install lightning-bolts["extra"]
```
</details>
## What is Bolts
Bolts provides a variety of components to extend PyTorch Lightning such as callbacks & datasets, for applied research and production.
## News
- Sept 22: [Leverage Sparsity for Faster Inference with Lightning Flash and SparseML](https://devblog.pytorchlightning.ai/leverage-sparsity-for-faster-inference-with-lightning-flash-and-sparseml-cdda1165622b)
- Aug 26: [Fine-tune Transformers Faster with Lightning Flash and Torch ORT](https://devblog.pytorchlightning.ai/fine-tune-transformers-faster-with-lightning-flash-and-torch-ort-ec2d53789dc3)
#### Example 1: Accelerate Lightning Training with the Torch ORT Callback
Torch ORT converts your model into an optimized ONNX graph, speeding up training & inference when using NVIDIA or AMD GPUs. See the [documentation](https://lightning-bolts.readthedocs.io/en/latest/callbacks/torch_ort.html) for more details.
```python
from pytorch_lightning import LightningModule, Trainer
import torchvision.models as models
from pl_bolts.callbacks import ORTCallback
class VisionModel(LightningModule):
def __init__(self):
super().__init__()
self.model = models.vgg19_bn(pretrained=True)
...
model = VisionModel()
trainer = Trainer(gpus=1, callbacks=ORTCallback())
trainer.fit(model)
```
#### Example 2: Introduce Sparsity with the SparseMLCallback to Accelerate Inference
We can introduce sparsity during fine-tuning with [SparseML](https://github.com/neuralmagic/sparseml), which ultimately allows us to leverage the [DeepSparse](https://github.com/neuralmagic/deepsparse) engine to see performance improvements at inference time.
```python
from pytorch_lightning import LightningModule, Trainer
import torchvision.models as models
from pl_bolts.callbacks import SparseMLCallback
class VisionModel(LightningModule):
def __init__(self):
super().__init__()
self.model = models.vgg19_bn(pretrained=True)
...
model = VisionModel()
trainer = Trainer(gpus=1, callbacks=SparseMLCallback(recipe_path="recipe.yaml"))
trainer.fit(model)
```
## Are specific research implementations supported?
We'd like to encourage users to contribute general components that will help a broad range of problems, however components that help specifics domains will also be welcomed!
For example a callback to help train SSL models would be a great contribution, however the next greatest SSL model from your latest paper would be a good contribution to [Lightning Flash](https://github.com/PyTorchLightning/lightning-flash).
Use [Lightning Flash](https://github.com/PyTorchLightning/lightning-flash) to train, predict and serve state-of-the-art models for applied research. We suggest looking at our [VISSL](https://lightning-flash.readthedocs.io/en/latest/integrations/vissl.html) Flash integration for SSL based tasks.
## Contribute!
Bolts is supported by the PyTorch Lightning team and the PyTorch Lightning community!
Join our Slack and/or read our [CONTRIBUTING](./.github/CONTRIBUTING.md) guidelines to get help becoming a contributor!
______________________________________________________________________
## License
Please observe the Apache 2.0 license that is listed in this repository.
In addition the Lightning framework is Patent Pending.
Raw data
{
"_id": null,
"home_page": "https://github.com/Lightning-AI/lightning-bolts",
"name": "lightning-bolts",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "deep learning,pytorch,AI",
"author": "Lightning AI et al.",
"author_email": "pytorch@lightning.ai",
"download_url": "https://files.pythonhosted.org/packages/f0/23/0e5e5b5cfc2202f56b48353dc52dc91d3c4b85b09cb6439d996481491d45/lightning-bolts-0.6.0.post1.tar.gz",
"platform": null,
"description": "<div align=\"center\">\n\n<img src=\"https://github.com/Lightning-AI/lightning-bolts/raw/0.6.0.post1/docs/source/_images/logos/bolts_logo.png\" width=\"400px\">\n\n**Deep Learning components for extending PyTorch Lightning**\n\n______________________________________________________________________\n\n<p align=\"center\">\n <a href=\"#install\">Installation</a> \u2022\n <a href=\"https://lightning-bolts.readthedocs.io/en/latest/\">Latest Docs</a> \u2022\n <a href=\"https://lightning-bolts.readthedocs.io/en/0.6.0.post1\">Stable Docs</a> \u2022\n <a href=\"#what-is-bolts\">About</a> \u2022\n <a href=\"#team\">Community</a> \u2022\n <a href=\"https://www.pytorchlightning.ai/\">Website</a> \u2022\n <a href=\"https://www.grid.ai/\">Grid AI</a> \u2022\n <a href=\"#license\">License</a>\n</p>\n\n[![PyPI Status](https://badge.fury.io/py/lightning-bolts.svg)](https://badge.fury.io/py/lightning-bolts)\n[![PyPI Status](https://pepy.tech/badge/lightning-bolts)](https://pepy.tech/project/lightning-bolts)\n[![Build Status](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_apis/build/status/Lightning-AI.lightning-bolts?branchName=master)](https://dev.azure.com/Lightning-AI/lightning%20Bolts/_build?definitionId=31&_a=summary&repositoryFilter=13&branchFilter=4923%2C4923)\n[![codecov](https://codecov.io/gh/Lightning-AI/lightning-bolts/release/0.6.0.post1/graph/badge.svg?token=O8p0qhvj90)](https://codecov.io/gh/Lightning-AI/lightning-bolts)\n\n[![Documentation Status](https://readthedocs.org/projects/lightning-bolts/badge/?version=latest)](https://lightning-bolts.readthedocs.io/en/latest/)\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/PytorchLightning/lightning-bolts/blob/master/LICENSE)\n\n</div>\n\n______________________________________________________________________\n\n## Getting Started\n\nPip / Conda\n\n```bash\npip install lightning-bolts\n```\n\n<details>\n <summary>Other installations</summary>\n\nInstall bleeding-edge (no guarantees)\n\n```bash\npip install git+https://github.com/PytorchLightning/lightning-bolts.git@master --upgrade\n```\n\nTo install all optional dependencies\n\n```bash\npip install lightning-bolts[\"extra\"]\n```\n\n</details>\n\n## What is Bolts\n\nBolts provides a variety of components to extend PyTorch Lightning such as callbacks & datasets, for applied research and production.\n\n## News\n\n- Sept 22: [Leverage Sparsity for Faster Inference with Lightning Flash and SparseML](https://devblog.pytorchlightning.ai/leverage-sparsity-for-faster-inference-with-lightning-flash-and-sparseml-cdda1165622b)\n- Aug 26: [Fine-tune Transformers Faster with Lightning Flash and Torch ORT](https://devblog.pytorchlightning.ai/fine-tune-transformers-faster-with-lightning-flash-and-torch-ort-ec2d53789dc3)\n\n#### Example 1: Accelerate Lightning Training with the Torch ORT Callback\n\nTorch ORT converts your model into an optimized ONNX graph, speeding up training & inference when using NVIDIA or AMD GPUs. See the [documentation](https://lightning-bolts.readthedocs.io/en/latest/callbacks/torch_ort.html) for more details.\n\n```python\nfrom pytorch_lightning import LightningModule, Trainer\nimport torchvision.models as models\nfrom pl_bolts.callbacks import ORTCallback\n\n\nclass VisionModel(LightningModule):\n def __init__(self):\n super().__init__()\n self.model = models.vgg19_bn(pretrained=True)\n\n ...\n\n\nmodel = VisionModel()\ntrainer = Trainer(gpus=1, callbacks=ORTCallback())\ntrainer.fit(model)\n```\n\n#### Example 2: Introduce Sparsity with the SparseMLCallback to Accelerate Inference\n\nWe can introduce sparsity during fine-tuning with [SparseML](https://github.com/neuralmagic/sparseml), which ultimately allows us to leverage the [DeepSparse](https://github.com/neuralmagic/deepsparse) engine to see performance improvements at inference time.\n\n```python\nfrom pytorch_lightning import LightningModule, Trainer\nimport torchvision.models as models\nfrom pl_bolts.callbacks import SparseMLCallback\n\n\nclass VisionModel(LightningModule):\n def __init__(self):\n super().__init__()\n self.model = models.vgg19_bn(pretrained=True)\n\n ...\n\n\nmodel = VisionModel()\ntrainer = Trainer(gpus=1, callbacks=SparseMLCallback(recipe_path=\"recipe.yaml\"))\ntrainer.fit(model)\n```\n\n## Are specific research implementations supported?\n\nWe'd like to encourage users to contribute general components that will help a broad range of problems, however components that help specifics domains will also be welcomed!\n\nFor example a callback to help train SSL models would be a great contribution, however the next greatest SSL model from your latest paper would be a good contribution to [Lightning Flash](https://github.com/PyTorchLightning/lightning-flash).\n\nUse [Lightning Flash](https://github.com/PyTorchLightning/lightning-flash) to train, predict and serve state-of-the-art models for applied research. We suggest looking at our [VISSL](https://lightning-flash.readthedocs.io/en/latest/integrations/vissl.html) Flash integration for SSL based tasks.\n\n## Contribute!\n\nBolts is supported by the PyTorch Lightning team and the PyTorch Lightning community!\n\nJoin our Slack and/or read our [CONTRIBUTING](./.github/CONTRIBUTING.md) guidelines to get help becoming a contributor!\n\n______________________________________________________________________\n\n## License\n\nPlease observe the Apache 2.0 license that is listed in this repository.\nIn addition the Lightning framework is Patent Pending.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Lightning Bolts is a community contribution for ML researchers.",
"version": "0.6.0.post1",
"project_urls": {
"Bug Tracker": "https://github.com/PyTorchLightning/lightning-bolts/issues",
"Documentation": "https://lightning-bolts.rtfd.io/en/latest/",
"Download": "https://github.com/PyTorchLightning/lightning-bolts",
"Homepage": "https://github.com/Lightning-AI/lightning-bolts",
"Source Code": "https://github.com/PyTorchLightning/lightning-bolts"
},
"split_keywords": [
"deep learning",
"pytorch",
"ai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b773b992893803a7d7ec8afe465f98d5b2808de22da11f3770d6094e08393aee",
"md5": "e0da51bfa1cac0d03dec5b322a3a63fd",
"sha256": "a93496d9cdd57a48dcd2a88fffe71bb7ec1f46a43e1d29d6cd852a29663d8a49"
},
"downloads": -1,
"filename": "lightning_bolts-0.6.0.post1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e0da51bfa1cac0d03dec5b322a3a63fd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 329994,
"upload_time": "2022-11-08T15:53:29",
"upload_time_iso_8601": "2022-11-08T15:53:29.347420Z",
"url": "https://files.pythonhosted.org/packages/b7/73/b992893803a7d7ec8afe465f98d5b2808de22da11f3770d6094e08393aee/lightning_bolts-0.6.0.post1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f0230e5e5b5cfc2202f56b48353dc52dc91d3c4b85b09cb6439d996481491d45",
"md5": "b212e718c27c63567f2bb0ee644b5f1d",
"sha256": "09330e0998c94922b2a1471b9175b2e2a4c2d42e3c4a4de07677369b4d41bc08"
},
"downloads": -1,
"filename": "lightning-bolts-0.6.0.post1.tar.gz",
"has_sig": false,
"md5_digest": "b212e718c27c63567f2bb0ee644b5f1d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 190482,
"upload_time": "2022-11-08T15:53:31",
"upload_time_iso_8601": "2022-11-08T15:53:31.046923Z",
"url": "https://files.pythonhosted.org/packages/f0/23/0e5e5b5cfc2202f56b48353dc52dc91d3c4b85b09cb6439d996481491d45/lightning-bolts-0.6.0.post1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-11-08 15:53:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Lightning-AI",
"github_project": "lightning-bolts",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "lightning-bolts"
}