Skip to content

Commit e61bead

Browse files
justusschockBorda
andauthored
rename flow _exit (#16378)
Co-authored-by: Jirka Borovec <[email protected]>
1 parent 285cc53 commit e61bead

File tree

40 files changed

+85
-85
lines changed

40 files changed

+85
-85
lines changed

docs/source-app/core_api/lightning_work/status_content.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ the Work transitions from ``is_pending`` to ``is_running`` and then to ``has_suc
7171
7272
elif self.work.has_stopped:
7373
print("STOPPED")
74-
self._exit()
74+
self.stop()
7575
7676
print(self.work.status)
7777
self.work.run(self.counter)

docs/source-app/examples/file_server/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ def run(self):
208208

209209
# 4 When both execution are successful, exit the app.
210210
if self.test_file_server.num_successes == 2:
211-
self._exit()
211+
self.stop()
212212

213213
def configure_layout(self):
214214
# Expose the file_server component

examples/app_argparse/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def __init__(self, cloud_compute):
1818

1919
def run(self):
2020
assert self.work.cloud_compute.name == "gpu", self.work.cloud_compute.name
21-
self._exit()
21+
self.stop()
2222

2323

2424
if __name__ == "__main__":

examples/app_boring/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def run(self):
5252
if self.source_work.has_succeeded:
5353
# the flow passes the file from one work to another.
5454
self.dest_work.run(self.source_work.boring_path)
55-
self._exit("Boring App End")
55+
self.stop("Boring App End")
5656

5757
def configure_layout(self):
5858
return {"name": "Boring Tab", "content": self.dest_work.url + "/file"}

examples/app_boring/app_dynamic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def run(self):
6464

6565
# the flow passes the file from one work to another.
6666
self.dict["dst_w"].run(self.dict["src_w"].boring_path)
67-
self._exit("Boring App End")
67+
self.stop("Boring App End")
6868

6969
def configure_layout(self):
7070
return {"name": "Boring Tab", "content": self.dict["dst_w"].url + "/file" if "dst_w" in self.dict else ""}

examples/app_components/python/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ def run(self):
1717
if not self.tracer_python_script.has_started:
1818
self.tracer_python_script.run()
1919
if self.tracer_python_script.has_succeeded:
20-
self._exit("tracer script succeed")
20+
self.stop("tracer script succeed")
2121
if self.tracer_python_script.has_failed:
22-
self._exit("tracer script failed")
22+
self.stop("tracer script failed")
2323

2424

2525
app = L.LightningApp(RootFlow())

examples/app_drive/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def run(self):
4545
# Pass the drive to both works.
4646
self.work_1.run(self.drive_1)
4747
self.work_2.run(self.drive_1)
48-
self._exit("Application End!")
48+
self.stop("Application End!")
4949

5050

5151
app = L.LightningApp(Flow())

examples/app_hpo/app_wi_ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def __init__(self, script_path, data_dir, total_trials, simultaneous_trials):
2222

2323
def run(self):
2424
if self.num_trials >= self.total_trials:
25-
self._exit()
25+
self.stop()
2626

2727
has_told_study = []
2828

examples/app_hpo/app_wo_ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def __init__(self, script_path, data_dir, total_trials, simultaneous_trials):
2020

2121
def run(self):
2222
if self.num_trials >= self.total_trials:
23-
self._exit()
23+
self.stop()
2424

2525
has_told_study = []
2626

examples/app_layout/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def __init__(self):
8787

8888
def run(self):
8989
sleep(10)
90-
self._exit("Layout End")
90+
self.stop("Layout End")
9191

9292
def configure_layout(self):
9393
return [

0 commit comments

Comments
 (0)