junidude14 commited on
Commit
a2c0d82
·
verified ·
1 Parent(s): 5e33d7b

Archive 4 checkpoints (1-4)

Browse files
paper-releases/pbisc-diffusion/updates/20261013T223459Z-f01-two-host-dispatch/diffusion/dataset/server_1/model8/plans/f01_trunk4x_complete_20261013/TWO_HOST_PLAN.json ADDED
@@ -0,0 +1,117 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "version": "20261014-two-host-v1",
3
+ "owners": {
4
+ "strict/giroux2022/disease/draw0": "server_1",
5
+ "strict/giroux2022/disease/draw1": "server_2",
6
+ "strict/giroux2022/disease/draw2": "server_1",
7
+ "strict/giroux2022/disease/draw3": "server_2",
8
+ "strict/giroux2022/disease/draw4": "server_1",
9
+ "strict/immicro/healthy/fold0/n10": "server_2",
10
+ "strict/immicro/healthy/fold0/n20": "server_1",
11
+ "strict/immicro/healthy/fold0/n40": "server_2",
12
+ "strict/immicro/healthy/fold0/n5": "server_1",
13
+ "strict/immicro/healthy/fold1/n10": "server_2",
14
+ "strict/immicro/healthy/fold1/n20": "server_1",
15
+ "strict/immicro/healthy/fold1/n40": "server_2",
16
+ "strict/immicro/healthy/fold1/n5": "server_1",
17
+ "strict/immicro/healthy/fold2/n10": "server_2",
18
+ "strict/immicro/healthy/fold2/n20": "server_1",
19
+ "strict/immicro/healthy/fold2/n40": "server_2",
20
+ "strict/immicro/healthy/fold2/n5": "server_1",
21
+ "strict/immicro/healthy/fold3/n10": "server_2",
22
+ "strict/immicro/healthy/fold3/n20": "server_1",
23
+ "strict/immicro/healthy/fold3/n40": "server_2",
24
+ "strict/immicro/healthy/fold3/n5": "server_1",
25
+ "strict/immicro/healthy/fold4/n10": "server_2",
26
+ "strict/immicro/healthy/fold4/n20": "server_1",
27
+ "strict/immicro/healthy/fold4/n40": "server_2",
28
+ "strict/immicro/healthy/fold4/n5": "server_1",
29
+ "strict/imperial_eskd/disease/draw0": "server_2",
30
+ "strict/imperial_eskd/disease/draw1": "server_1",
31
+ "strict/imperial_eskd/disease/draw2": "server_2",
32
+ "strict/imperial_eskd/disease/draw3": "server_1",
33
+ "strict/imperial_eskd/disease/draw4": "server_2",
34
+ "strict/ji2025_chili/disease/draw0": "server_1",
35
+ "strict/ji2025_chili/disease/draw1": "server_2",
36
+ "strict/ji2025_chili/disease/draw2": "server_1",
37
+ "strict/ji2025_chili/disease/draw3": "server_2",
38
+ "strict/ji2025_chili/disease/draw4": "server_1",
39
+ "strict/ye2026_sepsis/disease/draw0": "server_2",
40
+ "strict/ye2026_sepsis/disease/draw1": "server_1",
41
+ "strict/ye2026_sepsis/disease/draw2": "server_2",
42
+ "strict/ye2026_sepsis/disease/draw3": "server_1",
43
+ "strict/ye2026_sepsis/disease/draw4": "server_2",
44
+ "cv/immicro/real_lora/fold0": "server_1",
45
+ "cv/immicro/lora_r4/fold0": "server_2",
46
+ "cv/immicro/lora_r64/fold0": "server_1",
47
+ "cv/immicro/real_full/fold0": "server_2",
48
+ "cv/immicro/real_lora/fold1": "server_1",
49
+ "cv/immicro/lora_r4/fold1": "server_2",
50
+ "cv/immicro/lora_r64/fold1": "server_1",
51
+ "cv/immicro/real_full/fold1": "server_2",
52
+ "cv/immicro/real_lora/fold2": "server_1",
53
+ "cv/immicro/lora_r4/fold2": "server_2",
54
+ "cv/immicro/lora_r64/fold2": "server_1",
55
+ "cv/immicro/real_full/fold2": "server_2",
56
+ "cv/immicro/real_lora/fold3": "server_1",
57
+ "cv/immicro/lora_r4/fold3": "server_2",
58
+ "cv/immicro/lora_r64/fold3": "server_1",
59
+ "cv/immicro/real_full/fold3": "server_2",
60
+ "cv/immicro/real_lora/fold4": "server_1",
61
+ "cv/immicro/lora_r4/fold4": "server_2",
62
+ "cv/immicro/lora_r64/fold4": "server_1",
63
+ "cv/immicro/real_full/fold4": "server_2",
64
+ "legacy5/immicro/draw0": "server_1",
65
+ "legacy5/immicro/draw1": "server_2",
66
+ "legacy5/immicro/draw2": "server_1",
67
+ "legacy5/immicro/draw3": "server_2",
68
+ "legacy5/immicro/draw4": "server_1",
69
+ "cv/ye2026_sepsis/real_lora/fold0": "server_2",
70
+ "cv/ye2026_sepsis/real_lora/fold1": "server_1",
71
+ "cv/ye2026_sepsis/real_lora/fold2": "server_2",
72
+ "cv/ye2026_sepsis/real_lora/fold3": "server_1",
73
+ "cv/ye2026_sepsis/real_lora/fold4": "server_2",
74
+ "legacy5/ye2026_sepsis/draw0": "server_2",
75
+ "legacy5/ye2026_sepsis/draw1": "server_1",
76
+ "legacy5/ye2026_sepsis/draw2": "server_2",
77
+ "legacy5/ye2026_sepsis/draw3": "server_1",
78
+ "legacy5/ye2026_sepsis/draw4": "server_2",
79
+ "cv/imperial_eskd/real_lora/fold0": "server_1",
80
+ "cv/imperial_eskd/real_lora/fold1": "server_2",
81
+ "cv/imperial_eskd/real_lora/fold2": "server_1",
82
+ "cv/imperial_eskd/real_lora/fold3": "server_2",
83
+ "cv/imperial_eskd/real_lora/fold4": "server_1",
84
+ "legacy5/imperial_eskd/draw0": "server_2",
85
+ "legacy5/imperial_eskd/draw1": "server_1",
86
+ "legacy5/imperial_eskd/draw2": "server_2",
87
+ "legacy5/imperial_eskd/draw3": "server_1",
88
+ "legacy5/imperial_eskd/draw4": "server_2",
89
+ "cv/giroux2022/real_lora/fold0": "server_1",
90
+ "cv/giroux2022/real_lora/fold1": "server_2",
91
+ "cv/giroux2022/real_lora/fold2": "server_1",
92
+ "cv/giroux2022/real_lora/fold3": "server_2",
93
+ "cv/giroux2022/real_lora/fold4": "server_1",
94
+ "legacy5/giroux2022/draw0": "server_2",
95
+ "legacy5/giroux2022/draw1": "server_1",
96
+ "legacy5/giroux2022/draw2": "server_2",
97
+ "legacy5/giroux2022/draw3": "server_1",
98
+ "legacy5/giroux2022/draw4": "server_2",
99
+ "cv/ji2025_chili/real_lora/fold0": "server_1",
100
+ "cv/ji2025_chili/real_lora/fold1": "server_2",
101
+ "cv/ji2025_chili/real_lora/fold2": "server_1",
102
+ "cv/ji2025_chili/real_lora/fold3": "server_2",
103
+ "cv/ji2025_chili/real_lora/fold4": "server_1",
104
+ "legacy5/ji2025_chili/draw0": "server_2",
105
+ "legacy5/ji2025_chili/draw1": "server_1",
106
+ "legacy5/ji2025_chili/draw2": "server_2",
107
+ "legacy5/ji2025_chili/draw3": "server_1",
108
+ "legacy5/ji2025_chili/draw4": "server_2"
109
+ },
110
+ "new_trainings": 100,
111
+ "reuse_aliases": 5,
112
+ "pretraining_host": "server_1",
113
+ "shared_outputs": "NAS",
114
+ "cpu_scoring": "server_1 serialized under memory guard",
115
+ "failure_policy": "stop affected lane, no reassignment or automatic retry",
116
+ "scientific_matrix_sha256": "7288cf39dd60540b6226cf81f34fc8a8c53aa6af390909115e4f221e0b35ea96"
117
+ }
paper-releases/pbisc-diffusion/updates/20261013T223459Z-f01-two-host-dispatch/diffusion/dataset/server_1/model8/plans/f01_trunk4x_complete_20261013/tools/archive_completed.py ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Task-end paper archive, exact completed outputs only; large cell arrays as locators."""
2
+ from pathlib import Path
3
+ from datetime import datetime,timezone
4
+ import json,subprocess,sys
5
+ P=Path(__file__).resolve().parents[1];M=P.parents[1];RELEASE=M.parents[1]/'paper-release-20260928';CLI=RELEASE/'maintenance/update.py'
6
+ result=json.loads((P/'RESULTS_STATUS.json').read_text());assert result['phase']=='data_complete_with_review_gates'
7
+ assets=[];locations=[];seen=set();loc_seen=set()
8
+ def add(path,kind):
9
+ p=path.resolve()
10
+ if str(p) not in seen:assets.append({'host':'server_1','source':str(p),'kind':kind,'state':'completed'});seen.add(str(p))
11
+ parent=json.loads((P/'PRETRAIN_VERIFIED.json').read_text());add(Path(parent['checkpoint']),'checkpoint')
12
+ for p in [P/'PRETRAIN_VERIFIED.json',P/'RESULTS_STATUS.json',P/'PENDING_EVIDENCE.json',P/'MATRIX.json',P/'CONTRACT.json',P/'TWO_HOST_PLAN.json',P/'HF_PRETRAIN_VERIFIED.json',P/'HF_CORE_VERIFIED.json']:
13
+ add(p,'report')
14
+ for p in (P/'comparison').glob('*'):
15
+ if p.is_file():add(p,'figure' if p.suffix in ['.png','.pdf','.svg'] else 'table')
16
+ for j in json.loads((P/'MATRIX.json').read_text())['paired_jobs']:
17
+ out=Path(j['output'])
18
+ if not j.get('adapter_alias'):
19
+ add(out/'run/checkpoint_ft.pt','checkpoint');add(out/'run/RUN.json','report')
20
+ for p in (out/'input').glob('**/ISOLATION.json'):add(p,'report')
21
+ for p in (out/'evaluation').glob('**/*.json'):
22
+ if '/labels/' not in str(p):add(p,'report')
23
+ for p in (out/'evaluation').glob('**/*.csv'):
24
+ if p.stat().st_size<4*2**20:add(p,'table')
25
+ for p in (P/'payload').glob('**/*.npz'):
26
+ if p.with_suffix('.log').is_file():
27
+ r=json.loads(p.with_suffix('.log').read_text())
28
+ if r.get('output_sha256') and str(p.resolve()) not in loc_seen:
29
+ loc_seen.add(str(p.resolve()));locations.append({'host':'server_1','path':str(p.resolve()),'state':'completed','receipt':str(p.with_suffix('.log').resolve()),'sha256':r['output_sha256'],'reason':'Completed exact-f01-panel trunkx4 generation; preserved on verified NAS mount. Aliases are not independent experiments.'})
30
+ # Keep all16 pretraining snapshots on NAS; publish the fixed E16 model and adaptation models.
31
+ # Other epoch checkpoints are recorded, not silently deleted to reduce storage.
32
+ pre=Path(parent['checkpoint']).parent
33
+ snapshot={'epoch_checkpoints':[str(p) for p in sorted(pre.glob('checkpoint_epoch_*.pt'))],'retained_on_NAS':True,'selected_for_model_publication':parent['checkpoint']}
34
+ (P/'PRETRAIN_SNAPSHOT_LOCATIONS.json').write_text(json.dumps(snapshot,indent=2)+'\n');add(P/'PRETRAIN_SNAPSHOT_LOCATIONS.json','report')
35
+ request={'project_id':'pbisc-diffusion','summary':'Exact current f01 6k-panel trunkx4 pretraining and matched downstream data. Biological population identity/clinical reproduction gates remain explicitly pending where documented.','assets':assets,'inference_locations':locations}
36
+ path=P/'FINAL_ARCHIVE_REQUEST.json';path.write_text(json.dumps(request,indent=2)+'\n');ident=datetime.now(timezone.utc).strftime('%Y%m%dT%H%M%SZ')+'-f01-trunk4x-data'
37
+ need=sum(Path(x['source']).stat().st_size for x in assets)
38
+ free=int(subprocess.check_output(['ssh','spark-0110',"python3 -c 'import shutil;print(shutil.disk_usage(\"/home/sj_server_2/PBISC/paper-release-20260928\").free)'"],text=True))
39
+ if free<need+32*2**30:
40
+ (P/'FINAL_ARCHIVE.json').write_text(json.dumps({'state':'pending_capacity','needed_bytes':need,'archive_free_bytes':free,'all_outputs_preserved_on_NAS':True},indent=2)+'\n');raise SystemExit('Archive capacity gate: no originals deleted; inspect storage routing')
41
+ with (P/'final_archive.log').open('x') as log:
42
+ subprocess.run([sys.executable,str(CLI),'prepare','--request',str(path),'--id',ident],check=True,stdout=log,stderr=subprocess.STDOUT)
43
+ manifest=json.loads((RELEASE/'maintenance/updates'/ident/'manifest.json').read_text());assert {(x['host'],x['source']) for x in manifest['assets'] if x['category']!='update_metadata'} <= {(x['host'],x['source']) for x in assets}
44
+ subprocess.run([sys.executable,str(CLI),'publish',ident,'--execute'],check=True,stdout=log,stderr=subprocess.STDOUT)
45
+ receipt=RELEASE/'maintenance/updates'/ident/'UPDATE_VERIFIED.json';assert json.loads(receipt.read_text())['status']=='PASS'
46
+ assert json.loads((RELEASE/'LATEST.json').read_text())['id']==ident and json.loads((RELEASE/'CURRENT_CATALOG.json').read_text())['latest_id']==ident
47
+ (P/'FINAL_ARCHIVE.json').write_text(json.dumps({'state':'verified','id':ident,'receipt':str(receipt),'data_readiness':result['phase']},indent=2)+'\n')
paper-releases/pbisc-diffusion/updates/20261013T223459Z-f01-two-host-dispatch/diffusion/dataset/server_1/model8/plans/f01_trunk4x_complete_20261013/tools/stage_remote.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ """Stage missing immutable input files and verify every hash; never overwrite replicas."""
2
+ from pathlib import Path
3
+ import hashlib,json,subprocess,shlex
4
+ P=Path(__file__).resolve().parents[1]
5
+ files=[Path(s) for s in (P/'ops/remote_inputs.txt').read_text().splitlines()]
6
+ subprocess.run(['rsync','-aR','--no-implied-dirs','--omit-dir-times','--ignore-existing',*[str(f) for f in files],'spark-0110:/'],check=True)
7
+ expected={str(f):hashlib.file_digest(f.open('rb'),'sha256').hexdigest() for f in files}
8
+ code='import sys,json,pathlib,hashlib; j=json.load(sys.stdin); bad=[p for p,h in j.items() if hashlib.file_digest(pathlib.Path(p).open("rb"),"sha256").hexdigest()!=h];print(json.dumps({"files":len(j),"mismatches":bad}));sys.exit(bool(bad))'
9
+ r=subprocess.run(['ssh','spark-0110',shlex.join(['python3','-c',code])],input=json.dumps(expected),text=True,capture_output=True);print(r.stdout);r.check_returncode()
10
+ (P/'REMOTE_INPUTS_VERIFIED.json').write_text(json.dumps({'files':expected,'host':'server_2','mismatches':[]},indent=2)+'\n')
paper-releases/pbisc-diffusion/updates/20261013T223459Z-f01-two-host-dispatch/diffusion/dataset/server_1/model8/plans/f01_trunk4x_complete_20261013/tools/test_two_host.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """CPU-only scheduler/ownership tests; no scientific training or sampling."""
2
+ from pathlib import Path
3
+ import json,sys,threading,unittest
4
+ P=Path(__file__).resolve().parents[1];sys.path.insert(0,str(P.parents[1]/'plans/paper_figures_strictpairs_20261012/tools'))
5
+ from dual_runtime import parallel_lanes,LOCAL
6
+ class Tests(unittest.TestCase):
7
+ def test_matrix_once_and_alias_dependency(self):
8
+ rows=json.loads((P/'MATRIX.json').read_text())['paired_jobs'];owners=json.loads((P/'TWO_HOST_PLAN.json').read_text())['owners'];seen=[];lock=threading.Lock()
9
+ def work(row):
10
+ with lock:
11
+ self.assertEqual(LOCAL.host,owners[row['id']])
12
+ if row.get('adapter_alias'):self.assertIn(row['adapter_alias'],[x[0] for x in seen])
13
+ seen.append((row['id'],LOCAL.host))
14
+ parallel_lanes(rows,work,lambda r:owners[r['id']])
15
+ self.assertEqual(len(seen),105);self.assertEqual(len(set(x[0] for x in seen)),105)
16
+ for host in ['server_1','server_2']:self.assertEqual(sum(owners[r['id']]==host for r in rows if not r.get('adapter_alias')),50)
17
+ def test_failure_never_retried(self):
18
+ calls=[]
19
+ def fail(x):calls.append(x);raise RuntimeError('expected')
20
+ with self.assertRaises(RuntimeError):parallel_lanes([0,1,2],fail,lambda x:'server_1')
21
+ self.assertEqual(calls,[0])
22
+ def test_simultaneous_hosts(self):
23
+ barrier=threading.Barrier(2,timeout=5);seen=[]
24
+ def work(x):barrier.wait();seen.append(LOCAL.host)
25
+ parallel_lanes([0,1],work,lambda x:['server_1','server_2'][x]);self.assertEqual(set(seen),{'server_1','server_2'})
26
+ if __name__=='__main__':unittest.main()