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

Function get_maca_version

custom_ops/setup_ops.py:676–684  ·  view source on GitHub ↗
(version_file: str = "/opt/maca/Version.txt")

Source from the content-addressed store, hash-verified

674 }
675
676 def get_maca_version(version_file: str = "/opt/maca/Version.txt") -> list[int]:
677 try:
678 with open(version_file, "r", encoding="utf-8") as f:
679 version_str = f.readline().strip()
680 target_version = [int(part) for part in version_str.split(":")[1].split(".")]
681 except Exception as e:
682 print(f"Trigger exception: {type(e).__name__} - {e}")
683 raise
684 return target_version
685
686 maca_version = get_maca_version(f"{maca_path}/Version.txt")
687 if len(maca_version) == 4:

Callers 1

setup_ops.pyFile · 0.85

Calls 2

printFunction · 0.85
splitMethod · 0.80

Tested by

no test coverage detected