fit: tqdm progress bar + first-prompt trace + summary; config configures loguru on import

- Jacobian.fit wraps prompts in tqdm (jlens has no bar; safe since fit only
  enumerate/len's them), logs the full first prompt (special tokens on, SHOULD
  line) and a done-summary -- token-efficient-logging style, both tqdm intervals set
- config.py sets up loguru on import (compact single-char icons, routed through
  tqdm.write so bars survive), so every script/notebook importing config gets it
- notebooks drop their manual logger setup and import config in cell 1

Co-Authored-By: Claudypoo <288921227+claudypoo@users.noreply.github.com>
This commit is contained in:
wassname
2026-07-10 16:31:25 +08:00
co-authored by Claudypoo
parent 69d7d2f1d9
commit 8fd82bf731
5 changed files with 35 additions and 6 deletions
+4 -1
View File
@@ -49,7 +49,10 @@ def main() -> None:
layers=tuple(args.layers), dim_batch=args.dim_batch,
max_seq_len=args.max_seq_len,
checkpoint_path=str(config.cache_path(args.model, "ckpt")))
logger.info(f"{jac!r} -> {out} ({(time.monotonic() - t0) / 60:.1f} min)")
# BLUF summary: what to read first.
logger.info(f"DONE fit -> {out}")
logger.info(f" {jac!r} | {args.n_prompts} prompts, dim_batch={args.dim_batch}, "
f"{(time.monotonic() - t0) / 60:.1f} min")
if __name__ == "__main__":