{"id":26110022,"url":"https://github.com/Lightning-AI/lightning-bolts","last_synced_at":"2025-03-10T00:01:30.288Z","repository":{"id":37866434,"uuid":"250025410","full_name":"Lightning-Universe/lightning-bolts","owner":"Lightning-Universe","description":"Toolbox of models, callbacks, and datasets for AI/ML researchers.","archived":false,"fork":false,"pushed_at":"2024-10-07T22:18:36.000Z","size":5882,"stargazers_count":1688,"open_issues_count":64,"forks_count":323,"subscribers_count":23,"default_branch":"master","last_synced_at":"2024-10-29T15:43:36.511Z","etag":null,"topics":["ai","gan","image-processing","machine-learning","natural-language-processing","pytorch","supervised-learning"],"latest_commit_sha":null,"homepage":"https://lightning-bolts.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lightning-Universe.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-25T16:03:30.000Z","updated_at":"2024-10-29T15:11:16.000Z","dependencies_parsed_at":"2024-01-01T20:29:51.595Z","dependency_job_id":"63f2bcb5-b492-4866-b632-af7dcc5520be","html_url":"https://github.com/Lightning-Universe/lightning-bolts","commit_stats":{"total_commits":752,"total_committers":119,"mean_commits":6.319327731092437,"dds":0.8271276595744681,"last_synced_commit":"541f7018492b6a3b16558f9ea2a763b02a007a66"},"previous_names":["Lightning-AI/lightning-bolts","lightning-ai/lightning-bolts","pytorchlightning/lightning-bolts"],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightning-Universe%2Flightning-bolts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightning-Universe%2Flightning-bolts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightning-Universe%2Flightning-bolts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lightning-Universe%2Flightning-bolts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lightning-Universe","download_url":"https://codeload.github.com/Lightning-Universe/lightning-bolts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242768078,"owners_count":20182099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","gan","image-processing","machine-learning","natural-language-processing","pytorch","supervised-learning"],"created_at":"2025-03-10T00:01:00.143Z","updated_at":"2025-03-10T00:01:30.221Z","avatar_url":"https://github.com/Lightning-Universe.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"docs/source/_images/logos/bolts_logo.png\" width=\"400px\"\u003e\n\n**Deep Learning components for extending PyTorch Lightning**\n\n______________________________________________________________________\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#install\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"https://lightning-bolts.readthedocs.io/en/latest/\"\u003eLatest Docs\u003c/a\u003e •\n  \u003ca href=\"https://lightning-bolts.readthedocs.io/en/stable/\"\u003eStable Docs\u003c/a\u003e •\n  \u003ca href=\"#what-is-bolts\"\u003eAbout\u003c/a\u003e •\n  \u003ca href=\"#team\"\u003eCommunity\u003c/a\u003e •\n  \u003ca href=\"https://www.lightning.ai/\"\u003eWebsite\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n[![PyPI Status](https://badge.fury.io/py/lightning-bolts.svg)](https://badge.fury.io/py/lightning-bolts)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/lightning-bolts)](https://pepy.tech/project/lightning-bolts)\n[![Build Status](https://dev.azure.com/Lightning-AI/compatibility/_apis/build/status%2Fprojects%2FLightning-Universe.Bolts?branchName=master)](https://dev.azure.com/Lightning-AI/compatibility/_build/latest?definitionId=51\u0026branchName=master)\n[![codecov](https://codecov.io/gh/Lightning-Universe/lightning-bolts/branch/master/graph/badge.svg?token=O8p0qhvj90)](https://codecov.io/gh/Lightning-Universe/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[![DOI](https://zenodo.org/badge/250025410.svg)](https://zenodo.org/badge/latestdoi/250025410)\n\n\u003c/div\u003e\n\n______________________________________________________________________\n\n## Getting Started\n\nPip / Conda\n\n```bash\npip install lightning-bolts\n```\n\n\u003cdetails\u003e\n  \u003csummary\u003eOther installations\u003c/summary\u003e\n\nInstall bleeding-edge (no guarantees)\n\n```bash\npip install https://github.com/Lightning-Universe/lightning-bolts/archive/refs/heads/master.zip\n```\n\nTo install all optional dependencies\n\n```bash\npip install lightning-bolts[\"extra\"]\n```\n\n\u003c/details\u003e\n\n## What is Bolts?\n\nBolts package provides a variety of components to extend PyTorch Lightning, such as callbacks \u0026 datasets, for applied research and production.\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 \u0026 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 specific 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLightning-AI%2Flightning-bolts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FLightning-AI%2Flightning-bolts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FLightning-AI%2Flightning-bolts/lists"}