adyoi commited on
Commit
4b2da4e
·
verified ·
1 Parent(s): aec8784

Upload pipeline.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. pipeline.py +13 -0
pipeline.py CHANGED
@@ -191,6 +191,19 @@ def main():
191
  shutil.copy2(srcp, dst / name)
192
  copied.append(name)
193
  print(f"[pipeline] finalisasi ke out/: {', '.join(copied)}")
 
 
 
 
 
 
 
 
 
 
 
 
 
194
 
195
  if args.push:
196
  from huggingface_hub import HfApi
 
191
  shutil.copy2(srcp, dst / name)
192
  copied.append(name)
193
  print(f"[pipeline] finalisasi ke out/: {', '.join(copied)}")
194
+ info = {
195
+ "tag": args.tag,
196
+ "timestamp": datetime.datetime.now().isoformat(timespec="seconds"),
197
+ "git": git_short(),
198
+ "best_val": stats.get("best_val"),
199
+ "nats_per_char_best": stats.get("nats_per_char_best"),
200
+ "kamus_ratio": stats.get("kamus_ratio"),
201
+ "sources": sources,
202
+ }
203
+ (dst / "run_info.json").write_text(
204
+ json.dumps(info, ensure_ascii=False, indent=2), encoding="utf-8"
205
+ )
206
+ print("[pipeline] silsilah -> out/run_info.json")
207
 
208
  if args.push:
209
  from huggingface_hub import HfApi