From cc570941ef21796342de8b2b1468d9a3c294d157 Mon Sep 17 00:00:00 2001 From: xianml Date: Thu, 14 Nov 2024 10:01:45 +0800 Subject: [PATCH] fix: empty doc for bare built bento --- 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