Archive 4 checkpoints (1-4)
Browse files- paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/COMPARISON.csv +11 -0
- paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/RECOVERY.json +9 -0
- paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/compare.py +46 -0
- paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/transfer_files.json +22 -0
paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/COMPARISON.csv
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
draw,method,composition_l1,coverage,precision,expression_r,logfc_r,partial_r,deg_overlap,source
|
| 2 |
+
0,x1_LoRA,0.27423344061351224,0.9606060606060606,1.0,0.8597653677916022,0.2093774950877274,0.10851169300130305,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/draw0/score/summary.json
|
| 3 |
+
0,x4_LoRA,0.26990835424408766,0.9660606060606061,1.0,0.9381972204174165,0.18013920304416736,0.11127428216800042,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/f01_trunk4x_complete_20261013/payload/paired/strict/giroux2022/disease/draw0/evaluation/score/summary.json
|
| 4 |
+
1,x1_LoRA,0.20476432986678444,0.9346666666666666,1.0,0.8578153598003033,0.28390768539546735,0.19012126149971256,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/draw1/score/summary.json
|
| 5 |
+
1,x4_LoRA,0.20024535073234584,0.9553333333333334,1.0,0.9449443447542111,0.26931015224219695,0.17466688441134728,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/f01_trunk4x_complete_20261013/payload/paired/strict/giroux2022/disease/draw1/evaluation/score/summary.json
|
| 6 |
+
2,x1_LoRA,0.32419184661665207,0.9405555555555556,0.9983333333333333,0.8613529017754651,0.17823549935043598,0.08358128122331286,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/draw2/score/summary.json
|
| 7 |
+
2,x4_LoRA,0.3018870905375671,0.9733333333333334,0.9994444444444445,0.9397600263110475,0.18653424222635756,0.11436906637305122,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/f01_trunk4x_complete_20261013/payload/paired/strict/giroux2022/disease/draw2/evaluation/score/summary.json
|
| 8 |
+
3,x1_LoRA,0.2914213221387192,0.9709090909090909,1.0,0.8612165134141366,0.1947905017055202,0.10297904209019376,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/draw3/score/summary.json
|
| 9 |
+
3,x4_LoRA,0.24777177983857915,0.9775757575757575,1.0,0.9392870227974358,0.21390203495947596,0.14259539392446585,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/f01_trunk4x_complete_20261013/payload/paired/strict/giroux2022/disease/draw3/evaluation/score/summary.json
|
| 10 |
+
4,x1_LoRA,0.2575259905456889,0.9693333333333334,1.0,0.8683118625307109,0.4421883183219261,0.26578165508739693,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/draw4/score/summary.json
|
| 11 |
+
4,x4_LoRA,0.28339824681983355,0.9793333333333333,1.0,0.9447669771009519,0.40321668029505187,0.21337176421645115,0,/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/f01_trunk4x_complete_20261013/payload/paired/strict/giroux2022/disease/draw4/evaluation/score/summary.json
|
paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/RECOVERY.json
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cause": "Exact checkpoint SHA matches; server2 symlink resolved to archived path, original validator required canonical string.",
|
| 3 |
+
"failed_receipt_preserved": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/imperial_draw4_failed_score_receipt.json",
|
| 4 |
+
"failed_receipt_sha256": "39db567fdc5a0936cc6c5cf46aa6e15423083376fa53c24df445a5a76a070980",
|
| 5 |
+
"partial_score_outputs": 0,
|
| 6 |
+
"retry_scope": "CPU score only, after existing x4 priority gate",
|
| 7 |
+
"original_frozen_scorer_unchanged": true,
|
| 8 |
+
"validator_wrapper": "/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/score_cli.py"
|
| 9 |
+
}
|
paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/compare.py
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""CPU-only matched Giroux comparison, reusing all generation and x4 scored outputs."""
|
| 2 |
+
from pathlib import Path
|
| 3 |
+
import os,sys,json,subprocess,csv,statistics
|
| 4 |
+
assert os.environ.get('CUDA_VISIBLE_DEVICES')==''
|
| 5 |
+
R=Path(__file__).resolve().parent;S=R.parents[1];M=S.parents[1];F=M/'plans/paired_finetune_intradataset_20260927';X=M/'plans/f01_trunk4x_complete_20261013'
|
| 6 |
+
sys.path[:0]=[str(S/'tools'),str(F/'tools')]
|
| 7 |
+
import numpy as np
|
| 8 |
+
import score_strict as ST
|
| 9 |
+
from validator_fix import install
|
| 10 |
+
from runtime import sha256,atomic_json
|
| 11 |
+
install(ST)
|
| 12 |
+
rows=[];proofs=[]
|
| 13 |
+
for draw in range(5):
|
| 14 |
+
rel=Path(f'giroux2022/disease/draw{draw}');sup=ST.read_support(S/'protocol/splits'/rel/'support.json');x1=S/'generated'/rel/'lora.npz';x4=X/'payload/paired/strict'/rel
|
| 15 |
+
bound=ST.validate_generation_arm('lora',x1,sup)
|
| 16 |
+
with np.load(x1,allow_pickle=False) as z1,np.load(x4/'generated.npz',allow_pickle=False) as z4:
|
| 17 |
+
assert np.array_equal(z1['gene_ids'],z4['gene_ids'])
|
| 18 |
+
assert set(z1['sample_ids'].astype(str))==set(z4['sample_ids'].astype(str))==set(sup['test_sample_ids'])
|
| 19 |
+
a=json.loads((S/'runs'/rel/'lora/RUN.json').read_text());b=json.loads((x4/'run/RUN.json').read_text())
|
| 20 |
+
for k in ['train_rows','inner_val_rows','test_rows_never_loaded_for_training','seed','lr','warmup','batch_size','ema_decay','fixed_steps','selected_step']:
|
| 21 |
+
assert a[k]==b[k],(draw,k)
|
| 22 |
+
assert a['trainable']['lora_rank']==b['trainable']['lora_rank']==16
|
| 23 |
+
assert a['trainable']['lora_alpha']==b['trainable']['lora_alpha']==16
|
| 24 |
+
g1=json.loads(x1.with_suffix('.log').read_text());g4=json.loads((x4/'generated.log').read_text())
|
| 25 |
+
for k in ['condition_sha256','seed','steps','weights']:assert g1[k]==g4[k],(draw,k)
|
| 26 |
+
assert a['source_checkpoint_sha256']==ST.BASE_SHA
|
| 27 |
+
assert b['source_checkpoint_sha256']==json.loads((X/'PRETRAIN_VERIFIED.json').read_text())['checkpoint_sha256']
|
| 28 |
+
ids=R/f'draw{draw}/test_samples.txt';ids.parent.mkdir(exist_ok=True);ids.write_text('\n'.join(sup['test_sample_ids'])+'\n')
|
| 29 |
+
out=R/f'draw{draw}/score'
|
| 30 |
+
cmd=[sys.executable,str(F/'tools/score_ft.py'),'--dataset','giroux2022','--out',str(out),'--arm',f'lora={x1}','--condition',f"lora={S/'data'/rel/'test_raw.npz'}",'--donors',str(ids),'--threads','2','--case-groups','severe','--control-groups','mild','--exclude-genes',str(F/'data/sex_linked_genes/sex_linked_genes_exclude.csv')]
|
| 31 |
+
if not (out/'summary.json').exists():subprocess.run(cmd,check=True)
|
| 32 |
+
old=json.loads((out/'summary.json').read_text());new=json.loads((x4/'evaluation/score/summary.json').read_text())
|
| 33 |
+
for k in ['contrast_definition','gene_exclusion','deg_definition']:
|
| 34 |
+
assert old.get(k)==new.get(k),(draw,k)
|
| 35 |
+
assert old['reference']['reference_sha256']==new['reference']['reference_sha256']
|
| 36 |
+
assert old['donors']==new['donors']
|
| 37 |
+
assert old['per_arm']['lora']['annotation']['model_pt_sha256']==new['per_arm']['trunk4x']['annotation']['model_pt_sha256']
|
| 38 |
+
for label,j,key in [('x1_LoRA',old,'lora'),('x4_LoRA',new,'trunk4x')]:
|
| 39 |
+
v=j['headline'][key];d=j['per_arm'][key];rows.append({'draw':draw,'method':label,'composition_l1':v['comp_l1'],'coverage':v['coverage'],'precision':v['precision'],'expression_r':v['pb_r_median'],'logfc_r':v['contrast_mean_cp10k_r_gen'],'partial_r':d['contrast']['mean_cp10k']['mean_partial_r'],'deg_overlap':v['deg_top50_sum'],'source':str(out/'summary.json' if label=='x1_LoRA' else x4/'evaluation/score/summary.json')})
|
| 40 |
+
proofs.append({'draw':draw,'x1_binding':bound,'x4_summary_sha256':sha256(x4/'evaluation/score/summary.json'),'same_support_test_condition_seed_hyperparameters':True,'same_reference_annotation_contrast_gene_exclusion':True})
|
| 41 |
+
atomic_json(R/'PROGRESS.json',{'draws_done':draw+1,'gpu_operations':0})
|
| 42 |
+
with (R/'COMPARISON.csv').open('w') as f:
|
| 43 |
+
w=csv.DictWriter(f,fieldnames=rows[0].keys());w.writeheader();w.writerows(rows)
|
| 44 |
+
means={method:{k:statistics.mean(row[k] for row in rows if row['method']==method) for k in ['composition_l1','coverage','precision','expression_r','logfc_r','partial_r','deg_overlap']} for method in ['x1_LoRA','x4_LoRA']}
|
| 45 |
+
atomic_json(R/'RESULT.json',{'means':means,'draws':5,'proofs':proofs,'gpu_operations':0,'inference':'Overlapping support draws; descriptive means, not independent replicates or significance.'})
|
| 46 |
+
print(json.dumps(means),flush=True)
|
paper-releases/pbisc-diffusion/updates/20261015T065710Z-giroux-width-comparison/diffusion/dataset/server_1/model8/plans/paper_figures_strictpairs_20261012/recoveries/giroux_width_comparison_20261015/transfer_files.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw0/lora.npz",
|
| 3 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw0/lora.log",
|
| 4 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw0/lora/RUN.json",
|
| 5 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw0/lora/checkpoint_ft.pt",
|
| 6 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw1/lora.npz",
|
| 7 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw1/lora.log",
|
| 8 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw1/lora/RUN.json",
|
| 9 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw1/lora/checkpoint_ft.pt",
|
| 10 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw2/lora.npz",
|
| 11 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw2/lora.log",
|
| 12 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw2/lora/RUN.json",
|
| 13 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw2/lora/checkpoint_ft.pt",
|
| 14 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw3/lora.npz",
|
| 15 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw3/lora.log",
|
| 16 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw3/lora/RUN.json",
|
| 17 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw3/lora/checkpoint_ft.pt",
|
| 18 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw4/lora.npz",
|
| 19 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/generated/giroux2022/disease/draw4/lora.log",
|
| 20 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw4/lora/RUN.json",
|
| 21 |
+
"/home/sj_server_1/PBISC/immun-pbmc-fm/model_8_sparse_data_diffusion/plans/paper_figures_strictpairs_20261012/runs/giroux2022/disease/draw4/lora/checkpoint_ft.pt"
|
| 22 |
+
]
|