mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[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:
@@ -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")
|
||||
|
Reference in New Issue
Block a user