Skip to content

Commit

Permalink
Fix endpoint information tab not showing up in AutoScaler UI (#16128)
Browse files Browse the repository at this point in the history
* .

* why

* Revert "why"

This reverts commit 375d3e8.

* tried api access with fixed values

* Revert "tried api access with fixed values"

This reverts commit f1720f6.

* Fix typo 🎉

* update chglog

* revert removing lines in chlog

* update chglog

Co-authored-by: Akihiro Nitta <akihiro@lightning.ai>
  • Loading branch information
2 people authored and carmocca committed Dec 20, 2022
1 parent 113176b commit 8858617
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/lightning_app/CHANGELOG.md
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
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

0 comments on commit 8858617

Please sign in to comment.