lightning/docs/source-app/levels/intermediate/debug_app_scripts/toy_app.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

25 lines
570 B
Python
Raw Normal View History

docs updates 1/n (#15473) * docs * docs updates * docs updates * docs updates * docs updates * d * d * d * d * d * d * ?? * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d * d * d * d * d * d * d * d * d * d * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use OSS template * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/README.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: William Falcon <williamfalcon@Williams-MacBook-Pro-2.local> Co-authored-by: William Falcon <williamfalcon@Williams-MBP-2.lan> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2022-11-03 14:55:30 +00:00
# app.py
import lightning as L
docs updates 1/n (#15473) * docs * docs updates * docs updates * docs updates * docs updates * d * d * d * d * d * d * ?? * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d * d * d * d * d * d * d * d * d * d * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use OSS template * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/README.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: William Falcon <williamfalcon@Williams-MacBook-Pro-2.local> Co-authored-by: William Falcon <williamfalcon@Williams-MBP-2.lan> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2022-11-03 14:55:30 +00:00
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()
self.analyze = AnalyzeComponent()
docs updates 1/n (#15473) * docs * docs updates * docs updates * docs updates * docs updates * d * d * d * d * d * d * ?? * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d * d * d * d * d * d * d * d * d * d * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use OSS template * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/README.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: William Falcon <williamfalcon@Williams-MacBook-Pro-2.local> Co-authored-by: William Falcon <williamfalcon@Williams-MBP-2.lan> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2022-11-03 14:55:30 +00:00
def run(self):
self.train.run("CPU machine 1")
self.analyze.run("CPU machine 2")
docs updates 1/n (#15473) * docs * docs updates * docs updates * docs updates * docs updates * d * d * d * d * d * d * ?? * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d1 * d * d * d * d * d * d * d * d * d * d * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * new title * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * use OSS template * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * only select from parent * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update docs/README.md Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com> Co-authored-by: William Falcon <williamfalcon@Williams-MacBook-Pro-2.local> Co-authored-by: William Falcon <williamfalcon@Williams-MBP-2.lan> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Jirka <jirka.borovec@seznam.cz> Co-authored-by: Jirka Borovec <Borda@users.noreply.github.com>
2022-11-03 14:55:30 +00:00
app = L.LightningApp(WorkflowOrchestrator())