From 99ae64fb853720a4d996afd3f53dc7a5276bd85e Mon Sep 17 00:00:00 2001 From: "xianxian.zhang" <141706136+xianml@users.noreply.github.com> Date: Thu, 14 Nov 2024 10:45:00 +0800 Subject: [PATCH] fix: empty doc for bare built bento (#5086) --- src/bentoml/_internal/bento/bento.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bentoml/_internal/bento/bento.py b/src/bentoml/_internal/bento/bento.py index 39870a23120..1ccde4937b0 100644 --- a/src/bentoml/_internal/bento/bento.py +++ b/src/bentoml/_internal/bento/bento.py @@ -548,7 +548,8 @@ def flush_info(self): def doc(self) -> str: if self._doc is not None: return self._doc - + if not self._fs.isfile(BENTO_README_FILENAME): + return "" with self._fs.open(BENTO_README_FILENAME, "r") as readme_md: self._doc = str(readme_md.read()) return self._doc