MCPcopy Create free account
hub / github.com/PaddlePaddle/FastDeploy / version

Function version

fastdeploy/utils.py:897–910  ·  view source on GitHub ↗

Prints the contents of the version.txt file located in the parent directory of this script.

()

Source from the content-addressed store, hash-verified

895
896
897def version():
898 """
899 Prints the contents of the version.txt file located in the parent directory of this script.
900 """
901 current_dir = os.path.dirname(os.path.abspath(__file__))
902 version_file_path = os.path.join(current_dir, "version.txt")
903
904 content = "Unknown"
905 try:
906 with open(version_file_path, "r") as f:
907 content = f.read()
908 except FileNotFoundError:
909 llm_logger.error("[version.txt] Not Found!")
910 return content
911
912
913def get_version_info():

Callers

nothing calls this directly

Calls 3

joinMethod · 0.80
readMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected