fix: add logger.warning to silent except blocks in dashboard._find_latest_eval
This commit is contained in:
parent
aa742bcfc0
commit
0853ed7d56
1 changed files with 4 additions and 4 deletions
|
|
@ -94,8 +94,8 @@ def _find_latest_eval(results_dir_override: str = "") -> tuple[str | None, float
|
||||||
rd = (raw.get("cforch", {}) or {}).get("results_dir", "")
|
rd = (raw.get("cforch", {}) or {}).get("results_dir", "")
|
||||||
if rd:
|
if rd:
|
||||||
candidates.append(Path(rd))
|
candidates.append(Path(rd))
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
logger.warning("Failed to read cforch.results_dir from config: %s", exc)
|
||||||
candidates.append(_ROOT / "bench_results")
|
candidates.append(_ROOT / "bench_results")
|
||||||
|
|
||||||
for rdir in candidates:
|
for rdir in candidates:
|
||||||
|
|
@ -110,8 +110,8 @@ def _find_latest_eval(results_dir_override: str = "") -> tuple[str | None, float
|
||||||
ts = data.get("timestamp") or subdir.name
|
ts = data.get("timestamp") or subdir.name
|
||||||
score = data.get("best_macro_f1") or data.get("macro_f1")
|
score = data.get("best_macro_f1") or data.get("macro_f1")
|
||||||
return ts, (float(score) if isinstance(score, (int, float)) else None)
|
return ts, (float(score) if isinstance(score, (int, float)) else None)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
pass
|
logger.warning("Failed to parse summary.json at %s: %s", summary, exc)
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
def _count_corrections() -> tuple[int, int]:
|
def _count_corrections() -> tuple[int, int]:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue