[Fix] Fix version function (#3076)

* [Fix] Fix version function

* Fix commit

* Fix commit

* fix code sync

* Update coverage_run.sh

---------

Co-authored-by: Jiang-Jia-Jun <jiangjiajun@baidu.com>
This commit is contained in:
Jiang-Jia-Jun
2025-07-30 16:05:24 +08:00
committed by GitHub
parent ecf2fd5b9a
commit ffa0f4d99b
5 changed files with 22 additions and 4 deletions

View File

@@ -587,12 +587,13 @@ def version():
current_dir = os.path.dirname(os.path.abspath(__file__))
version_file_path = os.path.join(current_dir, "version.txt")
content = "Unknown"
try:
with open(version_file_path, "r") as f:
content = f.read()
print(content)
except FileNotFoundError:
llm_logger.error("[version.txt] Not Found!")
return content
llm_logger = get_logger("fastdeploy", "fastdeploy.log")