Skip to content

Commit

Permalink
Update README.md (#19968)
Browse files Browse the repository at this point in the history
  • Loading branch information
williamFalcon committed Jun 11, 2024
1 parent 06ea3a0 commit fa5da26
Showing 1 changed file with 24 additions and 66 deletions.
90 changes: 24 additions & 66 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
______________________________________________________________________

<p align="center">
<a href="https://lightning.ai/">Lightning.ai</a> •
<a href="https://lightning.ai/">Lightning AI</a> •
<a href="#examples">Examples</a> •
<a href="https://lightning.ai/docs/pytorch/stable/">PyTorch Lightning</a> •
<a href="https://lightning.ai/docs/fabric/stable/">Fabric</a> •
<a href="https://lightning.ai/docs/app/stable/">Lightning Apps</a> •
<a href="https://pytorch-lightning.readthedocs.io/en/stable/">Docs</a> •
<a href="#community">Community</a> •
<a href="https://lightning.ai/docs/pytorch/stable/generated/CONTRIBUTING.html">Contribute</a> •
Expand Down Expand Up @@ -92,23 +92,21 @@ pip install -iU https://test.pypi.org/simple/ pytorch-lightning

______________________________________________________________________

## Lightning has 4 core packages
## Lightning has 2 core packages

[PyTorch Lightning: Train and deploy PyTorch at scale](#pytorch-lightning-train-and-deploy-pytorch-at-scale).
<br/>
[Lightning Fabric: Expert control](#lightning-fabric-expert-control).
<br/>
[Lightning Data: Blazing fast, distributed streaming of training data from cloud storage](https://github.com/Lightning-AI/pytorch-lightning/tree/master/src/lightning/data).
<br/>
[Lightning Apps: Build AI products and ML workflows](#lightning-apps-build-ai-products-and-ml-workflows).

Lightning gives you granular control over how much abstraction you want to add over PyTorch.

<div align="center">
<img src="https://pl-public-data.s3.amazonaws.com/assets_lightning/continuum.png" width="80%">
</div>

______________________________________________________________________
&nbsp;
&nbsp;


# PyTorch Lightning: Train and Deploy PyTorch at Scale

Expand All @@ -118,6 +116,15 @@ PyTorch Lightning is just organized PyTorch - Lightning disentangles PyTorch cod

______________________________________________________________________

### Examples
Explore various types of training possible with PyTorch Lightning. Pretrain and finetune ANY kind of model to perform ANY task like classification, segmentation, summarization and more:

| Task | Description | Run |
|---|---|---|
| [Hello world](#hello-simple-model) | Pretrain - Hello world example | <a target="_blank" href="https://lightning.ai/lightning-ai/studios/pytorch-lightning-hello-world"><img src="https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/app-2/studio-badge.svg" alt="Open In Studio"/></a> |
| [Image segmentation](https://lightning.ai/lightning-ai/studios/image-segmentation-with-pytorch-lightning) | Finetune - ResNet-50 model to segment images | <a target="_blank" href="https://lightning.ai/lightning-ai/studios/image-segmentation-with-pytorch-lightning"><img src="https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/app-2/studio-badge.svg" alt="Open In Studio"/></a> |
| [Text classification](https://lightning.ai/lightning-ai/studios/text-classification-with-pytorch-lightning) | Finetune - text classifier (BERT model) | <a target="_blank" href="https://lightning.ai/lightning-ai/studios/text-classification-with-pytorch-lightning"><img src="https://pl-bolts-doc-images.s3.us-east-2.amazonaws.com/app-2/studio-badge.svg" alt="Open In Studio"/></a> |

### Hello simple model

```python
Expand Down Expand Up @@ -319,6 +326,9 @@ ______________________________________________________________________

______________________________________________________________________

&nbsp;
&nbsp;

# Lightning Fabric: Expert control.

Run on any device at any scale with expert-level control over PyTorch training loop and scaling strategy. You can even write your own Trainer.
Expand Down Expand Up @@ -501,62 +511,8 @@ ______________________________________________________________________

______________________________________________________________________

# Lightning Apps: Build AI products and ML workflows

Lightning Apps remove the cloud infrastructure boilerplate so you can focus on solving the research or business problems. Lightning Apps can run on the Lightning Cloud, your own cluster or a private cloud.

<div align="center">
<img src="https://pl-public-data.s3.amazonaws.com/assets_lightning/lightning-apps-teaser.png" width="80%">
</div>

## Hello Lightning app world

```python
# app.py
import lightning as L


class TrainComponent(L.LightningWork):
def run(self, x):
print(f"train a model on {x}")


class AnalyzeComponent(L.LightningWork):
def run(self, x):
print(f"analyze model on {x}")


class WorkflowOrchestrator(L.LightningFlow):
def __init__(self) -> None:
super().__init__()
self.train = TrainComponent(cloud_compute=L.CloudCompute("cpu"))
self.analyze = AnalyzeComponent(cloud_compute=L.CloudCompute("gpu"))

def run(self):
self.train.run("CPU machine 1")
self.analyze.run("GPU machine 2")


app = L.LightningApp(WorkflowOrchestrator())
```

Run on the cloud or locally

```bash
# run on the cloud
lightning run app app.py --setup --cloud

# run locally
lightning run app app.py
```

______________________________________________________________________

<div align="center">
<a href="https://lightning.ai/docs/app/stable/">Read the Lightning Apps docs</a>
</div>

______________________________________________________________________
&nbsp;
&nbsp;

## Examples

Expand Down Expand Up @@ -587,7 +543,8 @@ ______________________________________________________________________
- [Logistic Regression](https://lightning-bolts.readthedocs.io/en/stable/models/classic_ml.html#logistic-regression)
- [Linear Regression](https://lightning-bolts.readthedocs.io/en/stable/models/classic_ml.html#linear-regression)

______________________________________________________________________
&nbsp;
&nbsp;

## Continuous Integration

Expand All @@ -611,7 +568,8 @@ Lightning is rigorously tested across multiple CPUs, GPUs and TPUs and against m
</center>
</details>

______________________________________________________________________
&nbsp;
&nbsp;

## Community

Expand Down

0 comments on commit fa5da26

Please sign in to comment.