Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

bump: lightning 2.1.0+ #17

Merged
merged 3 commits into from
Jan 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ ______________________________________________________________________
<!---:lai-use:--->

```python
import lightning as L
from lightning.app import LightningFlow, LightningApp
from poster import Poster


class CustomPosterApp(L.LightningFlow):
class CustomPosterApp(LightningFlow):
def __init__(self):
super().__init__()
self.poster = Poster(resource_dir="resources")
Expand All @@ -43,7 +43,7 @@ class CustomPosterApp(L.LightningFlow):


if __name__ == "__main__":
app = L.LightningApp(CustomPosterApp())
app = LightningApp(CustomPosterApp())
```

## install
Expand Down
8 changes: 4 additions & 4 deletions app.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import lightning as L
from lightning.app import CloudCompute, LightningApp, LightningFlow

from poster import Poster


class CustomPosterApp(L.LightningFlow):
class CustomPosterApp(LightningFlow):
def __init__(self):
super().__init__()
self.poster = Poster(resource_dir="resources", cloud_compute=L.CloudCompute())
self.poster = Poster(resource_dir="resources", cloud_compute=CloudCompute())

def run(self):
self.poster.run()
Expand All @@ -16,4 +16,4 @@ def configure_layout(self):


if __name__ == "__main__":
app = L.LightningApp(CustomPosterApp())
app = LightningApp(CustomPosterApp())
2 changes: 1 addition & 1 deletion poster/component.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import logging

from lightning import LightningWork
from lightning.app import LightningWork
from mkposters import mkposter

logger = logging.getLogger(__name__)
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
mkposters @ https://github.com/stanbiryukov/mkposters/archive/522858cfe06d5438094302ff3d5c8b9256a5a4de.zip
lightning>=1.9.0, <3.0.0
lightning[app] >=2.1.0, <2.2.0
7 changes: 3 additions & 4 deletions resources/poster.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ graph LR
### Available at : [lightning/markdown-poster](https://github.com/PyTorchLightning/markdown-poster)

```python
import lightning as L
from lightning import CloudCompute
from lightning.app import LightningFlow, LightningApp, CloudCompute

from poster import Poster


class CustomPosterApp(L.LightningFlow):
class CustomPosterApp(LightningFlow):
def __init__(self):
super().__init__()
self.poster = Poster(
Expand All @@ -70,7 +69,7 @@ class CustomPosterApp(L.LightningFlow):


if __name__ == "__main__":
app = L.LightningApp(CustomPosterApp())
app = LightningApp(CustomPosterApp())
```

Run `lightning run app app.py` in the terminal to launch this app.
Expand Down