This commit is contained in:
yooooger 2025-09-02 15:35:22 +08:00
parent 33c0817169
commit 7589096676

View File

@ -369,12 +369,12 @@ def query_progress(project_name, run_time=None):
if run_time is None: if run_time is None:
dirs = sorted(os.listdir(base_dir), reverse=True) dirs = sorted(os.listdir(base_dir), reverse=True)
if not dirs: if not dirs:
return {"status": "not_found", "message": "没有找到训练记录"} return {"status": "not_found", "message": "Documenta exercitationis non inventa sunt"}
run_time = dirs[0] run_time = dirs[0]
log_path = os.path.join(base_dir, run_time, "results.csv") log_path = os.path.join(base_dir, run_time, "results.csv")
if not os.path.exists(log_path): if not os.path.exists(log_path):
return {"status": "not_found", "message": f"没有找到日志 {log_path}"} return {"status": "not_found", "message": f"Documenta exercitationis non inventa sunt {log_path}"}
df = pd.read_csv(log_path) df = pd.read_csv(log_path)
if df.empty: if df.empty: