DanielNguyen121 commited on
Commit
ba4f326
·
verified ·
1 Parent(s): c6cce20

CALTECH101 caltech101_disef_20261005T073721Z_262ae8436d11: recovery bootstrap

Browse files
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/DISEF_CALTECH101_PATCH.diff ADDED
The diff for this file is too large to render. See raw diff
 
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/generation_config.json ADDED
@@ -0,0 +1,138 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention_backend": "diffusers default SDPA",
3
+ "batch_size": 16,
4
+ "caption_model": "llava-hf/llava-1.5-7b-hf",
5
+ "caption_temperature": 0.2,
6
+ "classes": [
7
+ "face",
8
+ "leopard",
9
+ "motorbike",
10
+ "accordion",
11
+ "airplane",
12
+ "anchor",
13
+ "ant",
14
+ "barrel",
15
+ "bass",
16
+ "beaver",
17
+ "binocular",
18
+ "bonsai",
19
+ "brain",
20
+ "brontosaurus",
21
+ "buddha",
22
+ "butterfly",
23
+ "camera",
24
+ "cannon",
25
+ "car_side",
26
+ "ceiling_fan",
27
+ "cellphone",
28
+ "chair",
29
+ "chandelier",
30
+ "cougar_body",
31
+ "cougar_face",
32
+ "crab",
33
+ "crayfish",
34
+ "crocodile",
35
+ "crocodile_head",
36
+ "cup",
37
+ "dalmatian",
38
+ "dollar_bill",
39
+ "dolphin",
40
+ "dragonfly",
41
+ "electric_guitar",
42
+ "elephant",
43
+ "emu",
44
+ "euphonium",
45
+ "ewer",
46
+ "ferry",
47
+ "flamingo",
48
+ "flamingo_head",
49
+ "garfield",
50
+ "gerenuk",
51
+ "gramophone",
52
+ "grand_piano",
53
+ "hawksbill",
54
+ "headphone",
55
+ "hedgehog",
56
+ "helicopter",
57
+ "ibis",
58
+ "inline_skate",
59
+ "joshua_tree",
60
+ "kangaroo",
61
+ "ketch",
62
+ "lamp",
63
+ "laptop",
64
+ "llama",
65
+ "lobster",
66
+ "lotus",
67
+ "mandolin",
68
+ "mayfly",
69
+ "menorah",
70
+ "metronome",
71
+ "minaret",
72
+ "nautilus",
73
+ "octopus",
74
+ "okapi",
75
+ "pagoda",
76
+ "panda",
77
+ "pigeon",
78
+ "pizza",
79
+ "platypus",
80
+ "pyramid",
81
+ "revolver",
82
+ "rhino",
83
+ "rooster",
84
+ "saxophone",
85
+ "schooner",
86
+ "scissors",
87
+ "scorpion",
88
+ "sea_horse",
89
+ "snoopy",
90
+ "soccer_ball",
91
+ "stapler",
92
+ "starfish",
93
+ "stegosaurus",
94
+ "stop_sign",
95
+ "strawberry",
96
+ "sunflower",
97
+ "tick",
98
+ "trilobite",
99
+ "umbrella",
100
+ "watch",
101
+ "water_lilly",
102
+ "wheelchair",
103
+ "wild_cat",
104
+ "windsor_chair",
105
+ "wrench",
106
+ "yin_yang"
107
+ ],
108
+ "config_fingerprint": "262ae8436d11af1a1d6a0bda4945b2c58ae9e156b7ed39dd62a4887e98448e30",
109
+ "created_at": "2026-10-05T07:37:21.636479+00:00",
110
+ "cross_sample_caption": true,
111
+ "dataset": "Caltech101",
112
+ "dataset_version": "torchvision Caltech101 / official DISEF CoOp split",
113
+ "diffusion_model": "SG161222/Realistic_Vision_V2.0",
114
+ "dtype": "bfloat16",
115
+ "expected_total": 6400,
116
+ "fewshot": 16,
117
+ "filter_backend": "Qwen3-VL-Embedding-2B (SPC adaptation)",
118
+ "filter_model": "Qwen/Qwen3-VL-Embedding-2B",
119
+ "global_seed": 20261005,
120
+ "guidance_scale": 8.0,
121
+ "images_per_class": 64,
122
+ "jpeg_quality": 95,
123
+ "model_revisions": {
124
+ "caption": "b234b804b114d9e37bb655e11cbbb5f5e971b7a9",
125
+ "diffusion": "aaa388343c7f35f6416eea9d29574a4d1ad59817",
126
+ "filter": "9f2f7e710d6d81056aa5c0a4f04764fec6bb7bda"
127
+ },
128
+ "num_inference_steps": 20,
129
+ "resolution": 512,
130
+ "run_id": "caltech101_disef_20261005T073721Z_262ae8436d11",
131
+ "scheduler": "DPMSolverMultistepScheduler / DPM-Solver++",
132
+ "selected_sources_sha256": "2485b4a8b73946ebe11201185e99793660870dca862c05c73df902a1ca6f3942",
133
+ "spc_commit": "96834b22d5e59c852e53d713d434cbabb2f0d165",
134
+ "split_seed": 1,
135
+ "split_sha256": "8d52725a2e4273ffbc03a1f6d923e5c01baf1595f9572b4f14f63046ada21110",
136
+ "starting_step": 15,
137
+ "strength": 0.25
138
+ }
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/optimization_benchmark.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ batch_size,dtype,attention_backend,peak_vram_mb,gpu_util_percent,images_per_second,images_per_minute,duration_seconds,status
2
+ 1,bfloat16,SDPA,7338.9,84.0,4.435476669577166,266.12860017463,0.45090982300007454,PASS
3
+ 2,bfloat16,SDPA,7754.1,98.0,7.171712952545593,430.3027771527356,0.557746806999603,PASS
4
+ 4,bfloat16,SDPA,8779.4,65.0,8.35016029802589,501.0096178815535,0.9580654400001549,PASS
5
+ 8,bfloat16,SDPA,10830.1,8.0,8.122693558308889,487.3616134985333,1.9697899329999018,PASS
6
+ 16,bfloat16,SDPA,14931.3,24.0,8.387115528189618,503.2269316913771,3.815376084000036,PASS
7
+ 32,bfloat16,SDPA,23133.6,99.0,8.022734937581452,481.36409625488716,7.9773294890001125,PASS
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/requirements_molab.txt ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Validated Molab environment (Python 3.13, CUDA 13 / Blackwell)
2
+ torch==2.14.1
3
+ torchvision==0.29.1
4
+ diffusers==0.40.0
5
+ transformers==5.18.0
6
+ accelerate==1.15.0
7
+ huggingface-hub==1.33.0
8
+ qwen-vl-utils==0.0.14
9
+ sentencepiece==0.2.2
10
+ open-clip-torch==3.3.0
11
+ peft==0.21.2
12
+ Pillow==12.3.0
13
+ numpy==2.5.3
14
+ pandas==3.0.3
15
+ matplotlib==3.11.1
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/restore_caltech101_disef_from_hf.sh ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ RUN_ID="${1:?Usage: $0 RUN_ID [RUN_ROOT]}"
4
+ RUN_ROOT="${2:-/marimo/runs/disef_caltech101}"
5
+ SPC_DIR="${SPC_DIR:-/marimo/SPC}"
6
+ BOOT_DIR="/marimo/caltech101_recovery_bootstrap/$RUN_ID"
7
+ PYTHON_BIN="${PYTHON_BIN:-/tmp/uv-venv/bin/python}"
8
+ if [[ ! -d "$SPC_DIR/.git" ]]; then git clone https://github.com/thanhhai1988/SPC.git "$SPC_DIR"; fi
9
+ mkdir -p "$BOOT_DIR"
10
+ "$PYTHON_BIN" - "$RUN_ID" "$BOOT_DIR" <<'PY'
11
+ import os,sys,shutil
12
+ from pathlib import Path
13
+ from huggingface_hub import snapshot_download
14
+ run_id,dest=sys.argv[1],Path(sys.argv[2])
15
+ snap=Path(snapshot_download('DanielNguyen121/DisEF-Caltech101',repo_type='dataset',token=os.environ.get('HF_TOKEN'),allow_patterns=[f'_progress/{run_id}/bootstrap/*']))
16
+ src=snap/f'_progress/{run_id}/bootstrap'
17
+ for p in src.iterdir(): shutil.copy2(p,dest/p.name)
18
+ PY
19
+ if [[ -f "$BOOT_DIR/DISEF_CALTECH101_PATCH.diff" ]]; then
20
+ git -C "$SPC_DIR" apply --check "$BOOT_DIR/DISEF_CALTECH101_PATCH.diff" 2>/dev/null && git -C "$SPC_DIR" apply "$BOOT_DIR/DISEF_CALTECH101_PATCH.diff" || true
21
+ fi
22
+ uv pip install -r "$BOOT_DIR/requirements_molab.txt" -p "$PYTHON_BIN"
23
+ if [[ ! -d /marimo/Qwen3-VL-Embedding ]]; then git clone https://github.com/QwenLM/Qwen3-VL-Embedding.git /marimo/Qwen3-VL-Embedding; fi
24
+ "$PYTHON_BIN" - "$SPC_DIR" <<'PY'
25
+ import hashlib, shutil, subprocess, sys, zipfile
26
+ from pathlib import Path
27
+ spc=Path(sys.argv[1])
28
+ root=Path('/marimo/data/caltech101/train')
29
+ archive=root/'caltech-101.zip'
30
+ url='https://data.caltech.edu/records/mzrjq-6wc02/files/caltech-101.zip'
31
+ if not archive.exists():
32
+ root.mkdir(parents=True,exist_ok=True)
33
+ subprocess.run(['curl','-k','-fL',url,'-o',str(archive)],check=True)
34
+ if hashlib.md5(archive.read_bytes()).hexdigest() != '3138e1922a9193bfa496528edbbc45d0':
35
+ raise RuntimeError('Caltech101 archive MD5 mismatch')
36
+ categories=root/'caltech101'/'101_ObjectCategories'
37
+ if not categories.exists():
38
+ with zipfile.ZipFile(archive) as zf: zf.extractall(root)
39
+ split_source=spc/'DataSplit'/'split_coop_Caltech101.csv'
40
+ if not split_source.exists():
41
+ raise RuntimeError(f'missing patched DISEF split: {split_source}')
42
+ shutil.copy2(split_source,root/'split_coop.csv')
43
+ PY
44
+ "$PYTHON_BIN" "$SPC_DIR/DisEF/caltech101_hf.py" restore --run-id "$RUN_ID" --dest "$RUN_ROOT"
45
+ exec bash "$SPC_DIR/DisEF/resume_caltech101_disef.sh" "$RUN_ROOT"
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/resume_caltech101_disef.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
+ exec bash "$SCRIPT_DIR/run_caltech101_disef.sh" "${1:-/marimo/runs/disef_caltech101}"
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/run_caltech101_disef.sh ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ RUN_ROOT="${1:-/marimo/runs/disef_caltech101}"
4
+ BATCH_SIZE="${DISEF_BATCH_SIZE:-${2:-16}}"
5
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6
+ PYTHON_BIN="${PYTHON_BIN:-/tmp/uv-venv/bin/python}"
7
+ mkdir -p "$RUN_ROOT/logs" "$RUN_ROOT/state"
8
+ "$PYTHON_BIN" "$SCRIPT_DIR/caltech101_status.py" --run-root "$RUN_ROOT" 2>/dev/null | head -4 || true
9
+ nohup setsid "$PYTHON_BIN" "$SCRIPT_DIR/caltech101_supervisor.py" --run-root "$RUN_ROOT" --max-restarts 3 --batch-size "$BATCH_SIZE" \
10
+ >>"$RUN_ROOT/logs/supervisor.log" 2>&1 </dev/null &
11
+ SUPERVISOR_PID=$!
12
+ nohup setsid "$PYTHON_BIN" "$SCRIPT_DIR/caltech101_monitor.py" --run-root "$RUN_ROOT" --watch --interval 300 \
13
+ >>"$RUN_ROOT/logs/monitor.log" 2>&1 </dev/null &
14
+ MONITOR_PID=$!
15
+ nohup setsid "$PYTHON_BIN" "$SCRIPT_DIR/caltech101_checkpoint_daemon.py" --run-root "$RUN_ROOT" --interval 300 \
16
+ >>"$RUN_ROOT/logs/checkpoint_daemon.log" 2>&1 </dev/null &
17
+ CHECKPOINT_PID=$!
18
+ echo "supervisor_pid=$SUPERVISOR_PID monitor_pid=$MONITOR_PID checkpoint_pid=$CHECKPOINT_PID run_root=$RUN_ROOT"
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/run_metadata.json ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention_backend": "SDPA",
3
+ "config_fingerprint": "262ae8436d11af1a1d6a0bda4945b2c58ae9e156b7ed39dd62a4887e98448e30",
4
+ "dataset_archive_md5": "3138e1922a9193bfa496528edbbc45d0",
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": "0c75822314e2e939a11bfbad79618ec35501f3ae13988d5c6163d7b3a290d094",
9
+ "precision": "bfloat16",
10
+ "run_id": "caltech101_disef_20261005T073721Z_262ae8436d11",
11
+ "selected_batch_size": 16,
12
+ "spc_original_commit": "96834b22d5e59c852e53d713d434cbabb2f0d165"
13
+ }
_progress/caltech101_disef_20261005T073721Z_262ae8436d11/bootstrap/status_caltech101_disef.sh ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
4
+ exec "${PYTHON_BIN:-/tmp/uv-venv/bin/python}" "$SCRIPT_DIR/caltech101_status.py" --run-root "${1:-/marimo/runs/disef_caltech101}"