DanielNguyen121 commited on
Commit
5eeec34
·
verified ·
1 Parent(s): 4a02eb1

CALTECH101 caltech101_disef_20261005T073721Z_262ae8436d11: recovery bootstrap

Browse files
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/DISEF_CALTECH101_PATCH.diff CHANGED
@@ -8293,10 +8293,10 @@ index 0000000..71ba094
8293
  + time.sleep(sleep_for)
8294
  diff --git a/DisEF/caltech101_disef.py b/DisEF/caltech101_disef.py
8295
  new file mode 100644
8296
- index 0000000..b203466
8297
  --- /dev/null
8298
  +++ b/DisEF/caltech101_disef.py
8299
- @@ -0,0 +1,576 @@
8300
  +#!/usr/bin/env python3
8301
  +"""Crash-safe DISEF/SPC synthetic generation for Caltech101.
8302
  +
@@ -8724,7 +8724,7 @@ index 0000000..b203466
8724
  +
8725
  +def maybe_checkpoint(run_root: Path, state: dict[str, Any], force: bool = False) -> None:
8726
  + pending = state["completed"] - state.get("remote_backed_up_count", 0)
8727
- + last_ts = state.get("latest_remote_checkpoint_epoch", 0)
8728
  + age = time.time() - last_ts
8729
  + should = force or (pending >= 50 and age >= 300) or (pending > 0 and age >= 900)
8730
  + if not should or not os.environ.get("HF_TOKEN"):
@@ -8732,6 +8732,9 @@ index 0000000..b203466
8732
  + try:
8733
  + import caltech101_hf
8734
  + caltech101_hf.checkpoint(run_root, force=force)
 
 
 
8735
  + except Exception as exc:
8736
  + state["last_event"] = f"HF checkpoint deferred: {type(exc).__name__}: {exc}"
8737
  +
 
8293
  + time.sleep(sleep_for)
8294
  diff --git a/DisEF/caltech101_disef.py b/DisEF/caltech101_disef.py
8295
  new file mode 100644
8296
+ index 0000000..5e8ea00
8297
  --- /dev/null
8298
  +++ b/DisEF/caltech101_disef.py
8299
+ @@ -0,0 +1,579 @@
8300
  +#!/usr/bin/env python3
8301
  +"""Crash-safe DISEF/SPC synthetic generation for Caltech101.
8302
  +
 
8724
  +
8725
  +def maybe_checkpoint(run_root: Path, state: dict[str, Any], force: bool = False) -> None:
8726
  + pending = state["completed"] - state.get("remote_backed_up_count", 0)
8727
+ + last_ts = state.get("latest_remote_checkpoint_epoch") or time.time()
8728
  + age = time.time() - last_ts
8729
  + should = force or (pending >= 50 and age >= 300) or (pending > 0 and age >= 900)
8730
  + if not should or not os.environ.get("HF_TOKEN"):
 
8732
  + try:
8733
  + import caltech101_hf
8734
  + caltech101_hf.checkpoint(run_root, force=force)
8735
+ + refreshed = json.loads((run_root / "state" / "caltech101_disef_state.json").read_text())
8736
+ + state.clear()
8737
+ + state.update(refreshed)
8738
  + except Exception as exc:
8739
  + state["last_event"] = f"HF checkpoint deferred: {type(exc).__name__}: {exc}"
8740
  +
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/run_metadata.json CHANGED
@@ -5,7 +5,7 @@
5
  "dataset_archive_url": "https://data.caltech.edu/records/mzrjq-6wc02/files/caltech-101.zip",
6
  "generated_at": "2026-10-05T07:40:12.486535+00:00",
7
  "patch_file": "DISEF_CALTECH101_PATCH.diff",
8
- "patch_sha256": "7d132ae418b0707d3d29a65d3669e8c6a468825d21f5247dffbab1f4cc2f6d16",
9
  "precision": "bfloat16",
10
  "run_id": "caltech101_disef_20261005T073721Z_262ae8436d11",
11
  "selected_batch_size": 16,
 
5
  "dataset_archive_url": "https://data.caltech.edu/records/mzrjq-6wc02/files/caltech-101.zip",
6
  "generated_at": "2026-10-05T07:40:12.486535+00:00",
7
  "patch_file": "DISEF_CALTECH101_PATCH.diff",
8
+ "patch_sha256": "b0851adf42ff5c417115afab488ad6c61b576547576a5e8e8eea3aaa4ce44638",
9
  "precision": "bfloat16",
10
  "run_id": "caltech101_disef_20261005T073721Z_262ae8436d11",
11
  "selected_batch_size": 16,