Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop starsessions from App's requirements #18470

Merged
1 change: 0 additions & 1 deletion requirements/app/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ lightning-cloud == 0.5.57 # Must be pinned to ensure compatibility
packaging
typing-extensions >=4.4.0, <4.8.0
deepdiff >=5.7.0, <6.6.0
starsessions >=1.2.1, <2.0 # strict
fsspec[http] >=2022.5.0, <2023.11.0
croniter >=1.3.0, <1.5.0 # strict; TODO: for now until we find something more robust.
traitlets >=5.3.0, <5.10.0
Expand Down
12 changes: 0 additions & 12 deletions src/lightning/app/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,6 @@
from lightning.app.utilities.cloud import is_running_in_cloud
from lightning.app.utilities.component import _context
from lightning.app.utilities.enum import ComponentContext, OpenAPITags
from lightning.app.utilities.imports import _is_starsessions_available

if _is_starsessions_available():
from starsessions import SessionMiddleware
else:

class SessionMiddleware: # type: ignore[no-redef]
pass


# TODO: fixed uuid for now, it will come from the FastAPI session
TEST_SESSION_UUID = "1234"
Expand Down Expand Up @@ -175,9 +166,6 @@ class StateUpdate(BaseModel):
allow_headers=["*"],
)

if _is_starsessions_available():
fastapi_service.add_middleware(SessionMiddleware, secret_key="secret", autoload=True) # noqa: S106


# General sequence is:
# * an update is generated in the UI
Expand Down
4 changes: 0 additions & 4 deletions src/lightning/app/utilities/imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,6 @@ def _is_streamlit_tensorboard_available() -> bool:
return module_available("streamlit_tensorboard")


def _is_starsessions_available() -> bool:
return module_available("starsessions")


def _is_gradio_available() -> bool:
return module_available("gradio")

Expand Down