From b7ed3f26e76c2e10cf9f8577383c0caf7ef95b18 Mon Sep 17 00:00:00 2001 From: Noha Alon Date: Tue, 14 Feb 2023 16:16:32 +0200 Subject: [PATCH 1/4] fix warning so the user doesn't have to think about how to install the lightning UI --- src/lightning/app/components/serve/python_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightning/app/components/serve/python_server.py b/src/lightning/app/components/serve/python_server.py index a914135e2cce3..5c8e2754c944d 100644 --- a/src/lightning/app/components/serve/python_server.py +++ b/src/lightning/app/components/serve/python_server.py @@ -293,7 +293,7 @@ def configure_layout(self) -> Optional["Frontend"]: try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("APIAccessFrontend not found. Please install lightning-api-access to enable the UI") + logger.warn("APIAccessFrontend not found. To enable the UI run: pip install lightning-api-access") return class_name = self.__class__.__name__ From a766f9d81772e16b4ee3d9430c3b0fb3ea6ba511 Mon Sep 17 00:00:00 2001 From: Noha Alon Date: Tue, 14 Feb 2023 16:19:31 +0200 Subject: [PATCH 2/4] fix warning in the autoscaler --- src/lightning/app/components/serve/auto_scaler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lightning/app/components/serve/auto_scaler.py b/src/lightning/app/components/serve/auto_scaler.py index ed6fdbf6a4a73..e95392b20f9fe 100644 --- a/src/lightning/app/components/serve/auto_scaler.py +++ b/src/lightning/app/components/serve/auto_scaler.py @@ -453,7 +453,7 @@ def _get_endpoint_info_page(self) -> Optional["APIAccessFrontend"]: # noqa: F82 try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("APIAccessFrontend not found. Please install lightning-api-access to enable the UI") + logger.warn("APIAccessFrontend not found. To enable the UI run: pip install lightning-api-access") return if is_running_in_cloud(): From 095905ff87fa605eea624fddd9b5ccb460c5c649 Mon Sep 17 00:00:00 2001 From: Noha Alon Date: Tue, 14 Feb 2023 19:13:37 +0200 Subject: [PATCH 3/4] Apply suggestions from code review --- src/lightning/app/components/serve/auto_scaler.py | 2 +- src/lightning/app/components/serve/python_server.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lightning/app/components/serve/auto_scaler.py b/src/lightning/app/components/serve/auto_scaler.py index e95392b20f9fe..43b44103c774d 100644 --- a/src/lightning/app/components/serve/auto_scaler.py +++ b/src/lightning/app/components/serve/auto_scaler.py @@ -453,7 +453,7 @@ def _get_endpoint_info_page(self) -> Optional["APIAccessFrontend"]: # noqa: F82 try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("APIAccessFrontend not found. To enable the UI run: pip install lightning-api-access") + logger.warn("Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`") return if is_running_in_cloud(): diff --git a/src/lightning/app/components/serve/python_server.py b/src/lightning/app/components/serve/python_server.py index 5c8e2754c944d..9889683a1eaa8 100644 --- a/src/lightning/app/components/serve/python_server.py +++ b/src/lightning/app/components/serve/python_server.py @@ -293,7 +293,7 @@ def configure_layout(self) -> Optional["Frontend"]: try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("APIAccessFrontend not found. To enable the UI run: pip install lightning-api-access") + logger.warn("Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`") return class_name = self.__class__.__name__ From d6d4c2820ee6df827113a4a9987bdd8bca994085 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Feb 2023 17:14:32 +0000 Subject: [PATCH 4/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/lightning/app/components/serve/auto_scaler.py | 4 +++- src/lightning/app/components/serve/python_server.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lightning/app/components/serve/auto_scaler.py b/src/lightning/app/components/serve/auto_scaler.py index 43b44103c774d..da540c37baa3c 100644 --- a/src/lightning/app/components/serve/auto_scaler.py +++ b/src/lightning/app/components/serve/auto_scaler.py @@ -453,7 +453,9 @@ def _get_endpoint_info_page(self) -> Optional["APIAccessFrontend"]: # noqa: F82 try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`") + logger.warn( + "Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`" + ) return if is_running_in_cloud(): diff --git a/src/lightning/app/components/serve/python_server.py b/src/lightning/app/components/serve/python_server.py index 9889683a1eaa8..e70335a723ddb 100644 --- a/src/lightning/app/components/serve/python_server.py +++ b/src/lightning/app/components/serve/python_server.py @@ -293,7 +293,9 @@ def configure_layout(self) -> Optional["Frontend"]: try: from lightning_api_access import APIAccessFrontend except ModuleNotFoundError: - logger.warn("Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`") + logger.warn( + "Some dependencies to run the UI are missing. To resolve, run `pip install lightning-api-access`" + ) return class_name = self.__class__.__name__