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

Function print_logs

tests/model_loader/utils.py:43–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def print_logs():
44 log_dir = os.path.join(os.getcwd(), "log")
45 log_file = os.path.join(log_dir, "workerlog.0")
46
47 if not os.path.exists(log_file):
48 print(f"Log file {log_file} does not exist.")
49 return
50
51 print(f"\n===== {log_file} start =====")
52 with open(log_file, "r") as f:
53 for line in f:
54 print(line, end="")
55 print(f"\n===== {log_file} end =====\n")
56
57
58def run_with_timeout(target, args=(), kwargs={}, timeout=60 * 5):

Callers 1

run_with_timeoutFunction · 0.85

Calls 3

printFunction · 0.85
joinMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected