-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix the
examples/app_dag
App (#14359)
* Fix app dag example * Add test * Update doc * Update tests/tests_app_examples/test_app_dag.py Co-authored-by: Sherin Thomas <sherin@grid.ai>
- Loading branch information
1 parent
cfb27bd
commit 2b61c92
Showing
5 changed files
with
29 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import os | ||
from time import sleep | ||
|
||
import pytest | ||
from tests_app import _PROJECT_ROOT | ||
|
||
from lightning_app.testing.testing import run_app_in_cloud | ||
|
||
|
||
@pytest.mark.cloud | ||
def test_app_dag_example_cloud() -> None: | ||
with run_app_in_cloud(os.path.join(_PROJECT_ROOT, "examples/app_dag")) as (_, _, fetch_logs, _): | ||
|
||
launch_log, finish_log = False, False | ||
while not (launch_log and finish_log): | ||
for log in fetch_logs(["flow"]): | ||
if "Launching a new DAG" in log: | ||
launch_log = True | ||
elif "Finished training and evaluating" in log: | ||
finish_log = True | ||
sleep(1) |