-
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.
Resolve Lightning App with remote storage (#17426)
--------- Co-authored-by: thomas <thomas@thomass-MacBook-Pro.local> (cherry picked from commit 3688b64) # Conflicts: # examples/app_commands_and_api/.lightningignore # tests/tests_app/core/test_constants.py # tests/tests_app/runners/test_cloud.py
- Loading branch information
Showing
18 changed files
with
94 additions
and
105 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
venv/ |
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
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 |
---|---|---|
@@ -1,25 +1,9 @@ | ||
import os | ||
from unittest import mock | ||
|
||
import pytest | ||
|
||
from lightning_app.core.constants import get_cluster_driver, get_lightning_cloud_url | ||
from lightning_app.core.constants import get_lightning_cloud_url | ||
|
||
|
||
@mock.patch.dict(os.environ, {"LIGHTNING_CLOUD_URL": "https://beta.lightning.ai"}) | ||
def test_defaults(): | ||
assert get_lightning_cloud_url() == "https://beta.lightning.ai" | ||
|
||
|
||
def test_cluster_drive(monkeypatch): | ||
assert get_cluster_driver() is None | ||
|
||
monkeypatch.setenv("LIGHTNING_INTERRUPTIBLE_WORKS", "1") | ||
assert get_cluster_driver() == "direct" | ||
|
||
monkeypatch.setenv("LIGHTNING_CLUSTER_DRIVER", "k8s") | ||
assert get_cluster_driver() == "k8s" | ||
|
||
with pytest.raises(ValueError, match="The value needs to be in"): | ||
monkeypatch.setenv("LIGHTNING_CLUSTER_DRIVER", "something_else") | ||
assert get_cluster_driver() == "k8s" |
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
Oops, something went wrong.