From f49b933d691a2fc213a498a0d36ef04cf3563915 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Tue, 20 Dec 2022 18:34:53 +0900 Subject: [PATCH] . --- src/lightning_app/components/serve/auto_scaler.py | 4 ++-- 1 file 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 2493f63048e60..3237b2cfe3a52 100644 --- a/src/lightning_app/components/serve/auto_scaler.py +++ b/src/lightning_app/components/serve/auto_scaler.py @@ -352,8 +352,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] = {}