diff --git a/docs/source-app/api_reference/components.rst b/docs/source-app/api_reference/components.rst index 0bcefeb1c8..ef84449ae8 100644 --- a/docs/source-app/api_reference/components.rst +++ b/docs/source-app/api_reference/components.rst @@ -21,5 +21,5 @@ ___________________ ~python.popen.PopenPythonScript ~python.tracer.TracerPythonScript ~training.LightningTrainerScript - ~serve.gradio.ServeGradio + ~serve.gradio_server.ServeGradio ~serve.serve.ModelInferenceAPI diff --git a/docs/source-app/api_references.rst b/docs/source-app/api_references.rst index 9bb5874b53..bdda551ad5 100644 --- a/docs/source-app/api_references.rst +++ b/docs/source-app/api_references.rst @@ -37,7 +37,7 @@ ___________________ ~python.popen.PopenPythonScript ~python.tracer.TracerPythonScript ~training.LightningTrainerScript - ~serve.gradio.ServeGradio + ~serve.gradio_server.ServeGradio ~serve.serve.ModelInferenceAPI ~serve.python_server.PythonServer ~serve.streamlit.ServeStreamlit diff --git a/pyproject.toml b/pyproject.toml index 782ba81779..427a632877 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -73,7 +73,7 @@ module = [ "lightning_app.components.database.utilities", "lightning_app.components.python.popen", "lightning_app.components.python.tracer", - "lightning_app.components.serve.gradio", + "lightning_app.components.serve.gradio_server", "lightning_app.components.serve.serve", "lightning_app.components.serve.streamlit", "lightning_app.components.serve.types.image", diff --git a/src/lightning_app/CHANGELOG.md b/src/lightning_app/CHANGELOG.md index dfb6627f87..068b491c16 100644 --- a/src/lightning_app/CHANGELOG.md +++ b/src/lightning_app/CHANGELOG.md @@ -16,6 +16,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - The LoadBalancer now uses internal ip + port instead of URL exposed ([#16119](https://github.com/Lightning-AI/lightning/pull/16119)) - Added support for logging in different trainer stages with `DeviceStatsMonitor` ([#16002](https://github.com/Lightning-AI/lightning/pull/16002)) +- Changed `lightning_app.components.serve.gradio` to `lightning_app.components.serve.gradio_server` ([#16201](https://github.com/Lightning-AI/lightning/pull/16201)) - Made cluster creation/deletion async by default ([#16185](https://github.com/Lightning-AI/lightning/pull/16185)) @@ -25,7 +26,6 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). - Avoid `relpath` bug on Windows ([#16164](https://github.com/Lightning-AI/lightning/pull/16164)) - Avoid using the deprecated `LooseVersion` ([#16162](https://github.com/Lightning-AI/lightning/pull/16162)) - Porting fixes to autoscaler component ([#16249](https://github.com/Lightning-AI/lightning/pull/16249)) - - Fixed a bug where `lightning login` with env variables would not correctly save the credentials ([#16339](https://github.com/Lightning-AI/lightning/pull/16339)) diff --git a/src/lightning_app/components/__init__.py b/src/lightning_app/components/__init__.py index d2d8773ee2..e639a597e8 100644 --- a/src/lightning_app/components/__init__.py +++ b/src/lightning_app/components/__init__.py @@ -10,7 +10,7 @@ from lightning_app.components.python.popen import PopenPythonScript from lightning_app.components.python.tracer import Code, TracerPythonScript from lightning_app.components.serve.auto_scaler import AutoScaler from lightning_app.components.serve.cold_start_proxy import ColdStartProxy -from lightning_app.components.serve.gradio import ServeGradio +from lightning_app.components.serve.gradio_server import ServeGradio from lightning_app.components.serve.python_server import Category, Image, Number, PythonServer, Text from lightning_app.components.serve.serve import ModelInferenceAPI from lightning_app.components.serve.streamlit import ServeStreamlit diff --git a/src/lightning_app/components/serve/__init__.py b/src/lightning_app/components/serve/__init__.py index feebac39d0..92aa428426 100644 --- a/src/lightning_app/components/serve/__init__.py +++ b/src/lightning_app/components/serve/__init__.py @@ -1,6 +1,6 @@ from lightning_app.components.serve.auto_scaler import AutoScaler from lightning_app.components.serve.cold_start_proxy import ColdStartProxy -from lightning_app.components.serve.gradio import ServeGradio +from lightning_app.components.serve.gradio_server import ServeGradio from lightning_app.components.serve.python_server import Category, Image, Number, PythonServer, Text from lightning_app.components.serve.streamlit import ServeStreamlit diff --git a/src/lightning_app/components/serve/gradio.py b/src/lightning_app/components/serve/gradio_server.py similarity index 100% rename from src/lightning_app/components/serve/gradio.py rename to src/lightning_app/components/serve/gradio_server.py diff --git a/tests/integrations_app/public/test_gradio.py b/tests/integrations_app/public/test_gradio.py index 0b57656e6a..58b1f193e8 100644 --- a/tests/integrations_app/public/test_gradio.py +++ b/tests/integrations_app/public/test_gradio.py @@ -4,10 +4,10 @@ from unittest.mock import ANY @mock.patch.dict(os.environ, {"LIGHTING_TESTING": "1"}) -@mock.patch("lightning_app.components.serve.gradio.gradio") +@mock.patch("lightning_app.components.serve.gradio_server.gradio") def test_serve_gradio(gradio_mock): - from lightning_app.components.serve.gradio import ServeGradio + from lightning_app.components.serve.gradio_server import ServeGradio class MyGradioServe(ServeGradio):