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

Fix endpoint information tab not showing up in AutoScaler UI #16128

Merged
merged 10 commits into from
Dec 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/lightning_app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- Fixed Http Queue sleeping for 1 sec by default if no delta were found ([#16114](https://github.com/Lightning-AI/lightning/pull/16114))


- Fixed the endpoint info tab not showing up in `AutoScaler` UI ([#16128](https://github.com/Lightning-AI/lightning/pull/16128))


## [1.8.5] - 2022-12-15

### Added
Expand Down
6 changes: 3 additions & 3 deletions src/lightning_app/components/serve/auto_scaler.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,8 +469,8 @@ def _get_sample_dict_from_datatype(datatype: Any) -> dict:
# not a pydantic model
raise TypeError(f"datatype must be a pydantic model, for the UI to be generated. but got {datatype}")

if hasattr(datatype, "_get_sample_data"):
return datatype._get_sample_data()
if hasattr(datatype, "get_sample_data"):
return datatype.get_sample_data()

datatype_props = datatype.schema()["properties"]
out: Dict[str, Any] = {}
Expand Down Expand Up @@ -774,7 +774,7 @@ def autoscale(self) -> None:

def configure_layout(self):
tabs = [
{"name": "Endpoint Info", "content": f"{self.load_balancer}/endpoint-info"},
{"name": "Endpoint Info", "content": f"{self.load_balancer.url}/endpoint-info"},
{"name": "Swagger", "content": self.load_balancer.url},
]
return tabs