lightning/docs/source-app/code_samples/convert_pl_to_app/app.py

18 lines
370 B
Python

import lightning as L
from lightning.app.components import TracerPythonScript
class RootFlow(L.LightningFlow):
def __init__(self):
super().__init__()
self.runner = TracerPythonScript(
"train.py",
cloud_compute=L.CloudCompute("gpu"),
)
def run(self):
self.runner.run()
app = L.LightningApp(RootFlow())