Add files using upload-large-folder tool
Browse files- .gitattributes +1 -0
- finetune/fomo_tune_v2/build.sh +1 -1
- finetune/fomo_tune_v2/launch.sh +1 -0
- finetune/fomo_tune_v2/output/task5/config.yaml +9 -0
- finetune/fomo_tune_v2/output/task5/log.txt +33 -0
- finetune/fomo_tune_v2/output/task5/metrics.json +1 -0
- finetune/fomo_tune_v2/output/task5/model/config.yaml +9 -0
- finetune/fomo_tune_v2/output/task5/model/head.joblib +3 -0
- finetune/fomo_tune_v2/output/task5/preds.json +48 -0
- finetune/fomo_tune_v2/output/task5/task5.sif +3 -0
- finetune/fomo_tune_v2/output/task5/validate/container.log +41 -0
- finetune/fomo_tune_v2/output/task5/validate/host.log +32 -0
- finetune/fomo_tune_v2/output/task5/validate/spot/input/t1.nii.gz +3 -0
- finetune/fomo_tune_v2/output/task5/validate/spot/output/sub_01.txt +1 -0
- finetune/fomo_tune_v2/predict_cohort.py +56 -0
- finetune/fomo_tune_v2/slurms/slurm-389846.out +38 -0
- finetune/fomo_tune_v2/slurms/slurm-389847.out +38 -0
.gitattributes
CHANGED
|
@@ -139,3 +139,4 @@ finetune/fomo_tune_baseline/output/task3/task3.sif filter=lfs diff=lfs merge=lfs
|
|
| 139 |
finetune/fomo_tune_baseline/output/task6_and_7/task6_and_7.sif filter=lfs diff=lfs merge=lfs -text
|
| 140 |
finetune/fomo_tune_baseline/output/task2/task2.sif filter=lfs diff=lfs merge=lfs -text
|
| 141 |
finetune/fomo_tune_v2/output/task1/task1.sif filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 139 |
finetune/fomo_tune_baseline/output/task6_and_7/task6_and_7.sif filter=lfs diff=lfs merge=lfs -text
|
| 140 |
finetune/fomo_tune_baseline/output/task2/task2.sif filter=lfs diff=lfs merge=lfs -text
|
| 141 |
finetune/fomo_tune_v2/output/task1/task1.sif filter=lfs diff=lfs merge=lfs -text
|
| 142 |
+
finetune/fomo_tune_v2/output/task5/task5.sif filter=lfs diff=lfs merge=lfs -text
|
finetune/fomo_tune_v2/build.sh
CHANGED
|
@@ -16,7 +16,7 @@ set +a
|
|
| 16 |
EXP_DIR="experiments/fomo_tune_v2"
|
| 17 |
OUT_DIR="${EXP_DIR}/output"
|
| 18 |
|
| 19 |
-
runs=(task1)
|
| 20 |
|
| 21 |
for name in "${runs[@]}"; do
|
| 22 |
# build.py names the sif after `task` in the run's saved config, which is the run name here
|
|
|
|
| 16 |
EXP_DIR="experiments/fomo_tune_v2"
|
| 17 |
OUT_DIR="${EXP_DIR}/output"
|
| 18 |
|
| 19 |
+
runs=(task1 task5)
|
| 20 |
|
| 21 |
for name in "${runs[@]}"; do
|
| 22 |
# build.py names the sif after `task` in the run's saved config, which is the run name here
|
finetune/fomo_tune_v2/launch.sh
CHANGED
|
@@ -24,6 +24,7 @@ OUT_DIR="${EXP_DIR}/output"
|
|
| 24 |
|
| 25 |
runs=(
|
| 26 |
"task1 main_task1"
|
|
|
|
| 27 |
)
|
| 28 |
|
| 29 |
for run in "${runs[@]}"; do
|
|
|
|
| 24 |
|
| 25 |
runs=(
|
| 26 |
"task1 main_task1"
|
| 27 |
+
"task5 main_task5"
|
| 28 |
)
|
| 29 |
|
| 30 |
for run in "${runs[@]}"; do
|
finetune/fomo_tune_v2/output/task5/config.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
task: task5
|
| 2 |
+
ckpt_path: hf://medarc/walnut/checkpoints/walnut-v0-1/vitl/sub-52k/checkpoint-last.pth
|
| 3 |
+
output_root: experiments/fomo_tune_v2/output
|
| 4 |
+
name: task5
|
| 5 |
+
device: cuda
|
| 6 |
+
seed: 4466
|
| 7 |
+
masking: zero
|
| 8 |
+
crop_ap: true
|
| 9 |
+
crop_test_ap: true
|
finetune/fomo_tune_v2/output/task5/log.txt
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
23:18:37 run task5 (git c9c8f6a)
|
| 2 |
+
23:18:37 config:
|
| 3 |
+
task: task5
|
| 4 |
+
ckpt_path: hf://medarc/walnut/checkpoints/walnut-v0-1/vitl/sub-52k/checkpoint-last.pth
|
| 5 |
+
output_root: experiments/fomo_tune_v2/output
|
| 6 |
+
name: task5
|
| 7 |
+
device: cuda
|
| 8 |
+
seed: 4466
|
| 9 |
+
masking: zero
|
| 10 |
+
crop_ap: true
|
| 11 |
+
crop_test_ap: true
|
| 12 |
+
23:18:52 dataset: 48 subjects, 24 positive
|
| 13 |
+
23:19:57 fold 1/20 n=3 y=[0 1 1] p=[0.919 0.806 0.978] (58s)
|
| 14 |
+
23:20:01 fold 2/20 n=3 y=[1 1 1] p=[0.816 0.991 0.385] (62s)
|
| 15 |
+
23:20:03 fold 3/20 n=3 y=[0 1 1] p=[0.486 0.541 0.53 ] (64s)
|
| 16 |
+
23:20:06 fold 4/20 n=3 y=[0 0 1] p=[0.489 0.424 0.553] (67s)
|
| 17 |
+
23:20:06 fold 5/20 n=3 y=[1 1 1] p=[0.534 0.51 0.482] (67s)
|
| 18 |
+
23:20:08 fold 6/20 n=3 y=[0 0 1] p=[0.418 0.515 0.458] (69s)
|
| 19 |
+
23:20:10 fold 7/20 n=3 y=[0 0 1] p=[0.486 0.238 0.983] (71s)
|
| 20 |
+
23:20:18 fold 8/20 n=3 y=[0 0 1] p=[0.261 0.216 0.711] (79s)
|
| 21 |
+
23:20:20 fold 9/20 n=2 y=[0 1] p=[0.06 0.296] (81s)
|
| 22 |
+
23:20:22 fold 10/20 n=2 y=[0 1] p=[0.361 0.537] (83s)
|
| 23 |
+
23:20:25 fold 11/20 n=2 y=[0 0] p=[0.1 0.085] (86s)
|
| 24 |
+
23:20:31 fold 12/20 n=2 y=[0 1] p=[0.445 0.549] (92s)
|
| 25 |
+
23:20:35 fold 13/20 n=2 y=[0 1] p=[0.57 0.612] (96s)
|
| 26 |
+
23:20:40 fold 14/20 n=2 y=[0 1] p=[0.475 0.572] (100s)
|
| 27 |
+
23:20:45 fold 15/20 n=2 y=[0 1] p=[0.437 0.576] (106s)
|
| 28 |
+
23:20:48 fold 16/20 n=2 y=[0 1] p=[0.021 0.983] (109s)
|
| 29 |
+
23:20:54 fold 17/20 n=2 y=[0 0] p=[0.433 0.442] (115s)
|
| 30 |
+
23:20:56 fold 18/20 n=2 y=[0 1] p=[0.009 1. ] (117s)
|
| 31 |
+
23:20:59 fold 19/20 n=2 y=[0 1] p=[0.374 0.674] (120s)
|
| 32 |
+
23:21:06 fold 20/20 n=2 y=[0 1] p=[0.465 0.55 ] (127s)
|
| 33 |
+
23:21:07 result: auroc=0.8819 auroc_ci_low=0.7743 auroc_ci_high=0.9720 (127s)
|
finetune/fomo_tune_v2/output/task5/metrics.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"name": "task5", "auroc": 0.8819444444444445, "auroc_ci_low": 0.7743055555555556, "auroc_ci_high": 0.9720279720279721, "run_time": 126.8}
|
finetune/fomo_tune_v2/output/task5/model/config.yaml
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
task: task5
|
| 2 |
+
ckpt_path: hf://medarc/walnut/checkpoints/walnut-v0-1/vitl/sub-52k/checkpoint-last.pth
|
| 3 |
+
output_root: experiments/fomo_tune_v2/output
|
| 4 |
+
name: task5
|
| 5 |
+
device: cuda
|
| 6 |
+
seed: 4466
|
| 7 |
+
masking: zero
|
| 8 |
+
crop_ap: true
|
| 9 |
+
crop_test_ap: true
|
finetune/fomo_tune_v2/output/task5/model/head.joblib
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e4a46cd6331f69d630e274f38db0ca0b832c66a3533949283b6c84b23edce09
|
| 3 |
+
size 445215
|
finetune/fomo_tune_v2/output/task5/preds.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"subject": "sub_01", "label": 0, "pred": 0.4653032338147445}
|
| 2 |
+
{"subject": "sub_02", "label": 0, "pred": 0.5703657794932575}
|
| 3 |
+
{"subject": "sub_03", "label": 0, "pred": 0.418030181921925}
|
| 4 |
+
{"subject": "sub_04", "label": 0, "pred": 0.3742056491919053}
|
| 5 |
+
{"subject": "sub_05", "label": 0, "pred": 0.918855610037016}
|
| 6 |
+
{"subject": "sub_06", "label": 0, "pred": 0.09953027585753182}
|
| 7 |
+
{"subject": "sub_07", "label": 0, "pred": 0.43678124647075883}
|
| 8 |
+
{"subject": "sub_08", "label": 0, "pred": 0.4859116454797395}
|
| 9 |
+
{"subject": "sub_09", "label": 0, "pred": 0.06000875217678786}
|
| 10 |
+
{"subject": "sub_10", "label": 0, "pred": 0.009198219125978293}
|
| 11 |
+
{"subject": "sub_11", "label": 0, "pred": 0.48896271931025864}
|
| 12 |
+
{"subject": "sub_12", "label": 0, "pred": 0.42390980160788105}
|
| 13 |
+
{"subject": "sub_13", "label": 0, "pred": 0.47517031554379935}
|
| 14 |
+
{"subject": "sub_14", "label": 0, "pred": 0.36077592612695075}
|
| 15 |
+
{"subject": "sub_15", "label": 0, "pred": 0.445038380516446}
|
| 16 |
+
{"subject": "sub_16", "label": 0, "pred": 0.4861603912126783}
|
| 17 |
+
{"subject": "sub_17", "label": 0, "pred": 0.2606264611597617}
|
| 18 |
+
{"subject": "sub_18", "label": 0, "pred": 0.08485060057004366}
|
| 19 |
+
{"subject": "sub_19", "label": 0, "pred": 0.5146529285022509}
|
| 20 |
+
{"subject": "sub_20", "label": 0, "pred": 0.4328383263110726}
|
| 21 |
+
{"subject": "sub_21", "label": 0, "pred": 0.21564060660290404}
|
| 22 |
+
{"subject": "sub_22", "label": 0, "pred": 0.44154251776026415}
|
| 23 |
+
{"subject": "sub_23", "label": 0, "pred": 0.2376355088681086}
|
| 24 |
+
{"subject": "sub_24", "label": 0, "pred": 0.0213508361895972}
|
| 25 |
+
{"subject": "sub_25", "label": 1, "pred": 0.5762819377087425}
|
| 26 |
+
{"subject": "sub_26", "label": 1, "pred": 0.5372674045464046}
|
| 27 |
+
{"subject": "sub_27", "label": 1, "pred": 0.8057490794778358}
|
| 28 |
+
{"subject": "sub_28", "label": 1, "pred": 0.5336191103654452}
|
| 29 |
+
{"subject": "sub_29", "label": 1, "pred": 0.9831114739572578}
|
| 30 |
+
{"subject": "sub_30", "label": 1, "pred": 0.978247425733653}
|
| 31 |
+
{"subject": "sub_31", "label": 1, "pred": 0.8155973958934847}
|
| 32 |
+
{"subject": "sub_32", "label": 1, "pred": 0.5526954964758988}
|
| 33 |
+
{"subject": "sub_33", "label": 1, "pred": 0.9906886841199588}
|
| 34 |
+
{"subject": "sub_34", "label": 1, "pred": 0.5098016495348158}
|
| 35 |
+
{"subject": "sub_35", "label": 1, "pred": 0.5409378452904992}
|
| 36 |
+
{"subject": "sub_36", "label": 1, "pred": 0.5489448973645719}
|
| 37 |
+
{"subject": "sub_37", "label": 1, "pred": 0.9830686701009616}
|
| 38 |
+
{"subject": "sub_38", "label": 1, "pred": 0.3845023517492677}
|
| 39 |
+
{"subject": "sub_39", "label": 1, "pred": 0.6121466350479421}
|
| 40 |
+
{"subject": "sub_40", "label": 1, "pred": 0.9995687603443668}
|
| 41 |
+
{"subject": "sub_41", "label": 1, "pred": 0.5296584345498776}
|
| 42 |
+
{"subject": "sub_42", "label": 1, "pred": 0.7112511929972889}
|
| 43 |
+
{"subject": "sub_43", "label": 1, "pred": 0.2961925062949552}
|
| 44 |
+
{"subject": "sub_44", "label": 1, "pred": 0.5724986705363418}
|
| 45 |
+
{"subject": "sub_45", "label": 1, "pred": 0.5502462355563548}
|
| 46 |
+
{"subject": "sub_46", "label": 1, "pred": 0.6742544511849077}
|
| 47 |
+
{"subject": "sub_47", "label": 1, "pred": 0.4577975541667174}
|
| 48 |
+
{"subject": "sub_48", "label": 1, "pred": 0.4824790631260706}
|
finetune/fomo_tune_v2/output/task5/task5.sif
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e8b46f9accb2bbc9762cd9c876a0efe54a461051ad493209062ace0a3033513c
|
| 3 |
+
size 5386858496
|
finetune/fomo_tune_v2/output/task5/validate/container.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/usr/local/lib/python3.11/site-packages/sklearn/base.py:525: InconsistentVersionWarning: Trying to unpickle estimator StandardScaler from version 1.8.0 when using version 1.9.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
|
| 2 |
+
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
|
| 3 |
+
warnings.warn(
|
| 4 |
+
/usr/local/lib/python3.11/site-packages/sklearn/base.py:525: InconsistentVersionWarning: Trying to unpickle estimator LogisticRegressionCV from version 1.8.0 when using version 1.9.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
|
| 5 |
+
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
|
| 6 |
+
warnings.warn(
|
| 7 |
+
/usr/local/lib/python3.11/site-packages/sklearn/base.py:525: InconsistentVersionWarning: Trying to unpickle estimator Pipeline from version 1.8.0 when using version 1.9.0. This might lead to breaking code or invalid results. Use at your own risk. For more info please refer to:
|
| 8 |
+
https://scikit-learn.org/stable/model_persistence.html#security-maintainability-limitations
|
| 9 |
+
warnings.warn(
|
| 10 |
+
sub_01 0.032566 (20s)
|
| 11 |
+
sub_02 0.343079 (30s)
|
| 12 |
+
sub_03 0.059793 (41s)
|
| 13 |
+
sub_04 0.031120 (51s)
|
| 14 |
+
sub_05 0.145643 (61s)
|
| 15 |
+
sub_06 0.010880 (71s)
|
| 16 |
+
sub_07 0.010199 (86s)
|
| 17 |
+
sub_08 0.056177 (104s)
|
| 18 |
+
sub_09 0.006034 (120s)
|
| 19 |
+
sub_10 0.043813 (130s)
|
| 20 |
+
sub_11 0.069947 (140s)
|
| 21 |
+
sub_12 0.003537 (154s)
|
| 22 |
+
sub_13 0.037624 (164s)
|
| 23 |
+
sub_14 0.015343 (174s)
|
| 24 |
+
sub_15 0.021323 (192s)
|
| 25 |
+
sub_16 0.078445 (205s)
|
| 26 |
+
sub_17 0.016029 (218s)
|
| 27 |
+
sub_18 0.014434 (233s)
|
| 28 |
+
sub_19 0.092682 (243s)
|
| 29 |
+
sub_20 0.021717 (257s)
|
| 30 |
+
sub_21 0.003944 (274s)
|
| 31 |
+
sub_22 0.030040 (292s)
|
| 32 |
+
sub_23 0.072254 (310s)
|
| 33 |
+
sub_24 0.016109 (323s)
|
| 34 |
+
sub_25 0.996301 (342s)
|
| 35 |
+
sub_26 0.758785 (358s)
|
| 36 |
+
sub_27 0.936628 (373s)
|
| 37 |
+
sub_28 0.987784 (390s)
|
| 38 |
+
sub_29 0.990110 (407s)
|
| 39 |
+
sub_30 0.984627 (424s)
|
| 40 |
+
sub_31 0.953043 (440s)
|
| 41 |
+
sub_32 0.999483 (459s)
|
finetune/fomo_tune_v2/output/task5/validate/host.log
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
sub_01 0.032566 (19s)
|
| 2 |
+
sub_02 0.343079 (29s)
|
| 3 |
+
sub_03 0.059793 (39s)
|
| 4 |
+
sub_04 0.031120 (49s)
|
| 5 |
+
sub_05 0.145643 (59s)
|
| 6 |
+
sub_06 0.010880 (70s)
|
| 7 |
+
sub_07 0.010199 (84s)
|
| 8 |
+
sub_08 0.056177 (102s)
|
| 9 |
+
sub_09 0.006034 (117s)
|
| 10 |
+
sub_10 0.043813 (128s)
|
| 11 |
+
sub_11 0.069947 (138s)
|
| 12 |
+
sub_12 0.003537 (151s)
|
| 13 |
+
sub_13 0.037624 (162s)
|
| 14 |
+
sub_14 0.015343 (171s)
|
| 15 |
+
sub_15 0.021323 (189s)
|
| 16 |
+
sub_16 0.078445 (202s)
|
| 17 |
+
sub_17 0.016029 (215s)
|
| 18 |
+
sub_18 0.014434 (230s)
|
| 19 |
+
sub_19 0.092682 (240s)
|
| 20 |
+
sub_20 0.021717 (253s)
|
| 21 |
+
sub_21 0.003944 (271s)
|
| 22 |
+
sub_22 0.030040 (289s)
|
| 23 |
+
sub_23 0.072254 (306s)
|
| 24 |
+
sub_24 0.016109 (320s)
|
| 25 |
+
sub_25 0.996301 (339s)
|
| 26 |
+
sub_26 0.758785 (355s)
|
| 27 |
+
sub_27 0.936628 (369s)
|
| 28 |
+
sub_28 0.987784 (386s)
|
| 29 |
+
sub_29 0.990110 (403s)
|
| 30 |
+
sub_30 0.984627 (419s)
|
| 31 |
+
sub_31 0.953043 (436s)
|
| 32 |
+
sub_32 0.999483 (454s)
|
finetune/fomo_tune_v2/output/task5/validate/spot/input/t1.nii.gz
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c4a031f0e09fc2995dd39b5e7c285f6f065c6c52d7b72c640e81da8b2c0973c3
|
| 3 |
+
size 40312097
|
finetune/fomo_tune_v2/output/task5/validate/spot/output/sub_01.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
0.032566
|
finetune/fomo_tune_v2/predict_cohort.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Every task-5 subject through the shipped model's predict path, on the host or in the container.
|
| 2 |
+
|
| 3 |
+
Layer 2 of the container check: the model loads once and the cohort loops, so the comparison
|
| 4 |
+
covers the pinned wheels, the baked SynthSeg weights and the `head.joblib` unpickle without
|
| 5 |
+
paying a 1.3G checkpoint load per subject. The body of the loop is `main_task5.predict` minus
|
| 6 |
+
that load.
|
| 7 |
+
|
| 8 |
+
uv run python experiments/fomo_tune_v2/predict_cohort.py \
|
| 9 |
+
--model-dir experiments/fomo_tune_v2/output/task5/model --output host.json
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import json
|
| 14 |
+
import time
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
import nibabel as nib
|
| 18 |
+
|
| 19 |
+
import fomo_tune.synthseg as synthseg
|
| 20 |
+
from fomo_tune.main_task5 import Task5Method
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
def main() -> None:
|
| 24 |
+
parser = argparse.ArgumentParser()
|
| 25 |
+
parser.add_argument("--model-dir", type=Path, required=True)
|
| 26 |
+
parser.add_argument("--ckpt-path", help="overrides the trained config's backbone path")
|
| 27 |
+
parser.add_argument(
|
| 28 |
+
"--data-root", type=Path, default=Path("data/fomo_eval/Task_5/preprocessed")
|
| 29 |
+
)
|
| 30 |
+
parser.add_argument("--output", type=Path, required=True)
|
| 31 |
+
parser.add_argument("--device", default="cuda")
|
| 32 |
+
args = parser.parse_args()
|
| 33 |
+
|
| 34 |
+
overrides = {"device": args.device}
|
| 35 |
+
if args.ckpt_path:
|
| 36 |
+
overrides["ckpt_path"] = args.ckpt_path
|
| 37 |
+
method = Task5Method.load(args.model_dir, **overrides)
|
| 38 |
+
|
| 39 |
+
probabilities = {}
|
| 40 |
+
start = time.perf_counter()
|
| 41 |
+
for subject_dir in sorted(args.data_root.iterdir()):
|
| 42 |
+
img = nib.load(subject_dir / "ses_01/t1.nii.gz")
|
| 43 |
+
seg = synthseg.synthseg(img)
|
| 44 |
+
img = synthseg.applymask(img, seg)
|
| 45 |
+
probabilities[subject_dir.name] = method.predict({"t1w": img})
|
| 46 |
+
print(
|
| 47 |
+
f"{subject_dir.name} {probabilities[subject_dir.name]:.6f} "
|
| 48 |
+
f"({time.perf_counter() - start:.0f}s)",
|
| 49 |
+
flush=True,
|
| 50 |
+
)
|
| 51 |
+
|
| 52 |
+
args.output.write_text(json.dumps(probabilities, indent=2) + "\n")
|
| 53 |
+
|
| 54 |
+
|
| 55 |
+
if __name__ == "__main__":
|
| 56 |
+
main()
|
finetune/fomo_tune_v2/slurms/slurm-389846.out
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
result task1 exists; skipping
|
| 2 |
+
=== task5 ===
|
| 3 |
+
23:13:28 run task5 (git 536e485)
|
| 4 |
+
23:13:28 config:
|
| 5 |
+
task: task5
|
| 6 |
+
ckpt_path: hf://medarc/walnut/checkpoints/pretrain_full_90_10_h100/checkpoint-last.pth
|
| 7 |
+
output_root: experiments/fomo_tune_v2/output
|
| 8 |
+
name: task5
|
| 9 |
+
device: cuda
|
| 10 |
+
seed: 4466
|
| 11 |
+
masking: zero
|
| 12 |
+
crop_ap: true
|
| 13 |
+
crop_test_ap: true
|
| 14 |
+
23:13:42 dataset: 48 subjects, 24 positive
|
| 15 |
+
23:14:13 fold 1/20 n=3 y=[0 1 1] p=[0.705 0.708 0.882] (28s)
|
| 16 |
+
23:14:16 fold 2/20 n=3 y=[1 1 1] p=[0.594 0.946 0.4 ] (30s)
|
| 17 |
+
23:14:18 fold 3/20 n=3 y=[0 1 1] p=[0.444 0.659 0.6 ] (32s)
|
| 18 |
+
23:14:20 fold 4/20 n=3 y=[0 0 1] p=[0.44 0.23 0.788] (34s)
|
| 19 |
+
23:14:21 fold 5/20 n=3 y=[1 1 1] p=[0.702 0.588 0.283] (35s)
|
| 20 |
+
23:14:23 fold 6/20 n=3 y=[0 0 1] p=[0.529 0.537 0.506] (37s)
|
| 21 |
+
23:14:25 fold 7/20 n=3 y=[0 0 1] p=[0.633 0.295 0.844] (39s)
|
| 22 |
+
23:14:28 fold 8/20 n=3 y=[0 0 1] p=[0.085 0.045 0.946] (42s)
|
| 23 |
+
23:14:29 fold 9/20 n=2 y=[0 1] p=[0.235 0.478] (43s)
|
| 24 |
+
23:14:30 fold 10/20 n=2 y=[0 1] p=[0.23 0.451] (44s)
|
| 25 |
+
23:14:31 fold 11/20 n=2 y=[0 0] p=[0.362 0.261] (45s)
|
| 26 |
+
23:14:33 fold 12/20 n=2 y=[0 1] p=[0.171 0.955] (47s)
|
| 27 |
+
23:14:35 fold 13/20 n=2 y=[0 1] p=[0.976 1. ] (49s)
|
| 28 |
+
23:14:36 fold 14/20 n=2 y=[0 1] p=[0.253 0.892] (50s)
|
| 29 |
+
23:14:38 fold 15/20 n=2 y=[0 1] p=[0.058 0.957] (52s)
|
| 30 |
+
23:14:39 fold 16/20 n=2 y=[0 1] p=[0.313 0.661] (53s)
|
| 31 |
+
23:14:41 fold 17/20 n=2 y=[0 0] p=[0.229 0.301] (55s)
|
| 32 |
+
23:14:42 fold 18/20 n=2 y=[0 1] p=[0.075 0.996] (56s)
|
| 33 |
+
23:14:43 fold 19/20 n=2 y=[0 1] p=[0.221 0.745] (57s)
|
| 34 |
+
23:14:45 fold 20/20 n=2 y=[0 1] p=[0.195 0.955] (60s)
|
| 35 |
+
23:14:47 result: auroc=0.8976 auroc_ci_low=0.7899 auroc_ci_high=0.9788 (60s)
|
| 36 |
+
=== results ===
|
| 37 |
+
{"name": "task1", "auroc": 0.9903846153846154, "auroc_ci_low": 0.9423076923076923, "auroc_ci_high": 1.0, "run_time": 38.3}
|
| 38 |
+
{"name": "task5", "auroc": 0.8975694444444445, "auroc_ci_low": 0.7899144345238095, "auroc_ci_high": 0.9788406038406038, "run_time": 59.5}
|
finetune/fomo_tune_v2/slurms/slurm-389847.out
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
result task1 exists; skipping
|
| 2 |
+
=== task5 ===
|
| 3 |
+
23:18:37 run task5 (git c9c8f6a)
|
| 4 |
+
23:18:37 config:
|
| 5 |
+
task: task5
|
| 6 |
+
ckpt_path: hf://medarc/walnut/checkpoints/walnut-v0-1/vitl/sub-52k/checkpoint-last.pth
|
| 7 |
+
output_root: experiments/fomo_tune_v2/output
|
| 8 |
+
name: task5
|
| 9 |
+
device: cuda
|
| 10 |
+
seed: 4466
|
| 11 |
+
masking: zero
|
| 12 |
+
crop_ap: true
|
| 13 |
+
crop_test_ap: true
|
| 14 |
+
23:18:52 dataset: 48 subjects, 24 positive
|
| 15 |
+
23:19:57 fold 1/20 n=3 y=[0 1 1] p=[0.919 0.806 0.978] (58s)
|
| 16 |
+
23:20:01 fold 2/20 n=3 y=[1 1 1] p=[0.816 0.991 0.385] (62s)
|
| 17 |
+
23:20:03 fold 3/20 n=3 y=[0 1 1] p=[0.486 0.541 0.53 ] (64s)
|
| 18 |
+
23:20:06 fold 4/20 n=3 y=[0 0 1] p=[0.489 0.424 0.553] (67s)
|
| 19 |
+
23:20:06 fold 5/20 n=3 y=[1 1 1] p=[0.534 0.51 0.482] (67s)
|
| 20 |
+
23:20:08 fold 6/20 n=3 y=[0 0 1] p=[0.418 0.515 0.458] (69s)
|
| 21 |
+
23:20:10 fold 7/20 n=3 y=[0 0 1] p=[0.486 0.238 0.983] (71s)
|
| 22 |
+
23:20:18 fold 8/20 n=3 y=[0 0 1] p=[0.261 0.216 0.711] (79s)
|
| 23 |
+
23:20:20 fold 9/20 n=2 y=[0 1] p=[0.06 0.296] (81s)
|
| 24 |
+
23:20:22 fold 10/20 n=2 y=[0 1] p=[0.361 0.537] (83s)
|
| 25 |
+
23:20:25 fold 11/20 n=2 y=[0 0] p=[0.1 0.085] (86s)
|
| 26 |
+
23:20:31 fold 12/20 n=2 y=[0 1] p=[0.445 0.549] (92s)
|
| 27 |
+
23:20:35 fold 13/20 n=2 y=[0 1] p=[0.57 0.612] (96s)
|
| 28 |
+
23:20:40 fold 14/20 n=2 y=[0 1] p=[0.475 0.572] (100s)
|
| 29 |
+
23:20:45 fold 15/20 n=2 y=[0 1] p=[0.437 0.576] (106s)
|
| 30 |
+
23:20:48 fold 16/20 n=2 y=[0 1] p=[0.021 0.983] (109s)
|
| 31 |
+
23:20:54 fold 17/20 n=2 y=[0 0] p=[0.433 0.442] (115s)
|
| 32 |
+
23:20:56 fold 18/20 n=2 y=[0 1] p=[0.009 1. ] (117s)
|
| 33 |
+
23:20:59 fold 19/20 n=2 y=[0 1] p=[0.374 0.674] (120s)
|
| 34 |
+
23:21:06 fold 20/20 n=2 y=[0 1] p=[0.465 0.55 ] (127s)
|
| 35 |
+
23:21:07 result: auroc=0.8819 auroc_ci_low=0.7743 auroc_ci_high=0.9720 (127s)
|
| 36 |
+
=== results ===
|
| 37 |
+
{"name": "task1", "auroc": 0.9903846153846154, "auroc_ci_low": 0.9423076923076923, "auroc_ci_high": 1.0, "run_time": 38.3}
|
| 38 |
+
{"name": "task5", "auroc": 0.8819444444444445, "auroc_ci_low": 0.7743055555555556, "auroc_ci_high": 0.9720279720279721, "run_time": 126.8}
|