Add files using upload-large-folder tool
Browse files- README.md +78 -29
- shared/package-files/06/0613f491d3a8fe4e53b8d84ca3a42bea37b110745c0e98be5308e924fb3db0dc/fused-score.log +22 -0
- shared/package-files/06/0632869a92c7cdd74d3ff751604c24a2d0fd252d866be4143125b2e424992c3f/eval-score-N5-recur-ms10-p96.log +41 -0
- shared/package-files/06/0674003ec6726a71037cf4cb852155f0c2b4a244d97f1f205e90edc3a8657464/model_config.json +1108 -0
- shared/package-files/0b/0b257defdfda2eed651ae468799ba3c865da5f9b1e998c87f12202905d332c67/consensus_subset.py +70 -0
- shared/package-files/0b/0b2938300f3af759ecaf7b1bc27fa153b05d5eff63eaca867867c5359e8cdeb5/train.py +238 -0
- shared/package-files/0b/0b543c06ef5862083df44fe801d381850637714742e2f1a3807c4424e0201cdf/e74-na-as-h.sh +7 -0
- shared/package-files/0b/0b721b94afb29ec79be5ec0608f2cc2328babf9a1e904f7ce7ca02e50cf8b68e/fuselab.py +105 -0
- shared/package-files/0b/0be5bef1b6f13ac83bf2b7f4e0e46ef560c4abe029983b41a2a3f426fbc257d8/cycle.py +334 -0
- shared/package-files/26/267e0693fa268f2bfb165485332ee52eaf290e5da9280077acc80b5a34ff97d2/netprop-eval-cap08.log +6 -0
- shared/package-files/2c/2c1d1d1556dcc6cd38eabf319f9a059e6b4f0a73b84d64cfe6ea5b09eb9c385d/eval-score-I30-on-merged-10-freq.log +41 -0
- shared/package-files/2c/2c31cd541a7add3868008214c8eaadc44684525c7d58849163797d9a6317c66f/rank_keep.py +76 -0
- shared/package-files/2c/2cb8e5cf99660ebdb7e2de530ffa2b0355e1d28cfdc9a5ff91f0dca005adfef3/B45a-anneal6k.log +10 -0
- shared/package-files/38/38a8667ef1302bb086a90b575ea6e9db125097721da1b0ff0210243969fedf30/fullfold-5Ms-I9b-L.report.json +123 -0
- shared/package-files/38/38ed421583fc85afbabc6ad85c91cec0d699f9c2c327af4236588876936bac6c/eval-I3-50k-100k.log +4 -0
- shared/package-files/3a/3a37da7fa50fabb4093d8876f075fcf95fb76c68b4cc2c5c3435c592f4016061/fullfold-5Ms-I9b-L.sh +13 -0
- shared/package-files/3a/3a3b4478d48856473c3dbd30b55c98a2c401226853ab7182d40bd9387deb7f41/report-ind.json +107 -0
- shared/package-files/3a/3a94f027d9c7dc0bff6c6f3f083e12827079f68fe14936be6322b7dbae19fed3/swap-I16+I18+I20-w1.0_0.05_0.5.log +8 -0
- shared/package-files/3c/3c02d5172d26f1587777ace6f7dacea73daab5aaeb92cea81a5670c43cde5cef/netprop-released-sub-0_25-2.log +4 -0
- shared/package-files/3c/3c140bc0e96a66db3c0d7451b4fda9cde77161967797935f6fb8dd197679a5a9/eval-score-I12.log +41 -0
- shared/package-files/3c/3ca1aa2268d6a4235b90b917bd4ec950f2712c826e93d39952b9ba05e725c5db/library-reverse-small-znw_8.log +10 -0
- shared/package-files/56/5606ac500db6e746b0790eaf33948de692ddb40e206e2a256478df7b39fe0160/validation.jsonl +10 -0
- shared/package-files/56/56382d924fa83294fbf0719351015cf3cd417b347da8c0754849c9ed485ed27d/stack_ceiling.py +130 -0
- shared/package-files/56/565d1106b459cf127e3695d8351dab7b2c257a2e849af804956e688275602ac4/report-np075-val-sub-replay.json +107 -0
- shared/package-files/56/56d8f62123d1d469f6fba33cb1d2528e433075d82052bd9ce09172670c665e98/matched-B3-30k.log +8 -0
- shared/package-files/75/751915c72e387c626ac9a076693ea766f19ade5559e92addc37cec166f8c5f9d/train.py +371 -0
- shared/package-files/75/75a4f93f95b85ff5388ef21c1eeaa788e8ece72ef666c843530028f7c82eabad/e73-store-real-validation.log +20 -0
- shared/package-files/7c/7cf300e8d128316f3531a381d6e0cf81481efe9217b1c01a28a078b8628e2611/eval-score-N5-recur-mop-10.log +41 -0
- shared/package-files/93/93355d7b360441f5ecd9b3cb24b5c389ef9a69d901c4f0f60c5cd3ca863ace0d/inv-pool-strata.log +12 -0
- shared/package-files/93/93356a643cbdd9fba86186125a89b55bda768140821198c6378c5aef321ac800/eval-score-I16+I17.log +41 -0
- shared/package-files/93/934b804bda1e0387c4be73816a4bfcef9dda4e1f50a3af300746b49a84e4c801/dataset_all.py +77 -0
- shared/package-files/93/9352c4e7d7af5238ccfb70c06597c1e117aa2489a28a318dccc5e459fe864cfc/replay-B20k+B30k-I1-50k-val-sub.log +18 -0
- shared/package-files/93/93e3bd183a2c73f60c7d014cc0ba3f6c0e33353d079873b4416ef58a826a3aee/ce-jitter-fused-B30k.log +13 -0
- shared/package-files/a5/a535d77b8ebc5ee1cd2b998a0eae5cd64daea829ff52d893e59d012178cc519d/publish.py +226 -0
- shared/package-files/b6/b63740294886c81680e5a0189d2abc271cd9d7726978ea72eb962bad61eb5d32/model_config.json +610 -0
- shared/package-files/b6/b665f6a2fef711b478e6d456fccce87c974a50619a8d892d36877cff76f550fb/anchor-B2-30k-v1.log +16 -0
- shared/package-files/b6/b672973a2274bbae420e6ec878372a79c2cb4916874eb9a6436bc7dd9292db77/eval-A10k-sub.log +11 -0
- shared/package-files/b6/b6da4868833e77578579a777da141035ab34a9f6aa4814e9233c49b7697c721d/netprop-oracle-rerank.log +5 -0
- shared/package-files/b9/b9052f01862eff09dd56dcd554fe689280543be8842bdb1fbbfc31cd4651f67d/consensus-subset-5Ms-N5u48-L-ion-net2.log +14 -0
- shared/package-files/b9/b90cf50c87342676bbe09c8ae51cac8f1e1bdf71c9feefd8e3b49ed81e3d8435/eval-B3-20k30k-full.log +46 -0
- shared/package-files/b9/b9694748013b9646c614eb704e331f78559c87cce1b9ed50225c4135bcc38eb9/e74-term-union-hyb-both.log +12 -0
- shared/package-files/b9/b98c577aafa80ccc1c381a527016ca758c6239da8627aba8bfb5a6bde98a3876/na_ion_types.py +56 -0
- shared/package-files/b9/b9f06e0872fa67848191be9925014bb305879bf9c389875d28f68a13f145a45a/recur-mof-5.log +4 -0
- shared/package-files/cb/cb1d041f6c7ed56984943cbd6808c4525c639a0326a92a31c24b585fe260ee53/eval-B10k-sub-hce10.log +7 -0
- shared/package-files/e6/e614f3e10a43efafcb939209fd868bbdc2c1c38b8b8cb0ec8082fa0750438a87/eval-score-I9b+I13.log +41 -0
- shared/package-files/e6/e648ff9e2e19f94d3b1ab306363508326ffb239560531b291ee3c5e1d6e65b62/train-I1.log +17 -0
- shared/package-files/e6/e6a6e6659a649411fa75007439d647bdf23583d2c21903147bb73d17300d2669/model_manifest.json +13 -0
- shared/package-files/ef/ef251257843f98236987449f06d2bcc25c03935762f8f88980d317dc4dfb85af/swap-recompare-N5-recur-hyb-s10-f5-p48-w0.75_0.1_0.5.log +8 -0
- shared/package-files/ef/efbf894e84d19de3b41b6f12aa3ad68b9e2229115175b9403d0f89821c7b034d/eval_blocks.py +105 -0
- shared/package-files/ef/efed6ca2099a4feb065029ab8f1e0c6676887395b891b8cfc8858597e71ca195/eval-score-I16.log +41 -0
README.md
CHANGED
|
@@ -1,45 +1,65 @@
|
|
| 1 |
---
|
| 2 |
-
pretty_name: Science Speedrun
|
| 3 |
tags:
|
| 4 |
- scientific-research
|
| 5 |
- agent-evaluation
|
| 6 |
- research-artifacts
|
| 7 |
---
|
| 8 |
|
| 9 |
-
# Science Speedrun:
|
| 10 |
|
| 11 |
-
Reproducible submitted solutions, native evaluation reports, and screened
|
| 12 |
-
GPT-6 Astra
|
| 13 |
-
|
|
|
|
|
|
|
| 14 |
sealed evaluation. Existing additional measurements of duplicate packages are retained.
|
| 15 |
`reviews/fairness-20261031/` holds the operator-side fairness review of every first-round
|
| 16 |
trajectory (per-task verdicts and the cross-cutting infrastructure findings); each first-round
|
| 17 |
index carries its verdict under `operator_fairness_review`, and a fresh trial's index names
|
| 18 |
the first trial it repeats under `fresh_trial_of`.
|
| 19 |
|
| 20 |
-
| Task | Distinct candidates | Artifacts |
|
| 21 |
-
|---|---:|---|
|
| 22 |
-
| atomistic-materials | 3 | [Files](tasks/atomistic-materials/atomistic-materials-astra-xhigh-1h100-48h-20261020b) |
|
| 23 |
-
|
|
| 24 |
-
|
|
| 25 |
-
|
|
| 26 |
-
|
|
| 27 |
-
|
|
| 28 |
-
|
|
| 29 |
-
|
|
| 30 |
-
|
|
| 31 |
-
|
|
| 32 |
-
|
|
| 33 |
-
|
|
| 34 |
-
|
|
| 35 |
-
|
|
| 36 |
-
|
|
| 37 |
-
|
|
| 38 |
-
|
|
| 39 |
-
|
|
| 40 |
-
|
|
| 41 |
-
|
|
| 42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## Layout
|
| 45 |
|
|
@@ -110,10 +130,39 @@ implemented equation operators declared in its manifest; this is permitted by th
|
|
| 110 |
contract and the scores stand, but from that point the reward mostly measures re-derivation
|
| 111 |
of the governing equations rather than a learned surrogate.
|
| 112 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
## Provenance and excluded material
|
| 114 |
|
| 115 |
Submissions were produced by the evaluated agent; reports by the native scientific
|
| 116 |
-
scorers under the recorded adapters; logs by Codex and the harness. Organization,
|
| 117 |
indexes, plots, and the reconstruction helper were created by the operator.
|
| 118 |
Logs are screened for credentials, with redaction counts and original/exported hashes
|
| 119 |
recorded in the indexes. Authentication stores, private test inputs/labels, raw research
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: Science Speedrun research artifacts
|
| 3 |
tags:
|
| 4 |
- scientific-research
|
| 5 |
- agent-evaluation
|
| 6 |
- research-artifacts
|
| 7 |
---
|
| 8 |
|
| 9 |
+
# Science Speedrun: 39 completed task histories
|
| 10 |
|
| 11 |
+
Reproducible submitted solutions, native evaluation reports, and screened agent logs from
|
| 12 |
+
GPT-6 Astra (Codex, xhigh reasoning; 21 histories) and from Claude Code
|
| 13 |
+
(Fable 5.2 requested, xhigh effort; 18 histories, see "Claude Code runs" below). These are
|
| 14 |
+
file artifacts, not a tabular training dataset.
|
| 15 |
+
The histories contain 832 inference-distinct candidates; each has a completed
|
| 16 |
sealed evaluation. Existing additional measurements of duplicate packages are retained.
|
| 17 |
`reviews/fairness-20261031/` holds the operator-side fairness review of every first-round
|
| 18 |
trajectory (per-task verdicts and the cross-cutting infrastructure findings); each first-round
|
| 19 |
index carries its verdict under `operator_fairness_review`, and a fresh trial's index names
|
| 20 |
the first trial it repeats under `fresh_trial_of`.
|
| 21 |
|
| 22 |
+
| Task | Agent · model | Distinct candidates | Artifacts |
|
| 23 |
+
|---|---|---:|---|
|
| 24 |
+
| atomistic-materials | Codex · gpt-6-astra | 3 | [Files](tasks/atomistic-materials/atomistic-materials-astra-xhigh-1h100-48h-20261020b) |
|
| 25 |
+
| atomistic-materials | Claude Code · claude-fable-5-2 | 11 | [Files](tasks/atomistic-materials/atomistic-materials-fable52-xhigh-1h100-48h-20261110a) |
|
| 26 |
+
| brain-computer-interface-decoding | Codex · gpt-6-astra | 127 | [Files](tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-astra-xhigh-1h100-48h-20261031a) |
|
| 27 |
+
| brain-computer-interface-decoding | Claude Code · claude-fable-5-2 | 14 | [Files](tasks/brain-computer-interface-decoding/brain-computer-interface-decoding-fable52-xhigh-1h100-48h-20261110a) |
|
| 28 |
+
| crystal-structure-generation | Codex · gpt-6-astra | 20 | [Files](tasks/crystal-structure-generation/crystal-structure-generation-astra-xhigh-1h100-48h-20261020b) |
|
| 29 |
+
| earth-observation-pretraining-transfer | Codex · gpt-6-astra | 11 | [Files](tasks/earth-observation-pretraining-transfer/earth-astra-xhigh-48h-20261020a) |
|
| 30 |
+
| earth-observation-pretraining-transfer | Claude Code · claude-fable-5-2 | 5 | [Files](tasks/earth-observation-pretraining-transfer/earth-observation-pretraining-transfer-fable52-xhigh-1h100-48h-20261110b) |
|
| 31 |
+
| fluid-flow-control | Codex · gpt-6-astra | 11 | [Files](tasks/fluid-flow-control/fluid-flow-control-astra-xhigh-1h100-48h-20261022a) |
|
| 32 |
+
| fluid-flow-control | Claude Code · claude-fable-5-2 | 12 | [Files](tasks/fluid-flow-control/fluid-flow-control-fable52-xhigh-1h100-48h-20261110c) |
|
| 33 |
+
| fruit-fly-neuron-reconstruction | Codex · gpt-6-astra | 7 | [Files](tasks/fruit-fly-neuron-reconstruction/fruit-fly-neuron-reconstruction-astra-xhigh-1h100-48h-20261022a) |
|
| 34 |
+
| fruit-fly-neuron-reconstruction | Claude Code · claude-fable-5-2 | 8 | [Files](tasks/fruit-fly-neuron-reconstruction/fruit-fly-neuron-reconstruction-fable52-xhigh-1h100-48h-20261110a) |
|
| 35 |
+
| genome-sequence-to-function | Codex · gpt-6-astra | 33 | [Files](tasks/genome-sequence-to-function/genome-sequence-to-function-astra-xhigh-1h100-48h-20261022a) |
|
| 36 |
+
| genome-sequence-to-function | Claude Code · claude-fable-5-2 | 26 | [Files](tasks/genome-sequence-to-function/genome-sequence-to-function-fable52-xhigh-1h100-48h-20261110a) |
|
| 37 |
+
| mass-spectrometry-molecule-retrieval | Codex · gpt-6-astra | 21 | [Files](tasks/mass-spectrometry-molecule-retrieval/mass-spectrometry-molecule-retrieval-astra-xhigh-1h100-48h-20261020b) |
|
| 38 |
+
| mass-spectrometry-molecule-retrieval | Claude Code · claude-fable-5-2 | 17 | [Files](tasks/mass-spectrometry-molecule-retrieval/mass-spectrometry-molecule-retrieval-fable52-xhigh-1h100-48h-20261110a) |
|
| 39 |
+
| molecular-pretraining-transfer | Codex · gpt-6-astra | 14 | [Files](tasks/molecular-pretraining-transfer/molecular-pretraining-transfer-astra-xhigh-1h100-48h-20261023a) |
|
| 40 |
+
| molecular-pretraining-transfer | Claude Code · claude-fable-5-2 requested, claude-opus-5 fallback (105 / 504 requests) | 15 | [Files](tasks/molecular-pretraining-transfer/molecular-pretraining-transfer-fable52-xhigh-1h100-48h-20261110a) |
|
| 41 |
+
| natural-disease-progression | Claude Code · claude-fable-5-2 | 29 | [Files](tasks/natural-disease-progression/natural-disease-progression-fable52-xhigh-1h100-48h-20261110b) |
|
| 42 |
+
| natural-disease-progression | Codex · gpt-6-astra | 13 | [Files](tasks/natural-disease-progression/ndp-astra-xhigh-48h-20261020a) |
|
| 43 |
+
| pde-surrogate | Codex · gpt-6-astra | 60 | [Files](tasks/pde-surrogate/pde-surrogate-astra-xhigh-1h100-48h-20261020b) |
|
| 44 |
+
| pde-surrogate | Claude Code · claude-fable-5-2 | 24 | [Files](tasks/pde-surrogate/pde-surrogate-fable52-xhigh-1h100-48h-20261110a) |
|
| 45 |
+
| probabilistic-global-weather | Codex · gpt-6-astra | 9 | [Files](tasks/probabilistic-global-weather/probabilistic-global-weather-astra-xhigh-1h100-48h-20261024f) |
|
| 46 |
+
| probabilistic-global-weather | Claude Code · claude-fable-5-2 | 4 | [Files](tasks/probabilistic-global-weather/probabilistic-global-weather-fable52-xhigh-1h100-48h-20261110a) |
|
| 47 |
+
| protein-design | Codex · gpt-6-astra | 1 | [Files](tasks/protein-design/protein-design-astra-xhigh-1h100-48h-20261022a) · superseded by the corrected trial |
|
| 48 |
+
| protein-design | Codex · gpt-6-astra | 3 | [Files](tasks/protein-design/protein-design-astra-xhigh-1h100-48h-20261027a) |
|
| 49 |
+
| protein-folding-prediction | Codex · gpt-6-astra | 18 | [Files](tasks/protein-folding-prediction/protein-folding-prediction-astra-xhigh-1h100-48h-20261020b) |
|
| 50 |
+
| protein-folding-prediction | Claude Code · claude-fable-5-2 | 12 | [Files](tasks/protein-folding-prediction/protein-folding-prediction-fable52-xhigh-1h100-48h-20261110a) |
|
| 51 |
+
| protein-sequence-modeling | Codex · gpt-6-astra | 58 | [Files](tasks/protein-sequence-modeling/protein-sequence-modeling-astra-xhigh-1h100-48h-20261022a) |
|
| 52 |
+
| protein-sequence-modeling | Codex · gpt-6-astra | 9 | [Files](tasks/protein-sequence-modeling/protein-sequence-modeling-astra-xhigh-1h100-48h-20261031a) · fresh trial after the fairness review |
|
| 53 |
+
| protein-sequence-modeling | Claude Code · claude-fable-5-2 requested, claude-opus-5 fallback (789 / 421 requests) | 16 | [Files](tasks/protein-sequence-modeling/protein-sequence-modeling-fable52-xhigh-1h100-48h-20261110a) |
|
| 54 |
+
| single-cell-perturbation-prediction | Codex · gpt-6-astra | 17 | [Files](tasks/single-cell-perturbation-prediction/single-cell-perturbation-prediction-astra-xhigh-1h100-48h-20261020b) |
|
| 55 |
+
| single-cell-perturbation-prediction | Claude Code · claude-fable-5-2 | 17 | [Files](tasks/single-cell-perturbation-prediction/single-cell-perturbation-prediction-fable52-xhigh-1h100-48h-20261110a) |
|
| 56 |
+
| surface-code-decoding | Codex · gpt-6-astra | 45 | [Files](tasks/surface-code-decoding/surface-code-decoding-astra-xhigh-1h100-48h-20261020b) |
|
| 57 |
+
| surface-code-decoding | Claude Code · claude-fable-5-2 | 16 | [Files](tasks/surface-code-decoding/surface-code-decoding-fable52-xhigh-1h100-48h-20261110a) |
|
| 58 |
+
| target-based-drug-screening | Claude Code · claude-fable-5-2 requested, claude-opus-5 fallback (10 / 876 requests) | 23 | [Files](tasks/target-based-drug-screening/target-based-drug-screening-fable52-xhigh-1h100-48h-20261110a) |
|
| 59 |
+
| timeseries-forecasting | Codex · gpt-6-astra | 53 | [Files](tasks/timeseries-forecasting/timeseries-forecasting-astra-xhigh-1h100-48h-20261022a) |
|
| 60 |
+
| timeseries-forecasting | Claude Code · claude-fable-5-2 | 33 | [Files](tasks/timeseries-forecasting/timeseries-forecasting-fable52-xhigh-1h100-48h-20261110a) |
|
| 61 |
+
| tokamak-magnetic-control | Codex · gpt-6-astra | 7 | [Files](tasks/tokamak-magnetic-control/tokamak-astra-xhigh-48h-20261020a) |
|
| 62 |
+
| tokamak-magnetic-control | Claude Code · claude-fable-5-2 | 10 | [Files](tasks/tokamak-magnetic-control/tokamak-magnetic-control-fable52-xhigh-1h100-48h-20261110b) |
|
| 63 |
|
| 64 |
## Layout
|
| 65 |
|
|
|
|
| 130 |
contract and the scores stand, but from that point the reward mostly measures re-derivation
|
| 131 |
of the governing equations rather than a learned surrogate.
|
| 132 |
|
| 133 |
+
## Claude Code runs
|
| 134 |
+
|
| 135 |
+
Run folders named `<task>-fable52-xhigh-1h100-48h-2026111*` are Claude Code trials (agent
|
| 136 |
+
version 2.1.319, launched 2026-11-10): one fresh session per task with no prior work reused,
|
| 137 |
+
on the same images, data mounts and 48-hour one-H100 research budget as the Astra trials.
|
| 138 |
+
18 of the 20 trials are included; a trial is added once every distinct snapshot of its
|
| 139 |
+
history has been scored. Target-based drug screening is the twentieth task; its Astra trial
|
| 140 |
+
is not in this archive yet.
|
| 141 |
+
|
| 142 |
+
The model requested was `claude-fable-5-2` at xhigh effort. In 3 included trials, API safeguard
|
| 143 |
+
refusals of Fable 5.2 requests made Claude Code fall back to `claude-opus-5` for the rest of
|
| 144 |
+
the session: Molecular Pretraining (within minutes of launch; 105 requests answered by Fable 5.2, 504 by Opus 5); Protein Sequence (about 11 hours after launch; 789 requests answered by Fable 5.2, 421 by Opus 5); Drug Screening (within minutes of launch; 10 requests answered by Fable 5.2, 876 by Opus 5). Read a run answered
|
| 145 |
+
mostly by Opus 5 as an Opus 5 result and the others as mixed-model runs; each index records
|
| 146 |
+
the counts under `model_fallback` and the table above shows them.
|
| 147 |
+
Each index also carries `agent`, `model_requested`, `scoring_hardware` and `caveats`.
|
| 148 |
+
Differences from the Astra runs are stated there: PDE surrogate snapshots were scored on one
|
| 149 |
+
A100 (allowed by the task; one snapshot scored on both differed by 1.4e-5); Protein Folding
|
| 150 |
+
and Molecular Pretraining snapshots were scored on one H100 after a matching eight-GPU
|
| 151 |
+
replay; Fruit Fly evaluations mount the H100 build of the trusted point-sampling library.
|
| 152 |
+
Two trials carry a completion correction, with the original failure records kept under
|
| 153 |
+
`logs/completion-correction/`: the launcher wrongly marked the finished Molecular trial
|
| 154 |
+
failed, and the Weather trial was stopped by its supervisor 430 s before the cutoff (its last
|
| 155 |
+
snapshot is accepted as final; the clock was not reset). Evaluations that were replayed
|
| 156 |
+
after a cluster interruption are listed per snapshot under `evaluation_replays`.
|
| 157 |
+
`logs/sessions/` holds Claude Code's own session transcripts, screened like the Codex logs.
|
| 158 |
+
`plots/claude-score-over-time.*` shows score over research time for the scored Claude Code
|
| 159 |
+
histories with single-score or few-metric tasks; its CSV files hold the plotted values and
|
| 160 |
+
the baseline references.
|
| 161 |
+
|
| 162 |
## Provenance and excluded material
|
| 163 |
|
| 164 |
Submissions were produced by the evaluated agent; reports by the native scientific
|
| 165 |
+
scorers under the recorded adapters; logs by the agents (Codex, Claude Code) and the harness. Organization,
|
| 166 |
indexes, plots, and the reconstruction helper were created by the operator.
|
| 167 |
Logs are screened for credentials, with redaction counts and original/exported hashes
|
| 168 |
recorded in the indexes. Authentication stores, private test inputs/labels, raw research
|
shared/package-files/06/0613f491d3a8fe4e53b8d84ca3a42bea37b110745c0e98be5308e924fb3db0dc/fused-score.log
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released all=0.7481 dom=0.9089 non=0.5867 h5=0.8744 h20=0.9313 | diff=+0.0000 [+0.0000,+0.0000] | ind 0.6012 +0.0000 [+0.0000,+0.0000]
|
| 2 |
+
pools +0 -0 | macro 0.8379 +0.0000 [+0.0000,+0.0000] | without top 20 +0.0000 [+0.0000,+0.0000] | weight min(n,30) +0.0000 [+0.0000,+0.0000]
|
| 3 |
+
cos all=0.7481 dom=0.9089 non=0.5867 h5=0.8744 h20=0.9313 | diff=+0.0000 [+0.0000,+0.0000] | ind 0.6012 +0.0000 [+0.0000,+0.0000]
|
| 4 |
+
pools +0 -0 | macro 0.8379 +0.0000 [+0.0000,+0.0000] | without top 20 +0.0000 [+0.0000,+0.0000] | weight min(n,30) +0.0000 [+0.0000,+0.0000]
|
| 5 |
+
cos_pm all=0.7489 dom=0.9098 non=0.5874 h5=0.8740 h20=0.9313 | diff=+0.0008 [-0.0004,+0.0026] | ind 0.6023 +0.0011 [+0.0000,+0.0023]
|
| 6 |
+
pools +5 -2 | macro 0.8387 +0.0009 [-0.0006,+0.0024] | without top 20 +0.0009 [-0.0004,+0.0028] | weight min(n,30) +0.0010 [-0.0004,+0.0029]
|
| 7 |
+
pow05 all=0.7468 dom=0.9094 non=0.5836 h5=0.8738 h20=0.9333 | diff=-0.0013 [-0.0102,+0.0071] | ind 0.6052 +0.0040 [+0.0013,+0.0070]
|
| 8 |
+
pools +29 -27 | macro 0.8385 +0.0006 [-0.0038,+0.0050] | without top 20 -0.0014 [-0.0109,+0.0081] | weight min(n,30) -0.0012 [-0.0098,+0.0076]
|
| 9 |
+
pow060 all=0.7519 dom=0.9130 non=0.5902 h5=0.8724 h20=0.9300 | diff=+0.0038 [-0.0026,+0.0108] | ind 0.6059 +0.0047 [+0.0027,+0.0069]
|
| 10 |
+
pools +25 -15 | macro 0.8408 +0.0030 [-0.0009,+0.0068] | without top 20 +0.0043 [-0.0026,+0.0121] | weight min(n,30) +0.0040 [-0.0027,+0.0113]
|
| 11 |
+
pow070 all=0.7525 dom=0.9136 non=0.5907 h5=0.8728 h20=0.9292 | diff=+0.0044 [-0.0020,+0.0114] | ind 0.6053 +0.0041 [+0.0025,+0.0058]
|
| 12 |
+
pools +23 -11 | macro 0.8414 +0.0035 [+0.0003,+0.0071] | without top 20 +0.0049 [-0.0018,+0.0127] | weight min(n,30) +0.0046 [-0.0020,+0.0121]
|
| 13 |
+
pow05m all=0.7471 dom=0.9092 non=0.5843 h5=0.8728 h20=0.9315 | diff=-0.0010 [-0.0101,+0.0072] | ind 0.6044 +0.0032 [+0.0006,+0.0062]
|
| 14 |
+
pools +28 -23 | macro 0.8393 +0.0015 [-0.0027,+0.0056] | without top 20 -0.0012 [-0.0107,+0.0084] | weight min(n,30) -0.0009 [-0.0096,+0.0079]
|
| 15 |
+
pow05idf05 all=0.7508 dom=0.9123 non=0.5888 h5=0.8761 h20=0.9341 | diff=+0.0027 [-0.0070,+0.0115] | ind 0.6141 +0.0129 [+0.0096,+0.0162]
|
| 16 |
+
pools +41 -31 | macro 0.8408 +0.0030 [-0.0021,+0.0077] | without top 20 +0.0031 [-0.0075,+0.0131] | weight min(n,30) +0.0035 [-0.0060,+0.0130]
|
| 17 |
+
idf05 all=0.7462 dom=0.9102 non=0.5814 h5=0.8745 h20=0.9282 | diff=-0.0020 [-0.0096,+0.0056] | ind 0.6110 +0.0098 [+0.0063,+0.0133]
|
| 18 |
+
pools +23 -27 | macro 0.8367 -0.0012 [-0.0053,+0.0030] | without top 20 -0.0022 [-0.0105,+0.0063] | weight min(n,30) -0.0019 [-0.0093,+0.0059]
|
| 19 |
+
log05 all=0.7482 dom=0.9143 non=0.5814 h5=0.8730 h20=0.9302 | diff=+0.0001 [-0.0110,+0.0097] | ind 0.6087 +0.0075 [+0.0047,+0.0102]
|
| 20 |
+
pools +34 -25 | macro 0.8405 +0.0027 [-0.0018,+0.0074] | without top 20 +0.0047 [-0.0025,+0.0127] | weight min(n,30) +0.0026 [-0.0056,+0.0106]
|
| 21 |
+
log20 all=0.7510 dom=0.9127 non=0.5888 h5=0.8721 h20=0.9296 | diff=+0.0029 [-0.0050,+0.0099] | ind 0.6067 +0.0055 [+0.0035,+0.0076]
|
| 22 |
+
pools +26 -17 | macro 0.8405 +0.0027 [-0.0012,+0.0065] | without top 20 +0.0033 [-0.0051,+0.0115] | weight min(n,30) +0.0037 [-0.0037,+0.0111]
|
shared/package-files/06/0632869a92c7cdd74d3ff751604c24a2d0fd252d866be4143125b2e424992c3f/eval-score-N5-recur-ms10-p96.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 5 members, 442.1 s
|
| 2 |
+
cos pool rule all=0.6425 dom=0.8526 non=0.4316 h5=0.7435 macro=0.7478
|
| 3 |
+
cen pool rule all=0.6299 dom=0.8354 non=0.4235 h5=0.7426 macro=0.7227
|
| 4 |
+
cos_pm pool rule all=0.6465 dom=0.8533 non=0.4388 h5=0.7477 macro=0.7493
|
| 5 |
+
dot pool rule all=0.6526 dom=0.8366 non=0.4679 h5=0.7792 macro=0.7413
|
| 6 |
+
geo pool rule all=0.6324 dom=0.8468 non=0.4171 h5=0.7343 macro=0.7389
|
| 7 |
+
idf05 pool rule all=0.6545 dom=0.8601 non=0.4482 h5=0.7545 macro=0.7513
|
| 8 |
+
idf1 pool rule all=0.6587 dom=0.8591 non=0.4576 h5=0.7624 macro=0.7522
|
| 9 |
+
lin pool rule all=0.6148 dom=0.8227 non=0.4060 h5=0.7208 macro=0.7129
|
| 10 |
+
log01 pool rule all=0.6688 dom=0.8617 non=0.4752 h5=0.7809 macro=0.7472
|
| 11 |
+
log05 pool rule all=0.6823 dom=0.8598 non=0.5041 h5=0.7977 macro=0.7561
|
| 12 |
+
log20 pool rule all=0.6575 dom=0.8613 non=0.4528 h5=0.7614 macro=0.7581
|
| 13 |
+
nll02 pool rule all=0.5052 dom=0.7518 non=0.2577 h5=0.6442 macro=0.6190
|
| 14 |
+
nll10 pool rule all=0.4722 dom=0.7099 non=0.2335 h5=0.6081 macro=0.5709
|
| 15 |
+
poolcen pool rule all=0.6329 dom=0.8326 non=0.4323 h5=0.7640 macro=0.7230
|
| 16 |
+
pow020 pool rule all=0.6242 dom=0.8354 non=0.4121 h5=0.7698 macro=0.7312
|
| 17 |
+
pow030 pool rule all=0.6236 dom=0.8471 non=0.3992 h5=0.7780 macro=0.7357
|
| 18 |
+
pow040 pool rule all=0.6702 dom=0.8547 non=0.4850 h5=0.7916 macro=0.7478
|
| 19 |
+
pow05 pool rule all=0.6504 dom=0.8587 non=0.4413 h5=0.7645 macro=0.7531
|
| 20 |
+
pow05idf025 pool rule all=0.6556 dom=0.8620 non=0.4484 h5=0.7668 macro=0.7578
|
| 21 |
+
pow05idf05 pool rule all=0.6527 dom=0.8621 non=0.4425 h5=0.7667 macro=0.7572
|
| 22 |
+
pow05m pool rule all=0.6483 dom=0.8555 non=0.4403 h5=0.7561 macro=0.7519
|
| 23 |
+
pow05s pool rule all=0.6466 dom=0.8557 non=0.4366 h5=0.7637 macro=0.7519
|
| 24 |
+
pow060 pool rule all=0.6520 dom=0.8578 non=0.4454 h5=0.7642 macro=0.7558
|
| 25 |
+
pow060idf025 pool rule all=0.6568 dom=0.8618 non=0.4509 h5=0.7656 macro=0.7587
|
| 26 |
+
pow060idf050 pool rule all=0.6547 dom=0.8618 non=0.4467 h5=0.7687 macro=0.7584
|
| 27 |
+
pow060m pool rule all=0.6472 dom=0.8538 non=0.4397 h5=0.7585 macro=0.7531
|
| 28 |
+
pow065 pool rule all=0.6546 dom=0.8592 non=0.4493 h5=0.7640 macro=0.7566
|
| 29 |
+
pow070 pool rule all=0.6565 dom=0.8607 non=0.4516 h5=0.7624 macro=0.7575
|
| 30 |
+
pow070idf025 pool rule all=0.6547 dom=0.8609 non=0.4478 h5=0.7674 macro=0.7563
|
| 31 |
+
pow070idf050 pool rule all=0.6571 dom=0.8608 non=0.4525 h5=0.7673 macro=0.7563
|
| 32 |
+
pow070m pool rule all=0.6444 dom=0.8532 non=0.4348 h5=0.7549 macro=0.7528
|
| 33 |
+
pow075 pool rule all=0.6535 dom=0.8564 non=0.4497 h5=0.7584 macro=0.7569
|
| 34 |
+
pow080 pool rule all=0.6556 dom=0.8561 non=0.4543 h5=0.7556 macro=0.7569
|
| 35 |
+
pow080m pool rule all=0.6451 dom=0.8544 non=0.4350 h5=0.7516 macro=0.7522
|
| 36 |
+
pow085 pool rule all=0.6551 dom=0.8565 non=0.4528 h5=0.7560 macro=0.7563
|
| 37 |
+
pow085idf025 pool rule all=0.6531 dom=0.8608 non=0.4447 h5=0.7542 macro=0.7546
|
| 38 |
+
pow085idf050 pool rule all=0.6569 dom=0.8610 non=0.4520 h5=0.7596 macro=0.7549
|
| 39 |
+
pow090 pool rule all=0.6522 dom=0.8552 non=0.4484 h5=0.7482 macro=0.7540
|
| 40 |
+
pow2 pool rule all=0.6148 dom=0.8258 non=0.4029 h5=0.7367 macro=0.7221
|
| 41 |
+
tani pool rule all=0.6319 dom=0.8356 non=0.4274 h5=0.7477 macro=0.7377
|
shared/package-files/06/0674003ec6726a71037cf4cb852155f0c2b4a244d97f1f205e90edc3a8657464/model_config.json
ADDED
|
@@ -0,0 +1,1108 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"sparse_k": 100,
|
| 3 |
+
"inference_batch_size": 128,
|
| 4 |
+
"workers": 14,
|
| 5 |
+
"num_bins": 150000,
|
| 6 |
+
"upper_limit": 1500,
|
| 7 |
+
"max_observed_peaks": 50,
|
| 8 |
+
"observed_intensity_threshold": 0.001,
|
| 9 |
+
"ensemble": "prediction",
|
| 10 |
+
"pool_aggregation": 1.0,
|
| 11 |
+
"autocast": false,
|
| 12 |
+
"model": {
|
| 13 |
+
"pe_embed_k": 14,
|
| 14 |
+
"embed_elem_group": true,
|
| 15 |
+
"multi_hop_max_dist": 10
|
| 16 |
+
},
|
| 17 |
+
"checkpoint": "model.pt",
|
| 18 |
+
"views": [
|
| 19 |
+
{
|
| 20 |
+
"precursor_window": 0.5,
|
| 21 |
+
"pred_power": 0.75,
|
| 22 |
+
"match_ppm": 20,
|
| 23 |
+
"match_floor_mda": 4,
|
| 24 |
+
"match_by_instrument": {
|
| 25 |
+
"Orbitrap": [
|
| 26 |
+
10,
|
| 27 |
+
1
|
| 28 |
+
]
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
],
|
| 32 |
+
"inverse": {
|
| 33 |
+
"pooled": true,
|
| 34 |
+
"score": {
|
| 35 |
+
"members": "probability",
|
| 36 |
+
"power": 0.7
|
| 37 |
+
},
|
| 38 |
+
"weight_domain": 0.75,
|
| 39 |
+
"weight_other": 0.05,
|
| 40 |
+
"weight_other_single": 0.5,
|
| 41 |
+
"batch": 2048
|
| 42 |
+
},
|
| 43 |
+
"library": {
|
| 44 |
+
"kind": "sum",
|
| 45 |
+
"k": 20,
|
| 46 |
+
"top": 32,
|
| 47 |
+
"power": 6,
|
| 48 |
+
"debias": true,
|
| 49 |
+
"weight_domain": 0.0,
|
| 50 |
+
"weight_other": 0.4,
|
| 51 |
+
"weight_other_single": 0.0
|
| 52 |
+
},
|
| 53 |
+
"ion": {
|
| 54 |
+
"weight_domain": 0.05,
|
| 55 |
+
"weight_other": 0.01
|
| 56 |
+
},
|
| 57 |
+
"consensus": {
|
| 58 |
+
"k": 10,
|
| 59 |
+
"top": 32,
|
| 60 |
+
"power": 3.0,
|
| 61 |
+
"answers": 10,
|
| 62 |
+
"temperature": 0.02,
|
| 63 |
+
"absorb": 0.5,
|
| 64 |
+
"bin": 0.01,
|
| 65 |
+
"weight_domain": 1.0,
|
| 66 |
+
"weight_other": 1.0
|
| 67 |
+
},
|
| 68 |
+
"inverse_members": [
|
| 69 |
+
{
|
| 70 |
+
"source": "runs/I16-ff512x6-real08-corpus2+train3-noise05/step-0050000-ema.pt",
|
| 71 |
+
"sha256": "035b6418b0be40e11479e170e5c926b352bc56cd8ce823cdfa88169421c91ff1",
|
| 72 |
+
"step": 50000,
|
| 73 |
+
"class": "FormulaFormer",
|
| 74 |
+
"weights": "ema",
|
| 75 |
+
"initialization": "random",
|
| 76 |
+
"seed": 1,
|
| 77 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 78 |
+
"self_simulated_store": {
|
| 79 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 80 |
+
"rows": 2031301,
|
| 81 |
+
"manifest": {
|
| 82 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 83 |
+
"merged": [
|
| 84 |
+
"inv/selfsim/corpus2.npz",
|
| 85 |
+
"inv/selfsim/train3.npz"
|
| 86 |
+
],
|
| 87 |
+
"parts": [
|
| 88 |
+
{
|
| 89 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 90 |
+
"merged": [
|
| 91 |
+
"inv/selfsim/sub75.npz",
|
| 92 |
+
"inv/selfsim/sub25.npz"
|
| 93 |
+
],
|
| 94 |
+
"parts": [
|
| 95 |
+
{
|
| 96 |
+
"name": "sub75",
|
| 97 |
+
"source": "synth",
|
| 98 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 99 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 100 |
+
"members": "1,3",
|
| 101 |
+
"structures": 435076,
|
| 102 |
+
"tasks": 651127,
|
| 103 |
+
"failed": 0,
|
| 104 |
+
"rows": 651127,
|
| 105 |
+
"seconds": 635.7592854518443,
|
| 106 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 107 |
+
"floor": 0.02,
|
| 108 |
+
"spectra": 651083,
|
| 109 |
+
"without_peak": 44,
|
| 110 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 111 |
+
"mean_candidates": 20.62178653319552,
|
| 112 |
+
"ppm": 20.0,
|
| 113 |
+
"floor_da": 0.004,
|
| 114 |
+
"max_peaks": 24,
|
| 115 |
+
"annotate_seconds": 25.62758301384747
|
| 116 |
+
},
|
| 117 |
+
{
|
| 118 |
+
"name": "sub25",
|
| 119 |
+
"source": "synth",
|
| 120 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 121 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 122 |
+
"members": "1,3",
|
| 123 |
+
"structures": 435076,
|
| 124 |
+
"tasks": 217012,
|
| 125 |
+
"failed": 0,
|
| 126 |
+
"rows": 217012,
|
| 127 |
+
"seconds": 227.74617605702952,
|
| 128 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 129 |
+
"floor": 0.02,
|
| 130 |
+
"spectra": 217000,
|
| 131 |
+
"without_peak": 12,
|
| 132 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 133 |
+
"mean_candidates": 20.61567563084069,
|
| 134 |
+
"ppm": 20.0,
|
| 135 |
+
"floor_da": 0.004,
|
| 136 |
+
"max_peaks": 24,
|
| 137 |
+
"annotate_seconds": 10.8742212112993
|
| 138 |
+
}
|
| 139 |
+
],
|
| 140 |
+
"spectra": 868083,
|
| 141 |
+
"structures": 434944
|
| 142 |
+
},
|
| 143 |
+
{
|
| 144 |
+
"name": "train3",
|
| 145 |
+
"source": "synth",
|
| 146 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 147 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 148 |
+
"members": "1,3",
|
| 149 |
+
"structures": 435076,
|
| 150 |
+
"tasks": 1163260,
|
| 151 |
+
"failed": 0,
|
| 152 |
+
"rows": 1163260,
|
| 153 |
+
"seconds": 1262.926542488858,
|
| 154 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 155 |
+
"floor": 0.02,
|
| 156 |
+
"spectra": 1163218,
|
| 157 |
+
"without_peak": 42,
|
| 158 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 159 |
+
"mean_candidates": 25.376552103570997,
|
| 160 |
+
"ppm": 20.0,
|
| 161 |
+
"floor_da": 0.004,
|
| 162 |
+
"max_peaks": 24,
|
| 163 |
+
"annotate_seconds": 43.40271363919601
|
| 164 |
+
}
|
| 165 |
+
],
|
| 166 |
+
"spectra": 2031301,
|
| 167 |
+
"structures": 434950
|
| 168 |
+
}
|
| 169 |
+
},
|
| 170 |
+
"stores": {
|
| 171 |
+
"gen-x1.manifest.json": null,
|
| 172 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 173 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 174 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 175 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 176 |
+
},
|
| 177 |
+
"recipe": {
|
| 178 |
+
"store": "/workspace/research/inv",
|
| 179 |
+
"out": "runs/I16-ff512x6-real08-corpus2+train3-noise05",
|
| 180 |
+
"pools": "pools-validation-input.npz",
|
| 181 |
+
"input": "/workspace/research/validation-input",
|
| 182 |
+
"steps": 50000,
|
| 183 |
+
"batch": 512,
|
| 184 |
+
"real_frac": 0.08,
|
| 185 |
+
"real_balance": 0.5,
|
| 186 |
+
"no_synth": false,
|
| 187 |
+
"target": "",
|
| 188 |
+
"heavy_boost": 1.0,
|
| 189 |
+
"synth_structures": 1.0,
|
| 190 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 191 |
+
"extra_frac": 0.5,
|
| 192 |
+
"heavy_lo": 450.0,
|
| 193 |
+
"heavy_hi": 850.0,
|
| 194 |
+
"lr": 0.0006,
|
| 195 |
+
"weight_decay": 0.0001,
|
| 196 |
+
"warmup": 2000,
|
| 197 |
+
"ema": 0.999,
|
| 198 |
+
"dim": 512,
|
| 199 |
+
"layers": 6,
|
| 200 |
+
"heads": 8,
|
| 201 |
+
"dropout": 0.1,
|
| 202 |
+
"peak_drop": 0.3,
|
| 203 |
+
"truncate": 0.3,
|
| 204 |
+
"min_keep": 4,
|
| 205 |
+
"jitter": 0.15,
|
| 206 |
+
"synth_energy_drop": 0.3,
|
| 207 |
+
"synth_instrument_drop": 0.3,
|
| 208 |
+
"validate_every": 5000,
|
| 209 |
+
"retrieve_every": 10000,
|
| 210 |
+
"retrieve_pools": 0,
|
| 211 |
+
"seed": 1,
|
| 212 |
+
"contrast_weight": 0.0,
|
| 213 |
+
"contrast_k": 31,
|
| 214 |
+
"contrast_tau": 0.05,
|
| 215 |
+
"noise_rate": 0.5,
|
| 216 |
+
"noise_max": 12,
|
| 217 |
+
"noise_scatter": 0.35,
|
| 218 |
+
"noise_shape": 3.0,
|
| 219 |
+
"init": null,
|
| 220 |
+
"max_steps_this_run": 0
|
| 221 |
+
}
|
| 222 |
+
},
|
| 223 |
+
{
|
| 224 |
+
"source": "runs/I18-ff512x6-real08-corpus2+train3-noise05-real025/step-0050000-ema.pt",
|
| 225 |
+
"sha256": "2eb34f936b8645b0eaabfcb2a483c2c88d6fb640937a89c66cda6a9def1ef267",
|
| 226 |
+
"step": 50000,
|
| 227 |
+
"class": "FormulaFormer",
|
| 228 |
+
"weights": "ema",
|
| 229 |
+
"initialization": "random",
|
| 230 |
+
"seed": 1,
|
| 231 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 232 |
+
"self_simulated_store": {
|
| 233 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 234 |
+
"rows": 2031301,
|
| 235 |
+
"manifest": {
|
| 236 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 237 |
+
"merged": [
|
| 238 |
+
"inv/selfsim/corpus2.npz",
|
| 239 |
+
"inv/selfsim/train3.npz"
|
| 240 |
+
],
|
| 241 |
+
"parts": [
|
| 242 |
+
{
|
| 243 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 244 |
+
"merged": [
|
| 245 |
+
"inv/selfsim/sub75.npz",
|
| 246 |
+
"inv/selfsim/sub25.npz"
|
| 247 |
+
],
|
| 248 |
+
"parts": [
|
| 249 |
+
{
|
| 250 |
+
"name": "sub75",
|
| 251 |
+
"source": "synth",
|
| 252 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 253 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 254 |
+
"members": "1,3",
|
| 255 |
+
"structures": 435076,
|
| 256 |
+
"tasks": 651127,
|
| 257 |
+
"failed": 0,
|
| 258 |
+
"rows": 651127,
|
| 259 |
+
"seconds": 635.7592854518443,
|
| 260 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 261 |
+
"floor": 0.02,
|
| 262 |
+
"spectra": 651083,
|
| 263 |
+
"without_peak": 44,
|
| 264 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 265 |
+
"mean_candidates": 20.62178653319552,
|
| 266 |
+
"ppm": 20.0,
|
| 267 |
+
"floor_da": 0.004,
|
| 268 |
+
"max_peaks": 24,
|
| 269 |
+
"annotate_seconds": 25.62758301384747
|
| 270 |
+
},
|
| 271 |
+
{
|
| 272 |
+
"name": "sub25",
|
| 273 |
+
"source": "synth",
|
| 274 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 275 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 276 |
+
"members": "1,3",
|
| 277 |
+
"structures": 435076,
|
| 278 |
+
"tasks": 217012,
|
| 279 |
+
"failed": 0,
|
| 280 |
+
"rows": 217012,
|
| 281 |
+
"seconds": 227.74617605702952,
|
| 282 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 283 |
+
"floor": 0.02,
|
| 284 |
+
"spectra": 217000,
|
| 285 |
+
"without_peak": 12,
|
| 286 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 287 |
+
"mean_candidates": 20.61567563084069,
|
| 288 |
+
"ppm": 20.0,
|
| 289 |
+
"floor_da": 0.004,
|
| 290 |
+
"max_peaks": 24,
|
| 291 |
+
"annotate_seconds": 10.8742212112993
|
| 292 |
+
}
|
| 293 |
+
],
|
| 294 |
+
"spectra": 868083,
|
| 295 |
+
"structures": 434944
|
| 296 |
+
},
|
| 297 |
+
{
|
| 298 |
+
"name": "train3",
|
| 299 |
+
"source": "synth",
|
| 300 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 301 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 302 |
+
"members": "1,3",
|
| 303 |
+
"structures": 435076,
|
| 304 |
+
"tasks": 1163260,
|
| 305 |
+
"failed": 0,
|
| 306 |
+
"rows": 1163260,
|
| 307 |
+
"seconds": 1262.926542488858,
|
| 308 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 309 |
+
"floor": 0.02,
|
| 310 |
+
"spectra": 1163218,
|
| 311 |
+
"without_peak": 42,
|
| 312 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 313 |
+
"mean_candidates": 25.376552103570997,
|
| 314 |
+
"ppm": 20.0,
|
| 315 |
+
"floor_da": 0.004,
|
| 316 |
+
"max_peaks": 24,
|
| 317 |
+
"annotate_seconds": 43.40271363919601
|
| 318 |
+
}
|
| 319 |
+
],
|
| 320 |
+
"spectra": 2031301,
|
| 321 |
+
"structures": 434950
|
| 322 |
+
}
|
| 323 |
+
},
|
| 324 |
+
"stores": {
|
| 325 |
+
"gen-x1.manifest.json": null,
|
| 326 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 327 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 328 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 329 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 330 |
+
},
|
| 331 |
+
"recipe": {
|
| 332 |
+
"store": "/workspace/research/inv",
|
| 333 |
+
"out": "runs/I18-ff512x6-real08-corpus2+train3-noise05-real025",
|
| 334 |
+
"pools": "pools-validation-input.npz",
|
| 335 |
+
"input": "/workspace/research/validation-input",
|
| 336 |
+
"steps": 50000,
|
| 337 |
+
"batch": 512,
|
| 338 |
+
"real_frac": 0.08,
|
| 339 |
+
"real_balance": 0.5,
|
| 340 |
+
"no_synth": false,
|
| 341 |
+
"target": "",
|
| 342 |
+
"heavy_boost": 1.0,
|
| 343 |
+
"synth_structures": 1.0,
|
| 344 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 345 |
+
"extra_frac": 0.5,
|
| 346 |
+
"heavy_lo": 450.0,
|
| 347 |
+
"heavy_hi": 850.0,
|
| 348 |
+
"lr": 0.0006,
|
| 349 |
+
"weight_decay": 0.0001,
|
| 350 |
+
"warmup": 2000,
|
| 351 |
+
"ema": 0.999,
|
| 352 |
+
"dim": 512,
|
| 353 |
+
"layers": 6,
|
| 354 |
+
"heads": 8,
|
| 355 |
+
"dropout": 0.1,
|
| 356 |
+
"peak_drop": 0.3,
|
| 357 |
+
"truncate": 0.3,
|
| 358 |
+
"min_keep": 4,
|
| 359 |
+
"jitter": 0.15,
|
| 360 |
+
"synth_energy_drop": 0.3,
|
| 361 |
+
"synth_instrument_drop": 0.3,
|
| 362 |
+
"validate_every": 5000,
|
| 363 |
+
"retrieve_every": 10000,
|
| 364 |
+
"retrieve_pools": 0,
|
| 365 |
+
"seed": 1,
|
| 366 |
+
"contrast_weight": 0.0,
|
| 367 |
+
"contrast_k": 31,
|
| 368 |
+
"contrast_tau": 0.05,
|
| 369 |
+
"noise_rate": 0.5,
|
| 370 |
+
"noise_max": 12,
|
| 371 |
+
"noise_scatter": 0.35,
|
| 372 |
+
"noise_shape": 3.0,
|
| 373 |
+
"noise_real_rate": 0.25,
|
| 374 |
+
"synth_peak_drop": -1.0,
|
| 375 |
+
"init": null,
|
| 376 |
+
"max_steps_this_run": 0
|
| 377 |
+
}
|
| 378 |
+
},
|
| 379 |
+
{
|
| 380 |
+
"source": "runs/I19-ff512x6-real08-corpus2+train3-noise05-jit08/step-0050000-ema.pt",
|
| 381 |
+
"sha256": "7b95edd35fa25625b8ad091d901545d59b5257c95122f7912931317abbc42701",
|
| 382 |
+
"step": 50000,
|
| 383 |
+
"class": "FormulaFormer",
|
| 384 |
+
"weights": "ema",
|
| 385 |
+
"initialization": "random",
|
| 386 |
+
"seed": 1,
|
| 387 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 388 |
+
"self_simulated_store": {
|
| 389 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 390 |
+
"rows": 2031301,
|
| 391 |
+
"manifest": {
|
| 392 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 393 |
+
"merged": [
|
| 394 |
+
"inv/selfsim/corpus2.npz",
|
| 395 |
+
"inv/selfsim/train3.npz"
|
| 396 |
+
],
|
| 397 |
+
"parts": [
|
| 398 |
+
{
|
| 399 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 400 |
+
"merged": [
|
| 401 |
+
"inv/selfsim/sub75.npz",
|
| 402 |
+
"inv/selfsim/sub25.npz"
|
| 403 |
+
],
|
| 404 |
+
"parts": [
|
| 405 |
+
{
|
| 406 |
+
"name": "sub75",
|
| 407 |
+
"source": "synth",
|
| 408 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 409 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 410 |
+
"members": "1,3",
|
| 411 |
+
"structures": 435076,
|
| 412 |
+
"tasks": 651127,
|
| 413 |
+
"failed": 0,
|
| 414 |
+
"rows": 651127,
|
| 415 |
+
"seconds": 635.7592854518443,
|
| 416 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 417 |
+
"floor": 0.02,
|
| 418 |
+
"spectra": 651083,
|
| 419 |
+
"without_peak": 44,
|
| 420 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 421 |
+
"mean_candidates": 20.62178653319552,
|
| 422 |
+
"ppm": 20.0,
|
| 423 |
+
"floor_da": 0.004,
|
| 424 |
+
"max_peaks": 24,
|
| 425 |
+
"annotate_seconds": 25.62758301384747
|
| 426 |
+
},
|
| 427 |
+
{
|
| 428 |
+
"name": "sub25",
|
| 429 |
+
"source": "synth",
|
| 430 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 431 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 432 |
+
"members": "1,3",
|
| 433 |
+
"structures": 435076,
|
| 434 |
+
"tasks": 217012,
|
| 435 |
+
"failed": 0,
|
| 436 |
+
"rows": 217012,
|
| 437 |
+
"seconds": 227.74617605702952,
|
| 438 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 439 |
+
"floor": 0.02,
|
| 440 |
+
"spectra": 217000,
|
| 441 |
+
"without_peak": 12,
|
| 442 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 443 |
+
"mean_candidates": 20.61567563084069,
|
| 444 |
+
"ppm": 20.0,
|
| 445 |
+
"floor_da": 0.004,
|
| 446 |
+
"max_peaks": 24,
|
| 447 |
+
"annotate_seconds": 10.8742212112993
|
| 448 |
+
}
|
| 449 |
+
],
|
| 450 |
+
"spectra": 868083,
|
| 451 |
+
"structures": 434944
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"name": "train3",
|
| 455 |
+
"source": "synth",
|
| 456 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 457 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 458 |
+
"members": "1,3",
|
| 459 |
+
"structures": 435076,
|
| 460 |
+
"tasks": 1163260,
|
| 461 |
+
"failed": 0,
|
| 462 |
+
"rows": 1163260,
|
| 463 |
+
"seconds": 1262.926542488858,
|
| 464 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 465 |
+
"floor": 0.02,
|
| 466 |
+
"spectra": 1163218,
|
| 467 |
+
"without_peak": 42,
|
| 468 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 469 |
+
"mean_candidates": 25.376552103570997,
|
| 470 |
+
"ppm": 20.0,
|
| 471 |
+
"floor_da": 0.004,
|
| 472 |
+
"max_peaks": 24,
|
| 473 |
+
"annotate_seconds": 43.40271363919601
|
| 474 |
+
}
|
| 475 |
+
],
|
| 476 |
+
"spectra": 2031301,
|
| 477 |
+
"structures": 434950
|
| 478 |
+
}
|
| 479 |
+
},
|
| 480 |
+
"stores": {
|
| 481 |
+
"gen-x1.manifest.json": null,
|
| 482 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 483 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 484 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 485 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 486 |
+
},
|
| 487 |
+
"recipe": {
|
| 488 |
+
"store": "/workspace/research/inv",
|
| 489 |
+
"out": "runs/I19-ff512x6-real08-corpus2+train3-noise05-jit08",
|
| 490 |
+
"pools": "pools-validation-input.npz",
|
| 491 |
+
"input": "/workspace/research/validation-input",
|
| 492 |
+
"steps": 50000,
|
| 493 |
+
"batch": 512,
|
| 494 |
+
"real_frac": 0.08,
|
| 495 |
+
"real_balance": 0.5,
|
| 496 |
+
"no_synth": false,
|
| 497 |
+
"target": "",
|
| 498 |
+
"heavy_boost": 1.0,
|
| 499 |
+
"synth_structures": 1.0,
|
| 500 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 501 |
+
"extra_frac": 0.5,
|
| 502 |
+
"heavy_lo": 450.0,
|
| 503 |
+
"heavy_hi": 850.0,
|
| 504 |
+
"lr": 0.0006,
|
| 505 |
+
"weight_decay": 0.0001,
|
| 506 |
+
"warmup": 2000,
|
| 507 |
+
"ema": 0.999,
|
| 508 |
+
"dim": 512,
|
| 509 |
+
"layers": 6,
|
| 510 |
+
"heads": 8,
|
| 511 |
+
"dropout": 0.1,
|
| 512 |
+
"peak_drop": 0.3,
|
| 513 |
+
"truncate": 0.3,
|
| 514 |
+
"min_keep": 4,
|
| 515 |
+
"jitter": 0.15,
|
| 516 |
+
"synth_energy_drop": 0.3,
|
| 517 |
+
"synth_instrument_drop": 0.3,
|
| 518 |
+
"validate_every": 5000,
|
| 519 |
+
"retrieve_every": 10000,
|
| 520 |
+
"retrieve_pools": 0,
|
| 521 |
+
"seed": 1,
|
| 522 |
+
"contrast_weight": 0.0,
|
| 523 |
+
"contrast_k": 31,
|
| 524 |
+
"contrast_tau": 0.05,
|
| 525 |
+
"noise_rate": 0.5,
|
| 526 |
+
"noise_max": 12,
|
| 527 |
+
"noise_scatter": 0.35,
|
| 528 |
+
"noise_shape": 3.0,
|
| 529 |
+
"noise_real_rate": 0.0,
|
| 530 |
+
"synth_peak_drop": -1.0,
|
| 531 |
+
"synth_jitter": 0.8,
|
| 532 |
+
"noise_near": 0.0,
|
| 533 |
+
"noise_deltas": "inv/noise_deltas.json",
|
| 534 |
+
"init": null,
|
| 535 |
+
"max_steps_this_run": 0
|
| 536 |
+
}
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"source": "runs/I20-ff512x6-real08-corpus2+train3-noise05-near067/step-0050000-ema.pt",
|
| 540 |
+
"sha256": "0e017ce27059d5215f38a8b16124408a8a2e3e61c4b86704751485e6a6f610de",
|
| 541 |
+
"step": 50000,
|
| 542 |
+
"class": "FormulaFormer",
|
| 543 |
+
"weights": "ema",
|
| 544 |
+
"initialization": "random",
|
| 545 |
+
"seed": 1,
|
| 546 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 547 |
+
"self_simulated_store": {
|
| 548 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 549 |
+
"rows": 2031301,
|
| 550 |
+
"manifest": {
|
| 551 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 552 |
+
"merged": [
|
| 553 |
+
"inv/selfsim/corpus2.npz",
|
| 554 |
+
"inv/selfsim/train3.npz"
|
| 555 |
+
],
|
| 556 |
+
"parts": [
|
| 557 |
+
{
|
| 558 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 559 |
+
"merged": [
|
| 560 |
+
"inv/selfsim/sub75.npz",
|
| 561 |
+
"inv/selfsim/sub25.npz"
|
| 562 |
+
],
|
| 563 |
+
"parts": [
|
| 564 |
+
{
|
| 565 |
+
"name": "sub75",
|
| 566 |
+
"source": "synth",
|
| 567 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 568 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 569 |
+
"members": "1,3",
|
| 570 |
+
"structures": 435076,
|
| 571 |
+
"tasks": 651127,
|
| 572 |
+
"failed": 0,
|
| 573 |
+
"rows": 651127,
|
| 574 |
+
"seconds": 635.7592854518443,
|
| 575 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 576 |
+
"floor": 0.02,
|
| 577 |
+
"spectra": 651083,
|
| 578 |
+
"without_peak": 44,
|
| 579 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 580 |
+
"mean_candidates": 20.62178653319552,
|
| 581 |
+
"ppm": 20.0,
|
| 582 |
+
"floor_da": 0.004,
|
| 583 |
+
"max_peaks": 24,
|
| 584 |
+
"annotate_seconds": 25.62758301384747
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"name": "sub25",
|
| 588 |
+
"source": "synth",
|
| 589 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 590 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 591 |
+
"members": "1,3",
|
| 592 |
+
"structures": 435076,
|
| 593 |
+
"tasks": 217012,
|
| 594 |
+
"failed": 0,
|
| 595 |
+
"rows": 217012,
|
| 596 |
+
"seconds": 227.74617605702952,
|
| 597 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 598 |
+
"floor": 0.02,
|
| 599 |
+
"spectra": 217000,
|
| 600 |
+
"without_peak": 12,
|
| 601 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 602 |
+
"mean_candidates": 20.61567563084069,
|
| 603 |
+
"ppm": 20.0,
|
| 604 |
+
"floor_da": 0.004,
|
| 605 |
+
"max_peaks": 24,
|
| 606 |
+
"annotate_seconds": 10.8742212112993
|
| 607 |
+
}
|
| 608 |
+
],
|
| 609 |
+
"spectra": 868083,
|
| 610 |
+
"structures": 434944
|
| 611 |
+
},
|
| 612 |
+
{
|
| 613 |
+
"name": "train3",
|
| 614 |
+
"source": "synth",
|
| 615 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 616 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 617 |
+
"members": "1,3",
|
| 618 |
+
"structures": 435076,
|
| 619 |
+
"tasks": 1163260,
|
| 620 |
+
"failed": 0,
|
| 621 |
+
"rows": 1163260,
|
| 622 |
+
"seconds": 1262.926542488858,
|
| 623 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 624 |
+
"floor": 0.02,
|
| 625 |
+
"spectra": 1163218,
|
| 626 |
+
"without_peak": 42,
|
| 627 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 628 |
+
"mean_candidates": 25.376552103570997,
|
| 629 |
+
"ppm": 20.0,
|
| 630 |
+
"floor_da": 0.004,
|
| 631 |
+
"max_peaks": 24,
|
| 632 |
+
"annotate_seconds": 43.40271363919601
|
| 633 |
+
}
|
| 634 |
+
],
|
| 635 |
+
"spectra": 2031301,
|
| 636 |
+
"structures": 434950
|
| 637 |
+
}
|
| 638 |
+
},
|
| 639 |
+
"stores": {
|
| 640 |
+
"gen-x1.manifest.json": null,
|
| 641 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 642 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 643 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 644 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 645 |
+
},
|
| 646 |
+
"recipe": {
|
| 647 |
+
"store": "/workspace/research/inv",
|
| 648 |
+
"out": "runs/I20-ff512x6-real08-corpus2+train3-noise05-near067",
|
| 649 |
+
"pools": "pools-validation-input.npz",
|
| 650 |
+
"input": "/workspace/research/validation-input",
|
| 651 |
+
"steps": 50000,
|
| 652 |
+
"batch": 512,
|
| 653 |
+
"real_frac": 0.08,
|
| 654 |
+
"real_balance": 0.5,
|
| 655 |
+
"no_synth": false,
|
| 656 |
+
"target": "",
|
| 657 |
+
"heavy_boost": 1.0,
|
| 658 |
+
"synth_structures": 1.0,
|
| 659 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 660 |
+
"extra_frac": 0.5,
|
| 661 |
+
"heavy_lo": 450.0,
|
| 662 |
+
"heavy_hi": 850.0,
|
| 663 |
+
"lr": 0.0006,
|
| 664 |
+
"weight_decay": 0.0001,
|
| 665 |
+
"warmup": 2000,
|
| 666 |
+
"ema": 0.999,
|
| 667 |
+
"dim": 512,
|
| 668 |
+
"layers": 6,
|
| 669 |
+
"heads": 8,
|
| 670 |
+
"dropout": 0.1,
|
| 671 |
+
"peak_drop": 0.3,
|
| 672 |
+
"truncate": 0.3,
|
| 673 |
+
"min_keep": 4,
|
| 674 |
+
"jitter": 0.15,
|
| 675 |
+
"synth_energy_drop": 0.3,
|
| 676 |
+
"synth_instrument_drop": 0.3,
|
| 677 |
+
"validate_every": 5000,
|
| 678 |
+
"retrieve_every": 10000,
|
| 679 |
+
"retrieve_pools": 0,
|
| 680 |
+
"seed": 1,
|
| 681 |
+
"contrast_weight": 0.0,
|
| 682 |
+
"contrast_k": 31,
|
| 683 |
+
"contrast_tau": 0.05,
|
| 684 |
+
"noise_rate": 0.5,
|
| 685 |
+
"noise_max": 12,
|
| 686 |
+
"noise_scatter": 0.35,
|
| 687 |
+
"noise_shape": 3.0,
|
| 688 |
+
"noise_real_rate": 0.0,
|
| 689 |
+
"synth_peak_drop": -1.0,
|
| 690 |
+
"synth_jitter": -1.0,
|
| 691 |
+
"noise_near": 0.67,
|
| 692 |
+
"noise_deltas": "inv/noise_deltas.json",
|
| 693 |
+
"init": null,
|
| 694 |
+
"max_steps_this_run": 0
|
| 695 |
+
}
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"source": "runs/I21-ff512x6-real08-corpus2+train3-noise05-real05/step-0050000-ema.pt",
|
| 699 |
+
"sha256": "152cbfe71ab16096186443adff88b0ad14cce4dae65c655858476185167d5ebc",
|
| 700 |
+
"step": 50000,
|
| 701 |
+
"class": "FormulaFormer",
|
| 702 |
+
"weights": "ema",
|
| 703 |
+
"initialization": "random",
|
| 704 |
+
"seed": 1,
|
| 705 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 706 |
+
"self_simulated_store": {
|
| 707 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 708 |
+
"rows": 2031301,
|
| 709 |
+
"manifest": {
|
| 710 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 711 |
+
"merged": [
|
| 712 |
+
"inv/selfsim/corpus2.npz",
|
| 713 |
+
"inv/selfsim/train3.npz"
|
| 714 |
+
],
|
| 715 |
+
"parts": [
|
| 716 |
+
{
|
| 717 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 718 |
+
"merged": [
|
| 719 |
+
"inv/selfsim/sub75.npz",
|
| 720 |
+
"inv/selfsim/sub25.npz"
|
| 721 |
+
],
|
| 722 |
+
"parts": [
|
| 723 |
+
{
|
| 724 |
+
"name": "sub75",
|
| 725 |
+
"source": "synth",
|
| 726 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 727 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 728 |
+
"members": "1,3",
|
| 729 |
+
"structures": 435076,
|
| 730 |
+
"tasks": 651127,
|
| 731 |
+
"failed": 0,
|
| 732 |
+
"rows": 651127,
|
| 733 |
+
"seconds": 635.7592854518443,
|
| 734 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 735 |
+
"floor": 0.02,
|
| 736 |
+
"spectra": 651083,
|
| 737 |
+
"without_peak": 44,
|
| 738 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 739 |
+
"mean_candidates": 20.62178653319552,
|
| 740 |
+
"ppm": 20.0,
|
| 741 |
+
"floor_da": 0.004,
|
| 742 |
+
"max_peaks": 24,
|
| 743 |
+
"annotate_seconds": 25.62758301384747
|
| 744 |
+
},
|
| 745 |
+
{
|
| 746 |
+
"name": "sub25",
|
| 747 |
+
"source": "synth",
|
| 748 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 749 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 750 |
+
"members": "1,3",
|
| 751 |
+
"structures": 435076,
|
| 752 |
+
"tasks": 217012,
|
| 753 |
+
"failed": 0,
|
| 754 |
+
"rows": 217012,
|
| 755 |
+
"seconds": 227.74617605702952,
|
| 756 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 757 |
+
"floor": 0.02,
|
| 758 |
+
"spectra": 217000,
|
| 759 |
+
"without_peak": 12,
|
| 760 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 761 |
+
"mean_candidates": 20.61567563084069,
|
| 762 |
+
"ppm": 20.0,
|
| 763 |
+
"floor_da": 0.004,
|
| 764 |
+
"max_peaks": 24,
|
| 765 |
+
"annotate_seconds": 10.8742212112993
|
| 766 |
+
}
|
| 767 |
+
],
|
| 768 |
+
"spectra": 868083,
|
| 769 |
+
"structures": 434944
|
| 770 |
+
},
|
| 771 |
+
{
|
| 772 |
+
"name": "train3",
|
| 773 |
+
"source": "synth",
|
| 774 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 775 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 776 |
+
"members": "1,3",
|
| 777 |
+
"structures": 435076,
|
| 778 |
+
"tasks": 1163260,
|
| 779 |
+
"failed": 0,
|
| 780 |
+
"rows": 1163260,
|
| 781 |
+
"seconds": 1262.926542488858,
|
| 782 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 783 |
+
"floor": 0.02,
|
| 784 |
+
"spectra": 1163218,
|
| 785 |
+
"without_peak": 42,
|
| 786 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 787 |
+
"mean_candidates": 25.376552103570997,
|
| 788 |
+
"ppm": 20.0,
|
| 789 |
+
"floor_da": 0.004,
|
| 790 |
+
"max_peaks": 24,
|
| 791 |
+
"annotate_seconds": 43.40271363919601
|
| 792 |
+
}
|
| 793 |
+
],
|
| 794 |
+
"spectra": 2031301,
|
| 795 |
+
"structures": 434950
|
| 796 |
+
}
|
| 797 |
+
},
|
| 798 |
+
"stores": {
|
| 799 |
+
"gen-x1.manifest.json": null,
|
| 800 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 801 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 802 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 803 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 804 |
+
},
|
| 805 |
+
"recipe": {
|
| 806 |
+
"store": "/workspace/research/inv",
|
| 807 |
+
"out": "runs/I21-ff512x6-real08-corpus2+train3-noise05-real05",
|
| 808 |
+
"pools": "pools-validation-input.npz",
|
| 809 |
+
"input": "/workspace/research/validation-input",
|
| 810 |
+
"steps": 50000,
|
| 811 |
+
"batch": 512,
|
| 812 |
+
"real_frac": 0.08,
|
| 813 |
+
"real_balance": 0.5,
|
| 814 |
+
"no_synth": false,
|
| 815 |
+
"target": "",
|
| 816 |
+
"heavy_boost": 1.0,
|
| 817 |
+
"synth_structures": 1.0,
|
| 818 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 819 |
+
"extra_frac": 0.5,
|
| 820 |
+
"heavy_lo": 450.0,
|
| 821 |
+
"heavy_hi": 850.0,
|
| 822 |
+
"lr": 0.0006,
|
| 823 |
+
"weight_decay": 0.0001,
|
| 824 |
+
"warmup": 2000,
|
| 825 |
+
"ema": 0.999,
|
| 826 |
+
"dim": 512,
|
| 827 |
+
"layers": 6,
|
| 828 |
+
"heads": 8,
|
| 829 |
+
"dropout": 0.1,
|
| 830 |
+
"peak_drop": 0.3,
|
| 831 |
+
"truncate": 0.3,
|
| 832 |
+
"min_keep": 4,
|
| 833 |
+
"jitter": 0.15,
|
| 834 |
+
"synth_energy_drop": 0.3,
|
| 835 |
+
"synth_instrument_drop": 0.3,
|
| 836 |
+
"validate_every": 5000,
|
| 837 |
+
"retrieve_every": 10000,
|
| 838 |
+
"retrieve_pools": 0,
|
| 839 |
+
"seed": 1,
|
| 840 |
+
"contrast_weight": 0.0,
|
| 841 |
+
"contrast_k": 31,
|
| 842 |
+
"contrast_tau": 0.05,
|
| 843 |
+
"noise_rate": 0.5,
|
| 844 |
+
"noise_max": 12,
|
| 845 |
+
"noise_scatter": 0.35,
|
| 846 |
+
"noise_shape": 3.0,
|
| 847 |
+
"noise_real_rate": 0.5,
|
| 848 |
+
"synth_peak_drop": -1.0,
|
| 849 |
+
"synth_jitter": -1.0,
|
| 850 |
+
"noise_near": 0.0,
|
| 851 |
+
"noise_deltas": "inv/noise_deltas.json",
|
| 852 |
+
"init": null,
|
| 853 |
+
"max_steps_this_run": 0
|
| 854 |
+
}
|
| 855 |
+
}
|
| 856 |
+
],
|
| 857 |
+
"library_asset": {
|
| 858 |
+
"schema": "train-library/v1",
|
| 859 |
+
"fold": "train",
|
| 860 |
+
"spectra": 194119,
|
| 861 |
+
"molecules": 25046,
|
| 862 |
+
"bin": 0.01,
|
| 863 |
+
"prior_sample": 1024,
|
| 864 |
+
"prior_seed": 0,
|
| 865 |
+
"fragment_entries": 6765621,
|
| 866 |
+
"loss_entries": 6763777,
|
| 867 |
+
"source": "/workspace/data/train.jsonl",
|
| 868 |
+
"source_sha256": "de7f46e91f7b67eb5ca67468381abbdb20a8f739a0ae4b27070276798ecad0fc",
|
| 869 |
+
"structure_store": "/run-state/workspace/research/inv/real-train.npz",
|
| 870 |
+
"structure_store_sha256": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 871 |
+
"sha256": "22d1ddb216eef78d5040209ff6526371e5fcd8aac88e68a36823b6d5e73b3712",
|
| 872 |
+
"elapsed_seconds": 13.499361125999712,
|
| 873 |
+
"training_data": "MassSpecGym v1.5 train fold"
|
| 874 |
+
},
|
| 875 |
+
"ion_asset": {
|
| 876 |
+
"source": "inv/ion_error_table.json",
|
| 877 |
+
"sha256": "39aca3a714fd25a20cbaba4d46942764b52d730828a4b8205bf46ac5fc2a6225",
|
| 878 |
+
"fit": "MassSpecGym v1.5 train fold (194,119 spectra with [M+H]+ / [M+Na]+), analysis/ion_fit.py",
|
| 879 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 880 |
+
"window_da": 0.02,
|
| 881 |
+
"classes": {
|
| 882 |
+
"domain|Orbitrap": {
|
| 883 |
+
"median_ppm": 0.358,
|
| 884 |
+
"sigma_ppm": 1.51,
|
| 885 |
+
"background": 0.0204
|
| 886 |
+
},
|
| 887 |
+
"domain|QTOF": {
|
| 888 |
+
"median_ppm": 0.027,
|
| 889 |
+
"sigma_ppm": 4.348,
|
| 890 |
+
"background": 0.0869
|
| 891 |
+
},
|
| 892 |
+
"domain|other": {
|
| 893 |
+
"median_ppm": 0.027,
|
| 894 |
+
"sigma_ppm": 4.348,
|
| 895 |
+
"background": 0.0869
|
| 896 |
+
},
|
| 897 |
+
"H-no-energy|Orbitrap": {
|
| 898 |
+
"median_ppm": -0.943,
|
| 899 |
+
"sigma_ppm": 2.937,
|
| 900 |
+
"background": 0.1196
|
| 901 |
+
},
|
| 902 |
+
"H-no-energy|QTOF": {
|
| 903 |
+
"median_ppm": 0.665,
|
| 904 |
+
"sigma_ppm": 4.58,
|
| 905 |
+
"background": 0.08
|
| 906 |
+
},
|
| 907 |
+
"H-no-energy|other": {
|
| 908 |
+
"median_ppm": 0.851,
|
| 909 |
+
"sigma_ppm": 4.269,
|
| 910 |
+
"background": 0.1021
|
| 911 |
+
},
|
| 912 |
+
"Na|Orbitrap": {
|
| 913 |
+
"median_ppm": -0.872,
|
| 914 |
+
"sigma_ppm": 2.935,
|
| 915 |
+
"background": 0.1834
|
| 916 |
+
},
|
| 917 |
+
"Na|QTOF": {
|
| 918 |
+
"median_ppm": 1.119,
|
| 919 |
+
"sigma_ppm": 4.103,
|
| 920 |
+
"background": 0.0798
|
| 921 |
+
},
|
| 922 |
+
"Na|other": {
|
| 923 |
+
"median_ppm": 3.003,
|
| 924 |
+
"sigma_ppm": 2.969,
|
| 925 |
+
"background": 0.0319
|
| 926 |
+
}
|
| 927 |
+
},
|
| 928 |
+
"fallback": {
|
| 929 |
+
"domain|other": "domain|QTOF"
|
| 930 |
+
},
|
| 931 |
+
"train_fold_statistics": {
|
| 932 |
+
"domain|Orbitrap": {
|
| 933 |
+
"spectra": 64738,
|
| 934 |
+
"present": 0.5068,
|
| 935 |
+
"median_ppm": 0.176,
|
| 936 |
+
"sigma_ppm": 1.093,
|
| 937 |
+
"beyond_3_sigma": 0.0763,
|
| 938 |
+
"ml_median_ppm": 0.358,
|
| 939 |
+
"ml_sigma_ppm": 1.51,
|
| 940 |
+
"ml_background": 0.0204,
|
| 941 |
+
"ml_mean_log_density": 6.2307
|
| 942 |
+
},
|
| 943 |
+
"domain|QTOF": {
|
| 944 |
+
"spectra": 34603,
|
| 945 |
+
"present": 0.5111,
|
| 946 |
+
"median_ppm": 0.045,
|
| 947 |
+
"sigma_ppm": 3.847,
|
| 948 |
+
"beyond_3_sigma": 0.0914,
|
| 949 |
+
"ml_median_ppm": 0.027,
|
| 950 |
+
"ml_sigma_ppm": 4.348,
|
| 951 |
+
"ml_background": 0.0869,
|
| 952 |
+
"ml_mean_log_density": 4.9233
|
| 953 |
+
},
|
| 954 |
+
"domain|other": {
|
| 955 |
+
"spectra": 36,
|
| 956 |
+
"present": 0.8611,
|
| 957 |
+
"median_ppm": 2.185,
|
| 958 |
+
"sigma_ppm": 4.203,
|
| 959 |
+
"beyond_3_sigma": 0.0,
|
| 960 |
+
"ml_median_ppm": 2.789,
|
| 961 |
+
"ml_sigma_ppm": 3.688,
|
| 962 |
+
"ml_background": 0.0,
|
| 963 |
+
"ml_mean_log_density": 5.6271
|
| 964 |
+
},
|
| 965 |
+
"H-no-energy|Orbitrap": {
|
| 966 |
+
"spectra": 51704,
|
| 967 |
+
"present": 0.5479,
|
| 968 |
+
"median_ppm": -0.989,
|
| 969 |
+
"sigma_ppm": 2.647,
|
| 970 |
+
"beyond_3_sigma": 0.1156,
|
| 971 |
+
"ml_median_ppm": -0.943,
|
| 972 |
+
"ml_sigma_ppm": 2.937,
|
| 973 |
+
"ml_background": 0.1196,
|
| 974 |
+
"ml_mean_log_density": 5.0128
|
| 975 |
+
},
|
| 976 |
+
"H-no-energy|QTOF": {
|
| 977 |
+
"spectra": 11931,
|
| 978 |
+
"present": 0.626,
|
| 979 |
+
"median_ppm": 0.801,
|
| 980 |
+
"sigma_ppm": 4.239,
|
| 981 |
+
"beyond_3_sigma": 0.0754,
|
| 982 |
+
"ml_median_ppm": 0.665,
|
| 983 |
+
"ml_sigma_ppm": 4.58,
|
| 984 |
+
"ml_background": 0.08,
|
| 985 |
+
"ml_mean_log_density": 4.7319
|
| 986 |
+
},
|
| 987 |
+
"H-no-energy|other": {
|
| 988 |
+
"spectra": 3467,
|
| 989 |
+
"present": 0.67,
|
| 990 |
+
"median_ppm": 0.61,
|
| 991 |
+
"sigma_ppm": 4.033,
|
| 992 |
+
"beyond_3_sigma": 0.0895,
|
| 993 |
+
"ml_median_ppm": 0.851,
|
| 994 |
+
"ml_sigma_ppm": 4.269,
|
| 995 |
+
"ml_background": 0.1021,
|
| 996 |
+
"ml_mean_log_density": 4.7426
|
| 997 |
+
},
|
| 998 |
+
"Na|Orbitrap": {
|
| 999 |
+
"spectra": 24454,
|
| 1000 |
+
"present": 0.4954,
|
| 1001 |
+
"median_ppm": -0.875,
|
| 1002 |
+
"sigma_ppm": 2.797,
|
| 1003 |
+
"beyond_3_sigma": 0.1574,
|
| 1004 |
+
"ml_median_ppm": -0.872,
|
| 1005 |
+
"ml_sigma_ppm": 2.935,
|
| 1006 |
+
"ml_background": 0.1834,
|
| 1007 |
+
"ml_mean_log_density": 4.589
|
| 1008 |
+
},
|
| 1009 |
+
"Na|QTOF": {
|
| 1010 |
+
"spectra": 2361,
|
| 1011 |
+
"present": 0.8602,
|
| 1012 |
+
"median_ppm": 1.126,
|
| 1013 |
+
"sigma_ppm": 4.211,
|
| 1014 |
+
"beyond_3_sigma": 0.0551,
|
| 1015 |
+
"ml_median_ppm": 1.119,
|
| 1016 |
+
"ml_sigma_ppm": 4.103,
|
| 1017 |
+
"ml_background": 0.0798,
|
| 1018 |
+
"ml_mean_log_density": 4.5016
|
| 1019 |
+
},
|
| 1020 |
+
"Na|other": {
|
| 1021 |
+
"spectra": 825,
|
| 1022 |
+
"present": 0.9309,
|
| 1023 |
+
"median_ppm": 3.305,
|
| 1024 |
+
"sigma_ppm": 3.261,
|
| 1025 |
+
"beyond_3_sigma": 0.026,
|
| 1026 |
+
"ml_median_ppm": 3.003,
|
| 1027 |
+
"ml_sigma_ppm": 2.969,
|
| 1028 |
+
"ml_background": 0.0319,
|
| 1029 |
+
"ml_mean_log_density": 4.9698
|
| 1030 |
+
}
|
| 1031 |
+
}
|
| 1032 |
+
},
|
| 1033 |
+
"method": "native-glacier-all-conditions-forward-simulation+formula-transformer-inverse-fusion+train-library-neighbour-fusion+measured-intact-ion-term+cross-pool-consensus",
|
| 1034 |
+
"inference_runtime": "/opt/glacier/bin/python",
|
| 1035 |
+
"members": [
|
| 1036 |
+
{
|
| 1037 |
+
"source": "runs/B-all-b32/checkpoints/step-0020000-ema.ckpt",
|
| 1038 |
+
"sha256": "80ec4715663e505007412e3d89dbe6020cd145713840c15affaf82604fc5765c",
|
| 1039 |
+
"global_step": 20000,
|
| 1040 |
+
"weights": "ema",
|
| 1041 |
+
"subset": "all",
|
| 1042 |
+
"seed": 1,
|
| 1043 |
+
"elapsed_seconds": 5136.2172065590275,
|
| 1044 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 1045 |
+
"initialization": "random",
|
| 1046 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 1047 |
+
"synthetic": null
|
| 1048 |
+
},
|
| 1049 |
+
{
|
| 1050 |
+
"source": "runs/B-all-b32/checkpoints/step-0030000-ema.ckpt",
|
| 1051 |
+
"sha256": "0228e4fa0589333f02db8223e49d6ecd23cd100d1a6182ad268d9db4f8468798",
|
| 1052 |
+
"global_step": 30000,
|
| 1053 |
+
"weights": "ema",
|
| 1054 |
+
"subset": "all",
|
| 1055 |
+
"seed": 1,
|
| 1056 |
+
"elapsed_seconds": 8314.79353913304,
|
| 1057 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 1058 |
+
"initialization": "random",
|
| 1059 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 1060 |
+
"synthetic": null
|
| 1061 |
+
},
|
| 1062 |
+
{
|
| 1063 |
+
"source": "runs/B2-all-b32-seed2/checkpoints/step-0020000-ema.ckpt",
|
| 1064 |
+
"sha256": "ac3c85cdabfb5f68ca3ca506732f1f8e79fa6e9f3d5bf5fa574b6e1f3249312c",
|
| 1065 |
+
"global_step": 20000,
|
| 1066 |
+
"weights": "ema",
|
| 1067 |
+
"subset": "all",
|
| 1068 |
+
"seed": 2,
|
| 1069 |
+
"elapsed_seconds": 6945.18486677701,
|
| 1070 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 1071 |
+
"initialization": "random",
|
| 1072 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 1073 |
+
"synthetic": null
|
| 1074 |
+
},
|
| 1075 |
+
{
|
| 1076 |
+
"source": "runs/B2-all-b32-seed2/checkpoints/step-0030000-ema.ckpt",
|
| 1077 |
+
"sha256": "f11667b8ee56a15c82d26ab9052816ecc63f2081eaa6fd4ea82d38d1e2a36ce1",
|
| 1078 |
+
"global_step": 30000,
|
| 1079 |
+
"weights": "ema",
|
| 1080 |
+
"subset": "all",
|
| 1081 |
+
"seed": 2,
|
| 1082 |
+
"elapsed_seconds": 9298.063542745003,
|
| 1083 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 1084 |
+
"initialization": "random",
|
| 1085 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 1086 |
+
"synthetic": null
|
| 1087 |
+
},
|
| 1088 |
+
{
|
| 1089 |
+
"source": "runs/S2-B20k-synth/checkpoints/step-0030000-ema.ckpt",
|
| 1090 |
+
"sha256": "44742fa31f337e59b543d903018780560569c2e8e50a008ba008859c8440e3a2",
|
| 1091 |
+
"global_step": 30000,
|
| 1092 |
+
"weights": "ema",
|
| 1093 |
+
"subset": "all",
|
| 1094 |
+
"seed": 1,
|
| 1095 |
+
"elapsed_seconds": 8906.84206694903,
|
| 1096 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 1097 |
+
"initialization": "own-checkpoint:6c5a43fada335e5f4e9f8265ec6cfd54a8f317eb8d2100d96ea3731809005be2",
|
| 1098 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus (auxiliary intensity term)",
|
| 1099 |
+
"synthetic": {
|
| 1100 |
+
"manifest_sha256": "431454e702f8da3194684fc9a565135d29a38a407aaa31e9399d871360c6e962",
|
| 1101 |
+
"per_item": 1,
|
| 1102 |
+
"weight": 1.0,
|
| 1103 |
+
"schedule": "e2e",
|
| 1104 |
+
"instrument": "flag"
|
| 1105 |
+
}
|
| 1106 |
+
}
|
| 1107 |
+
]
|
| 1108 |
+
}
|
shared/package-files/0b/0b257defdfda2eed651ae468799ba3c865da5f9b1e998c87f12202905d332c67/consensus_subset.py
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Packaged consensus term on a SUBSET of the validation input, against a replay of the package on that subset.
|
| 2 |
+
|
| 3 |
+
consensus_subset.py --queries val-sub/queries.jsonl --rankings evals/replay/NAME-sub/rankings.jsonl
|
| 4 |
+
[--pred evals/fullfold/BASE/pred] [--build builds/NAME]
|
| 5 |
+
|
| 6 |
+
The term depends on the whole input set, so a replay on a subset cannot be compared with the full-fold run.
|
| 7 |
+
This check recomputes the term for the subset from the saved full-fold branch outputs (forward, inverse,
|
| 8 |
+
library, intact-ion of the base build; those do not depend on the other pools of the input) with the
|
| 9 |
+
packaged ``consensus.run`` and compares the label rank of every query with the replay's rankings.
|
| 10 |
+
Validation labels only evaluate.
|
| 11 |
+
"""
|
| 12 |
+
import argparse
|
| 13 |
+
import json
|
| 14 |
+
import pickle
|
| 15 |
+
import sys
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
|
| 18 |
+
import numpy as np
|
| 19 |
+
|
| 20 |
+
HERE = Path(__file__).resolve().parent
|
| 21 |
+
sys.path.insert(0, str(HERE.parent / 'analysis'))
|
| 22 |
+
sys.path.insert(0, str(HERE.parent / 'pkg'))
|
| 23 |
+
import consensus
|
| 24 |
+
import netprop
|
| 25 |
+
import scorelab
|
| 26 |
+
|
| 27 |
+
ROOT = Path('/workspace/research')
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def main():
|
| 31 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 32 |
+
p.add_argument('--queries', required=True)
|
| 33 |
+
p.add_argument('--rankings', required=True)
|
| 34 |
+
p.add_argument('--pred', default='evals/fullfold/5Ms-I9b+I13-L-ion/pred')
|
| 35 |
+
p.add_argument('--build', default='builds/5Ms-I9b+I13-L-ion-net')
|
| 36 |
+
args = p.parse_args()
|
| 37 |
+
import torch
|
| 38 |
+
config = json.load(open(ROOT / args.build / 'model_config.json'))
|
| 39 |
+
wanted = [json.loads(line)['query_id'] for line in open(ROOT / args.queries)]
|
| 40 |
+
queries, pools = netprop.load()
|
| 41 |
+
by_id = {q['query_id']: q for q in queries}
|
| 42 |
+
queries = [by_id[q] for q in wanted if q in by_id] # hand-built queries of the edge input have no label
|
| 43 |
+
ev = scorelab.Evaluator(queries, pools)
|
| 44 |
+
pred = {name: pickle.load(open(ROOT / args.pred / f'{name}.pkl', 'rb')) for name in ('distances', 'inverse', 'library', 'ion')}
|
| 45 |
+
base = netprop.released(queries, pools, pred, config)
|
| 46 |
+
store = np.load(ROOT / 'inv/pools-validation-input.npz')
|
| 47 |
+
slot = {pid: n for n, pid in enumerate(store['pool_id'])}
|
| 48 |
+
data = {'pool_id': store['pool_id'], 'pool_cand_start': store['pool_cand_start'], 'cand_fps': store['cand_fps'],
|
| 49 |
+
'query_pool': np.array([slot.get(q['candidate_pool_id'], -1) for q in queries], dtype=np.int32)}
|
| 50 |
+
terms = consensus.run(queries, pools, data, base, config['consensus'], torch.device('cuda' if torch.cuda.is_available() else 'cpu'),
|
| 51 |
+
lambda event, **values: print(event, json.dumps(values)))
|
| 52 |
+
weights = config['consensus']
|
| 53 |
+
fused = [b if (b is None or t is None) else b + (weights['weight_domain'] if dom else weights['weight_other']) * t
|
| 54 |
+
for b, t, dom in zip(base, terms, ev.domain)]
|
| 55 |
+
rank0, rank = ev.ranks(base, 1.0), ev.ranks(fused, 1.0)
|
| 56 |
+
replay = {r['query_id']: r['ranking'] for r in map(json.loads, open(ROOT / args.rankings))}
|
| 57 |
+
got = np.array([replay[q['query_id']].index(ev.ids[q['candidate_pool_id']][ev.target[i]]) for i, q in enumerate(queries)])
|
| 58 |
+
first = np.array([rows[0] for rows in ev.by_pool.values()])
|
| 59 |
+
d = (rank[first] == 0).astype(float) - (rank0[first] == 0).astype(float)
|
| 60 |
+
print(f'subset: {len(queries)} labelled queries, {len(first)} pools')
|
| 61 |
+
print(f'base (no term) Hit@1 {np.mean(rank0 == 0):.4f} Hit@5 {np.mean(rank0 < 5):.4f} Hit@20 {np.mean(rank0 < 20):.4f} macro {np.mean(rank0[first] == 0):.4f}')
|
| 62 |
+
print(f'lab, with term Hit@1 {np.mean(rank == 0):.4f} Hit@5 {np.mean(rank < 5):.4f} Hit@20 {np.mean(rank < 20):.4f} macro {np.mean(rank[first] == 0):.4f}'
|
| 63 |
+
f' pools +{int((d > 0).sum())} -{int((d < 0).sum())}')
|
| 64 |
+
print(f'replay Hit@1 {np.mean(got == 0):.4f} Hit@5 {np.mean(got < 5):.4f} Hit@20 {np.mean(got < 20):.4f} macro {np.mean(got[first] == 0):.4f}')
|
| 65 |
+
print(f'label rank: replay == lab for {int(np.sum(got == rank))} / {len(rank)} queries; top-1 status equal for {int(np.sum((got == 0) == (rank == 0)))}; '
|
| 66 |
+
f'largest rank difference {int(np.max(np.abs(got - rank)))}')
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
if __name__ == '__main__':
|
| 70 |
+
main()
|
shared/package-files/0b/0b2938300f3af759ecaf7b1bc27fa153b05d5eff63eaca867867c5359e8cdeb5/train.py
ADDED
|
@@ -0,0 +1,238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Train and atomically publish the runnable Fourier-DeepSets starter."""
|
| 3 |
+
|
| 4 |
+
import argparse
|
| 5 |
+
import json
|
| 6 |
+
import os
|
| 7 |
+
from pathlib import Path
|
| 8 |
+
import random
|
| 9 |
+
import shutil
|
| 10 |
+
import time
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
import torch
|
| 14 |
+
import torch.nn.functional as F
|
| 15 |
+
from torch.utils.data import DataLoader
|
| 16 |
+
|
| 17 |
+
from common import LabeledSpectra, compact_json, sha256
|
| 18 |
+
from model import DeepSetsFingerprint
|
| 19 |
+
from publication import publish_directory
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
def cosine_loss(prediction, target):
|
| 23 |
+
return 1 - F.cosine_similarity(prediction, target, dim=-1).mean()
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def evaluate(model, loader, device):
|
| 27 |
+
model.eval()
|
| 28 |
+
total, count = 0.0, 0
|
| 29 |
+
with torch.no_grad():
|
| 30 |
+
for spectra, targets in loader:
|
| 31 |
+
spectra = spectra.to(device, non_blocking=True)
|
| 32 |
+
targets = targets.to(device, non_blocking=True)
|
| 33 |
+
loss = cosine_loss(model(spectra), targets)
|
| 34 |
+
total += float(loss) * spectra.shape[0]
|
| 35 |
+
count += spectra.shape[0]
|
| 36 |
+
return total / count
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def atomic_torch_save(value, path: Path):
|
| 40 |
+
temporary = path.with_name(path.name + ".tmp")
|
| 41 |
+
torch.save(value, temporary)
|
| 42 |
+
os.replace(temporary, path)
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
def main():
|
| 46 |
+
parser = argparse.ArgumentParser()
|
| 47 |
+
parser.add_argument("--input-root", type=Path, default=Path("/workspace/data"))
|
| 48 |
+
parser.add_argument("--output-dir", type=Path, default=Path.cwd())
|
| 49 |
+
parser.add_argument("--epochs", type=int, default=50)
|
| 50 |
+
parser.add_argument("--batch-size", type=int, default=256)
|
| 51 |
+
parser.add_argument("--workers", type=int, default=8)
|
| 52 |
+
parser.add_argument("--learning-rate", type=float, default=3e-4)
|
| 53 |
+
parser.add_argument("--hidden-size", type=int, default=128)
|
| 54 |
+
parser.add_argument("--fingerprint-size", type=int, default=4096)
|
| 55 |
+
parser.add_argument("--layers-per-mlp", type=int, default=4)
|
| 56 |
+
parser.add_argument("--dropout", type=float, default=0.1)
|
| 57 |
+
parser.add_argument("--max-train-records", type=int)
|
| 58 |
+
parser.add_argument("--max-validation-records", type=int)
|
| 59 |
+
parser.add_argument("--seed", type=int, default=0)
|
| 60 |
+
parser.add_argument("--device", default="cuda" if torch.cuda.is_available() else "cpu")
|
| 61 |
+
parser.add_argument("--work-dir", type=Path, help="Optimizer checkpoints and logs, outside the submission (default: /workspace/research/<output name>-training)")
|
| 62 |
+
parser.add_argument("--resume", type=Path, help="Resume last.pt at its completed epoch")
|
| 63 |
+
parser.add_argument("--max-seconds", type=float, default=3600,
|
| 64 |
+
help="Cumulative fit budget, checked at epoch boundaries")
|
| 65 |
+
args = parser.parse_args()
|
| 66 |
+
if min(args.epochs, args.batch_size, args.max_seconds) <= 0 or args.workers < 0:
|
| 67 |
+
raise ValueError("epochs must be positive")
|
| 68 |
+
|
| 69 |
+
output = args.output_dir.resolve()
|
| 70 |
+
work = (args.work_dir or Path("/workspace/research") / (output.name + "-training")).resolve()
|
| 71 |
+
if work == output or work.is_relative_to(output):
|
| 72 |
+
raise ValueError("keep optimizer checkpoints outside the submission")
|
| 73 |
+
work.mkdir(parents=True, exist_ok=True)
|
| 74 |
+
started = time.monotonic()
|
| 75 |
+
random.seed(args.seed)
|
| 76 |
+
np.random.seed(args.seed)
|
| 77 |
+
torch.manual_seed(args.seed)
|
| 78 |
+
if torch.cuda.is_available():
|
| 79 |
+
torch.cuda.manual_seed_all(args.seed)
|
| 80 |
+
|
| 81 |
+
train_data = LabeledSpectra(
|
| 82 |
+
args.input_root / "train.jsonl", args.max_train_records, args.seed,
|
| 83 |
+
fingerprint_size=args.fingerprint_size,
|
| 84 |
+
)
|
| 85 |
+
validation_data = LabeledSpectra(
|
| 86 |
+
args.input_root / "validation.jsonl", args.max_validation_records, args.seed,
|
| 87 |
+
fingerprint_size=args.fingerprint_size,
|
| 88 |
+
)
|
| 89 |
+
loader_generator = torch.Generator().manual_seed(args.seed)
|
| 90 |
+
train_loader = DataLoader(
|
| 91 |
+
train_data, batch_size=args.batch_size, shuffle=True, generator=loader_generator,
|
| 92 |
+
num_workers=args.workers, pin_memory=args.device.startswith("cuda"),
|
| 93 |
+
persistent_workers=args.workers > 0,
|
| 94 |
+
)
|
| 95 |
+
validation_loader = DataLoader(
|
| 96 |
+
validation_data, batch_size=args.batch_size, shuffle=False,
|
| 97 |
+
num_workers=args.workers, pin_memory=args.device.startswith("cuda"),
|
| 98 |
+
persistent_workers=args.workers > 0,
|
| 99 |
+
)
|
| 100 |
+
config = {
|
| 101 |
+
"hidden_size": args.hidden_size,
|
| 102 |
+
"fingerprint_size": args.fingerprint_size,
|
| 103 |
+
"layers_per_mlp": args.layers_per_mlp,
|
| 104 |
+
"dropout": args.dropout,
|
| 105 |
+
"max_peaks": 60,
|
| 106 |
+
"mz_min": 10.0,
|
| 107 |
+
"mz_max": 1000.0,
|
| 108 |
+
"fingerprint_radius": 2,
|
| 109 |
+
}
|
| 110 |
+
device = torch.device(args.device)
|
| 111 |
+
model = DeepSetsFingerprint(
|
| 112 |
+
hidden_size=args.hidden_size,
|
| 113 |
+
fingerprint_size=args.fingerprint_size,
|
| 114 |
+
layers_per_mlp=args.layers_per_mlp,
|
| 115 |
+
dropout=args.dropout,
|
| 116 |
+
).to(device)
|
| 117 |
+
optimizer = torch.optim.Adam(model.parameters(), lr=args.learning_rate)
|
| 118 |
+
scaler = torch.cuda.amp.GradScaler(enabled=device.type == "cuda")
|
| 119 |
+
identity = {
|
| 120 |
+
"schema": "massspecgym-retrieval-fit/v1", "initialization": "random", "config": config,
|
| 121 |
+
"seed": args.seed, "batch_size": args.batch_size, "learning_rate": args.learning_rate,
|
| 122 |
+
"train_sha256": sha256(args.input_root / "train.jsonl"),
|
| 123 |
+
"validation_sha256": sha256(args.input_root / "validation.jsonl"),
|
| 124 |
+
"train_records": len(train_data), "validation_records": len(validation_data),
|
| 125 |
+
}
|
| 126 |
+
if (work / "recipe.json").exists() and (
|
| 127 |
+
not args.resume or json.loads((work / "recipe.json").read_text()) != identity
|
| 128 |
+
):
|
| 129 |
+
raise ValueError("use a fresh work directory or --resume with the same recipe")
|
| 130 |
+
(work / "recipe.json").write_text(compact_json(identity) + "\n")
|
| 131 |
+
best_loss, best_epoch, best_state = float("inf"), None, None
|
| 132 |
+
first_epoch, prior = 1, 0.0
|
| 133 |
+
if args.resume:
|
| 134 |
+
saved = torch.load(args.resume, map_location="cpu", weights_only=False)
|
| 135 |
+
if saved["identity"] != identity:
|
| 136 |
+
raise ValueError("resume data/model/seed/batch configuration changed")
|
| 137 |
+
model.load_state_dict(saved["model"])
|
| 138 |
+
optimizer.load_state_dict(saved["optimizer"])
|
| 139 |
+
scaler.load_state_dict(saved["scaler"])
|
| 140 |
+
best_state, best_epoch, best_loss = saved["best_state"], saved["best_epoch"], saved["best_loss"]
|
| 141 |
+
first_epoch, prior = saved["epoch"] + 1, saved["elapsed_seconds"]
|
| 142 |
+
random.setstate(saved["rng"]["python"])
|
| 143 |
+
np.random.set_state(saved["rng"]["numpy"])
|
| 144 |
+
torch.set_rng_state(saved["rng"]["torch"])
|
| 145 |
+
loader_generator.set_state(saved["rng"]["loader"])
|
| 146 |
+
if torch.cuda.is_available() and saved["rng"]["cuda"]:
|
| 147 |
+
torch.cuda.set_rng_state_all(saved["rng"]["cuda"])
|
| 148 |
+
if prior >= args.max_seconds:
|
| 149 |
+
raise ValueError("resume has already exhausted the cumulative training budget")
|
| 150 |
+
source = Path(__file__).resolve().parent
|
| 151 |
+
|
| 152 |
+
def publish_best():
|
| 153 |
+
summary = dict(identity, selected_epoch=best_epoch, best_validation_cosine_loss=best_loss,
|
| 154 |
+
elapsed_seconds=prior + time.monotonic() - started)
|
| 155 |
+
def build(stage):
|
| 156 |
+
for name in ("infer.sh", "predict.py", "model.py", "common.py", "train.py", "publication.py"):
|
| 157 |
+
shutil.copyfile(source / name, stage / name)
|
| 158 |
+
(stage / "infer.sh").chmod(0o755)
|
| 159 |
+
checkpoint = stage / "model.pt"
|
| 160 |
+
torch.save({"state_dict": best_state, "model_config": config}, checkpoint)
|
| 161 |
+
(stage / "model_config.json").write_text(compact_json(config) + "\n")
|
| 162 |
+
(stage / "training_summary.json").write_text(compact_json(summary) + "\n")
|
| 163 |
+
(stage / "README.md").write_text(
|
| 164 |
+
"# Trained Fourier-DeepSets retrieval model\n\n"
|
| 165 |
+
"Initialized from scratch on the provided train fold; selected on validation loss. "
|
| 166 |
+
"See training_summary.json for the data and recipe identity.\n")
|
| 167 |
+
manifest = {
|
| 168 |
+
"schema": "massspecgym-retrieval-model/v1",
|
| 169 |
+
"checkpoint": {"path": "model.pt", "sha256": sha256(checkpoint), "format": "pytorch"},
|
| 170 |
+
"model_config": "model_config.json",
|
| 171 |
+
"training_provenance": {"data": "MassSpecGym v1.5 train fold", "pretrained_assets": []},
|
| 172 |
+
}
|
| 173 |
+
(stage / "model_manifest.json").write_text(compact_json(manifest) + "\n")
|
| 174 |
+
publish_directory(output, build)
|
| 175 |
+
|
| 176 |
+
if best_state is not None:
|
| 177 |
+
publish_best()
|
| 178 |
+
for epoch in range(first_epoch, args.epochs + 1):
|
| 179 |
+
model.train()
|
| 180 |
+
running, seen = 0.0, 0
|
| 181 |
+
for spectra, targets in train_loader:
|
| 182 |
+
spectra = spectra.to(device, non_blocking=True)
|
| 183 |
+
targets = targets.to(device, non_blocking=True)
|
| 184 |
+
optimizer.zero_grad(set_to_none=True)
|
| 185 |
+
with torch.autocast(
|
| 186 |
+
device_type=device.type,
|
| 187 |
+
dtype=torch.float16 if device.type == "cuda" else torch.bfloat16,
|
| 188 |
+
enabled=device.type == "cuda",
|
| 189 |
+
):
|
| 190 |
+
loss = cosine_loss(model(spectra), targets)
|
| 191 |
+
if not torch.isfinite(loss):
|
| 192 |
+
raise FloatingPointError(
|
| 193 |
+
f"non-finite training loss at epoch {epoch}; "
|
| 194 |
+
"check the feature precision and input values"
|
| 195 |
+
)
|
| 196 |
+
scaler.scale(loss).backward()
|
| 197 |
+
scaler.step(optimizer)
|
| 198 |
+
scaler.update()
|
| 199 |
+
running += float(loss) * spectra.shape[0]
|
| 200 |
+
seen += spectra.shape[0]
|
| 201 |
+
validation_loss = evaluate(model, validation_loader, device)
|
| 202 |
+
if not np.isfinite(validation_loss):
|
| 203 |
+
raise FloatingPointError(
|
| 204 |
+
f"non-finite validation loss at epoch {epoch}"
|
| 205 |
+
)
|
| 206 |
+
print(compact_json({
|
| 207 |
+
"epoch": epoch,
|
| 208 |
+
"train_loss": running / seen,
|
| 209 |
+
"validation_loss": validation_loss,
|
| 210 |
+
}), flush=True)
|
| 211 |
+
if validation_loss < best_loss:
|
| 212 |
+
best_loss = validation_loss
|
| 213 |
+
best_epoch = epoch
|
| 214 |
+
best_state = {
|
| 215 |
+
name: value.detach().cpu().clone()
|
| 216 |
+
for name, value in model.state_dict().items()
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
publish_best()
|
| 220 |
+
elapsed = prior + time.monotonic() - started
|
| 221 |
+
atomic_torch_save({
|
| 222 |
+
"identity": identity, "epoch": epoch, "model": model.state_dict(),
|
| 223 |
+
"optimizer": optimizer.state_dict(), "scaler": scaler.state_dict(),
|
| 224 |
+
"best_state": best_state, "best_epoch": best_epoch, "best_loss": best_loss,
|
| 225 |
+
"elapsed_seconds": elapsed,
|
| 226 |
+
"rng": {"python": random.getstate(), "numpy": np.random.get_state(),
|
| 227 |
+
"torch": torch.get_rng_state(), "loader": loader_generator.get_state(),
|
| 228 |
+
"cuda": torch.cuda.get_rng_state_all() if torch.cuda.is_available() else []},
|
| 229 |
+
}, work / "last.pt")
|
| 230 |
+
with (work / "metrics.jsonl").open("a") as stream:
|
| 231 |
+
stream.write(compact_json({"epoch": epoch, "train_loss": running / seen,
|
| 232 |
+
"validation_loss": validation_loss, "elapsed_seconds": elapsed}) + "\n")
|
| 233 |
+
if elapsed >= args.max_seconds:
|
| 234 |
+
break
|
| 235 |
+
|
| 236 |
+
|
| 237 |
+
if __name__ == "__main__":
|
| 238 |
+
main()
|
shared/package-files/0b/0b543c06ef5862083df44fe801d381850637714742e2f1a3807c4424e0201cdf/e74-na-as-h.sh
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
# E74: [M+Na]+ spectra read as protonated by the inverse networks (view alone and mixed with the release view)
|
| 3 |
+
cd /workspace/research
|
| 4 |
+
export CUDA_MPS_PIPE_DIRECTORY=/tmp/mps GLACIER_SOURCE=/workspace/research/ms-pred/src
|
| 5 |
+
for w in 0.0 1.0 0.25 0.5; do
|
| 6 |
+
taskset -c 11-24 /opt/glacier/bin/python allcond/inv/eval_score.py evals/inv-score/e74-na-as-h-w$w.pkl runs/I16-ff512x6-real08-corpus2+train3-noise05/step-0050000-ema.pt runs/I18-ff512x6-real08-corpus2+train3-noise05-real025/step-0050000-ema.pt runs/I19-ff512x6-real08-corpus2+train3-noise05-jit08/step-0050000-ema.pt runs/I20-ff512x6-real08-corpus2+train3-noise05-near067/step-0050000-ema.pt runs/I21-ff512x6-real08-corpus2+train3-noise05-real05/step-0050000-ema.pt --pools inv/recur/pkg-hyb-p48.npz --mix inv/recur/na-as-h-hyb-p48.npz --mix-weight $w --max-peaks 48 > logs/e74-na-as-h-w$w.log 2>&1
|
| 7 |
+
done
|
shared/package-files/0b/0b721b94afb29ec79be5ec0608f2cc2328babf9a1e904f7ce7ca02e50cf8b68e/fuselab.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Fast pool-level fusion laboratory on cached validation distances (development only).
|
| 2 |
+
|
| 3 |
+
Loads once: simulator distances (mean over scorelab member caches for one variant), any number
|
| 4 |
+
of inverse-branch distance pickles, validation targets (evaluation only) and the candidate-id
|
| 5 |
+
tie order of the official ranking rule. Scores are combined per pool as matrices
|
| 6 |
+
[spectra, candidates]; a pool-level rule returns one fused vector per pool (rank of the target
|
| 7 |
+
is then shared by all its queries) or one vector per spectrum.
|
| 8 |
+
"""
|
| 9 |
+
import hashlib
|
| 10 |
+
import json
|
| 11 |
+
import pickle
|
| 12 |
+
from pathlib import Path
|
| 13 |
+
|
| 14 |
+
import numpy as np
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
class Lab:
|
| 18 |
+
def __init__(self, root, variant, members, cache='/tmp/fuselab-cache.pkl'):
|
| 19 |
+
root = Path(root)
|
| 20 |
+
key = hashlib.sha256((str(root) + variant + '|'.join(members)).encode()).hexdigest()[:12]
|
| 21 |
+
cache = Path(str(cache).replace('.pkl', f'-{key}.pkl'))
|
| 22 |
+
if cache.exists():
|
| 23 |
+
self.__dict__.update(pickle.load(cache.open('rb')))
|
| 24 |
+
return
|
| 25 |
+
queries = [json.loads(line) for line in (root / 'queries.jsonl').open()]
|
| 26 |
+
labels = {}
|
| 27 |
+
for line in open('/workspace/data/validation.jsonl'):
|
| 28 |
+
row = json.loads(line)
|
| 29 |
+
labels[row['query_id']] = hashlib.sha256(row['target_smiles'].encode()).hexdigest()
|
| 30 |
+
tie, index = {}, {}
|
| 31 |
+
for line in (root / 'candidate_pools.jsonl').open():
|
| 32 |
+
pool = json.loads(line)
|
| 33 |
+
ids = np.array([c['candidate_id'] for c in pool['candidates']])
|
| 34 |
+
tie[pool['candidate_pool_id']] = np.argsort(np.argsort(ids))
|
| 35 |
+
index[pool['candidate_pool_id']] = {c: n for n, c in enumerate(ids)}
|
| 36 |
+
self.target = np.array([index[q['candidate_pool_id']][labels[q['query_id']]] for q in queries])
|
| 37 |
+
self.pool_ids = list(dict.fromkeys(q['candidate_pool_id'] for q in queries))
|
| 38 |
+
slot = {pid: n for n, pid in enumerate(self.pool_ids)}
|
| 39 |
+
self.query_pool = np.array([slot[q['candidate_pool_id']] for q in queries])
|
| 40 |
+
self.tie = [tie[pid] for pid in self.pool_ids]
|
| 41 |
+
self.members = [np.flatnonzero(self.query_pool == s) for s in range(len(self.pool_ids))]
|
| 42 |
+
self.adduct = np.array([q['adduct'] for q in queries])
|
| 43 |
+
self.has_ce = np.array([q['collision_energy'] is not None for q in queries])
|
| 44 |
+
self.instrument = np.array([q['instrument_type'] for q in queries])
|
| 45 |
+
self.mz = np.array([q['precursor_mz'] for q in queries])
|
| 46 |
+
self.peaks = np.array([len(q['mzs']) for q in queries])
|
| 47 |
+
self.domain = (self.adduct == '[M+H]+') & self.has_ce
|
| 48 |
+
dist = []
|
| 49 |
+
for spec in members:
|
| 50 |
+
results = pickle.load(open(spec.split('=', 1)[1], 'rb'))
|
| 51 |
+
first = results[next(iter(results))]
|
| 52 |
+
dist.append([d if d is not None else f for d, f in zip(results[variant], first)])
|
| 53 |
+
self.sim = [None if any(m[i] is None for m in dist) else np.mean([m[i] for m in dist], axis=0)
|
| 54 |
+
for i in range(len(queries))]
|
| 55 |
+
pickle.dump(self.__dict__, cache.open('wb'))
|
| 56 |
+
|
| 57 |
+
def setup(self):
|
| 58 |
+
rng = np.random.default_rng(0)
|
| 59 |
+
self.boot = rng.integers(0, len(self.members), size=(1000, len(self.members)))
|
| 60 |
+
self.sizes = np.array([len(m) for m in self.members], dtype=float)
|
| 61 |
+
self.target_pool = np.array([self.target[m[0]] for m in self.members])
|
| 62 |
+
return self
|
| 63 |
+
|
| 64 |
+
def matrix(self, per_query, s, fill=1.0):
|
| 65 |
+
"""[spectra, candidates] matrix of one pool; missing rows are filled with ``fill``."""
|
| 66 |
+
rows = [per_query[i] for i in self.members[s]]
|
| 67 |
+
width = len(self.tie[s])
|
| 68 |
+
return np.stack([np.full(width, fill) if r is None else np.asarray(r, dtype=np.float64) for r in rows])
|
| 69 |
+
|
| 70 |
+
def rank(self, s, vector):
|
| 71 |
+
order = np.lexsort((self.tie[s], vector))
|
| 72 |
+
return int(np.where(order == self.target_pool[s])[0][0])
|
| 73 |
+
|
| 74 |
+
def pool_rule(self, rule):
|
| 75 |
+
"""rule(s) -> fused vector [candidates]; returns the target rank per query."""
|
| 76 |
+
out = np.zeros(len(self.query_pool), dtype=np.int64)
|
| 77 |
+
for s, members in enumerate(self.members):
|
| 78 |
+
out[members] = self.rank(s, rule(s))
|
| 79 |
+
return out
|
| 80 |
+
|
| 81 |
+
def query_rule(self, rule):
|
| 82 |
+
"""rule(s) -> matrix [spectra, candidates]; returns the target rank per query."""
|
| 83 |
+
out = np.zeros(len(self.query_pool), dtype=np.int64)
|
| 84 |
+
for s, members in enumerate(self.members):
|
| 85 |
+
m = rule(s)
|
| 86 |
+
for n, i in enumerate(members):
|
| 87 |
+
out[i] = self.rank(s, m[n])
|
| 88 |
+
return out
|
| 89 |
+
|
| 90 |
+
def paired(self, hit, base):
|
| 91 |
+
a = np.bincount(self.query_pool, weights=hit.astype(float), minlength=len(self.members))
|
| 92 |
+
b = np.bincount(self.query_pool, weights=base.astype(float), minlength=len(self.members))
|
| 93 |
+
n = self.sizes[self.boot].sum(1)
|
| 94 |
+
diff = (a[self.boot].sum(1) - b[self.boot].sum(1)) / n
|
| 95 |
+
return float(np.percentile(diff, 2.5)), float(np.percentile(diff, 97.5))
|
| 96 |
+
|
| 97 |
+
def line(self, name, rank, base=None):
|
| 98 |
+
hit = rank == 0
|
| 99 |
+
macro = np.mean([hit[m].mean() for m in self.members])
|
| 100 |
+
text = (f'{name:42s} all={hit.mean():.4f} dom={hit[self.domain].mean():.4f} non={hit[~self.domain].mean():.4f} '
|
| 101 |
+
f'h5={np.mean(rank < 5):.4f} h20={np.mean(rank < 20):.4f} macro={macro:.4f}')
|
| 102 |
+
if base is not None:
|
| 103 |
+
lo, hi = self.paired(hit, base == 0)
|
| 104 |
+
text += f' | {hit.mean() - (base == 0).mean():+.4f} [{lo:+.4f},{hi:+.4f}]'
|
| 105 |
+
return text
|
shared/package-files/0b/0be5bef1b6f13ac83bf2b7f4e0e46ef560c4abe029983b41a2a3f426fbc257d8/cycle.py
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Cycle term: the inverse networks read the simulated spectrum of every candidate (lab, E66)
|
| 2 |
+
|
| 3 |
+
cycle.py prepare --out inv/cycle/val.npz [--members evals/B30k-full/pred,evals/B2-30k-full/pred] [--floor 0.02] [--workers 5]
|
| 4 |
+
cycle.py score --store inv/cycle/val.npz [--build builds/5Ms-I9b+I13-L-ion-net] [--pred evals/fullfold/5Ms-I9b+I13-L-ion/pred]
|
| 5 |
+
[--lams 0.1,0.25,0.5,1] [--save evals/cycle/terms.pkl]
|
| 6 |
+
|
| 7 |
+
Hypothesis: the released inverse branch compares the fingerprint the networks predict from the
|
| 8 |
+
measured spectra with the candidate's true bits. Many bits cannot be read from a spectrum at all;
|
| 9 |
+
for those the comparison rewards the candidate that agrees with the formula-only expectation. If
|
| 10 |
+
the same networks also read the candidate's *simulated* spectrum (the networks were trained on
|
| 11 |
+
spectra rendered by the same simulators, E60), the two predictions can be compared directly: bits
|
| 12 |
+
that no spectrum reveals drop out, and the comparison is a learned distance between the measured
|
| 13 |
+
and the simulated spectrum.
|
| 14 |
+
|
| 15 |
+
``prepare`` annotates the saved full-fold simulations (mean of the listed members, as the training
|
| 16 |
+
rows of E60) with the subformulae of each candidate's own formula. ``score`` runs the released
|
| 17 |
+
inverse pair on them and scores several comparisons alone and inside the release. Labels evaluate
|
| 18 |
+
only; nothing is fitted.
|
| 19 |
+
"""
|
| 20 |
+
import argparse
|
| 21 |
+
import json
|
| 22 |
+
import multiprocessing
|
| 23 |
+
import os
|
| 24 |
+
import pickle
|
| 25 |
+
import sys
|
| 26 |
+
import time
|
| 27 |
+
from pathlib import Path
|
| 28 |
+
|
| 29 |
+
import numpy as np
|
| 30 |
+
|
| 31 |
+
HERE = Path(__file__).resolve().parent
|
| 32 |
+
sys.path.insert(0, str(HERE))
|
| 33 |
+
sys.path.insert(0, str(HERE.parent / 'pkg'))
|
| 34 |
+
sys.path.insert(0, str(HERE.parent / 'inv'))
|
| 35 |
+
ROOT = Path('/workspace/research')
|
| 36 |
+
STATE = {}
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def annotate_chunk(job):
|
| 40 |
+
import inverse
|
| 41 |
+
import invrun
|
| 42 |
+
from selfsim import merged_spectrum
|
| 43 |
+
low, high = job
|
| 44 |
+
if 'masses' not in STATE:
|
| 45 |
+
STATE['masses'] = [np.load(ROOT / m / 'masses.npy', mmap_mode='r') for m in STATE['members']]
|
| 46 |
+
STATE['intens'] = [np.load(ROOT / m / 'intens.npy', mmap_mode='r') for m in STATE['members']]
|
| 47 |
+
tasks, roots, adduct, floor = STATE['tasks'], STATE['roots'], STATE['adduct'], STATE['floor']
|
| 48 |
+
tables, out = {}, []
|
| 49 |
+
for n in range(low, high):
|
| 50 |
+
task = int(tasks[n])
|
| 51 |
+
formula = roots[n]
|
| 52 |
+
key = formula.tobytes()
|
| 53 |
+
table = tables.get(key)
|
| 54 |
+
if table is None:
|
| 55 |
+
if len(tables) > 64:
|
| 56 |
+
tables.clear()
|
| 57 |
+
table = tables[key] = inverse.SubformulaTable(formula)
|
| 58 |
+
masses = np.stack([np.asarray(m[0, task]) for m in STATE['masses']])
|
| 59 |
+
intens = np.stack([np.asarray(m[0, task]).astype(np.float32) for m in STATE['intens']])
|
| 60 |
+
mz, inten = merged_spectrum(masses, intens)
|
| 61 |
+
cut = inten >= floor
|
| 62 |
+
peaks, kept = inverse.annotate(table, mz[cut], inten[cut], inverse.ADDUCTS[int(adduct[n])], invrun.PPM, invrun.FLOOR)
|
| 63 |
+
out.append((peaks, kept))
|
| 64 |
+
return out
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
def prepare(args):
|
| 68 |
+
import infer
|
| 69 |
+
import inverse
|
| 70 |
+
import netprop
|
| 71 |
+
sys.path.insert(0, os.environ.get('GLACIER_SOURCE', '/workspace/research/ms-pred/src'))
|
| 72 |
+
from ms_pred import common
|
| 73 |
+
started = time.monotonic()
|
| 74 |
+
queries, pools = netprop.load(None)
|
| 75 |
+
inst = lambda name: common.instrument2onehot_pos.get(name or 'Unknown', common.instrument2onehot_pos['Unknown'])
|
| 76 |
+
plan = infer.Plan(queries, pools, args.workers, inst, set(common.ion2onehot_pos))
|
| 77 |
+
data = np.load(ROOT / 'inv/pools-validation-input.npz')
|
| 78 |
+
pool_id, fstart, cstart = data['pool_id'], data['pool_formula_start'], data['pool_cand_start']
|
| 79 |
+
formula, which = data['formula'], data['cand_formula']
|
| 80 |
+
q_adduct, q_instrument, q_energy = data['adduct'], data['instrument'], data['energy']
|
| 81 |
+
assert list(data['query_id']) == [q['query_id'] for q in queries]
|
| 82 |
+
slot = {str(pid): n for n, pid in enumerate(pool_id)}
|
| 83 |
+
members = args.members.split(',')
|
| 84 |
+
done = np.all([np.load(ROOT / m / 'done.npy') for m in members], axis=0)
|
| 85 |
+
total = len(plan.task_mol)
|
| 86 |
+
assert len(done) == total
|
| 87 |
+
root = np.zeros((total, formula.shape[1]), np.int16)
|
| 88 |
+
have = np.zeros(total, bool)
|
| 89 |
+
adduct = np.zeros(total, np.uint8)
|
| 90 |
+
instrument = np.zeros(total, np.uint8)
|
| 91 |
+
energy = np.full(total, np.nan, np.float32)
|
| 92 |
+
g_pool, g_tasks, g_queries = [], [], []
|
| 93 |
+
for (pid, _, _, _), group in plan.groups.items():
|
| 94 |
+
s = slot[pid]
|
| 95 |
+
tasks = group['tasks']
|
| 96 |
+
assert len(tasks) == cstart[s + 1] - cstart[s]
|
| 97 |
+
w = which[cstart[s]:cstart[s + 1]]
|
| 98 |
+
ok = (tasks >= 0) & (w >= 0)
|
| 99 |
+
q0 = group['queries'][0]
|
| 100 |
+
new = ok.copy()
|
| 101 |
+
new[ok] = ~have[tasks[ok]]
|
| 102 |
+
root[tasks[new]] = formula[fstart[s] + w[new]]
|
| 103 |
+
adduct[tasks[new]], instrument[tasks[new]], energy[tasks[new]] = q_adduct[q0], q_instrument[q0], q_energy[q0]
|
| 104 |
+
have[tasks[new]] = True
|
| 105 |
+
g_pool.append(s)
|
| 106 |
+
g_tasks.append(np.where(ok, tasks, -1))
|
| 107 |
+
g_queries.append(np.asarray(group['queries'], dtype=np.int64))
|
| 108 |
+
rows = np.flatnonzero(have & done)
|
| 109 |
+
print(f'plan: {len(plan.groups)} groups, {total} simulations, {len(rows)} with a formula table ({time.monotonic() - started:.0f} s)', flush=True)
|
| 110 |
+
STATE.update(members=members, tasks=rows, roots=root[rows], adduct=adduct[rows], floor=args.floor)
|
| 111 |
+
jobs = [(i, min(i + 4000, len(rows))) for i in range(0, len(rows), 4000)]
|
| 112 |
+
with multiprocessing.get_context('fork').Pool(args.workers) as pool:
|
| 113 |
+
got = [g for part in pool.imap(annotate_chunk, jobs, chunksize=1) for g in part]
|
| 114 |
+
counts = np.array([len(g[1]) for g in got], dtype=np.int64)
|
| 115 |
+
row_of_task = np.full(total, -1, np.int64)
|
| 116 |
+
row_of_task[rows] = np.arange(len(rows))
|
| 117 |
+
out = ROOT / args.out
|
| 118 |
+
out.parent.mkdir(parents=True, exist_ok=True)
|
| 119 |
+
np.savez(out, task=rows, row_of_task=row_of_task, root=root[rows], offset=np.concatenate([[0], np.cumsum(counts)]),
|
| 120 |
+
peaks=np.concatenate([g[0] for g in got]).astype(np.uint8), inten=np.concatenate([g[1] for g in got]).astype(np.float32),
|
| 121 |
+
adduct=adduct[rows], instrument=instrument[rows], energy=energy[rows],
|
| 122 |
+
group_pool=np.array(g_pool, dtype=np.int64), group_start=np.concatenate([[0], np.cumsum([len(t) for t in g_tasks])]),
|
| 123 |
+
group_tasks=np.concatenate(g_tasks), group_qstart=np.concatenate([[0], np.cumsum([len(q) for q in g_queries])]),
|
| 124 |
+
group_queries=np.concatenate(g_queries))
|
| 125 |
+
report = {'members': members, 'floor': args.floor, 'simulations': int(total), 'rows': int(len(rows)), 'without_peak': int((counts == 0).sum()),
|
| 126 |
+
'mean_annotated_peaks': float(counts.mean()), 'seconds': time.monotonic() - started}
|
| 127 |
+
Path(str(out).replace('.npz', '.manifest.json')).write_text(json.dumps(report, indent=1) + '\n')
|
| 128 |
+
print(json.dumps(report), flush=True)
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
def score(args):
|
| 132 |
+
import torch
|
| 133 |
+
import inverse
|
| 134 |
+
import invrun
|
| 135 |
+
import netprop
|
| 136 |
+
import scorelab
|
| 137 |
+
device = torch.device('cuda')
|
| 138 |
+
started = time.monotonic()
|
| 139 |
+
queries, pools = netprop.load(None)
|
| 140 |
+
ev = scorelab.Evaluator(queries, pools)
|
| 141 |
+
config = json.load(open(ROOT / args.build / 'model_config.json'))
|
| 142 |
+
pred = {name: pickle.load(open(ROOT / args.pred / f'{name}.pkl', 'rb')) for name in ('distances', 'inverse', 'library', 'ion')}
|
| 143 |
+
base = netprop.released(queries, pools, pred, config)
|
| 144 |
+
data = dict(np.load(ROOT / 'inv/pools-validation-input.npz'))
|
| 145 |
+
saved = torch.load(ROOT / args.build / 'model.pt', map_location='cpu', weights_only=False)
|
| 146 |
+
models = [invrun.build_model(member, device) for member in saved['inverse']]
|
| 147 |
+
del saved
|
| 148 |
+
store = invrun.PoolStore(data, device)
|
| 149 |
+
cyc = dict(np.load(ROOT / args.store))
|
| 150 |
+
max_peaks = inverse.MAX_PEAKS
|
| 151 |
+
counts = np.diff(cyc['offset'])
|
| 152 |
+
row_of_task = cyc['row_of_task']
|
| 153 |
+
c_offset, c_peaks, c_inten = cyc['offset'], cyc['peaks'], cyc['inten']
|
| 154 |
+
c_root = torch.from_numpy(cyc['root'].astype(np.int16))
|
| 155 |
+
c_adduct, c_instrument, c_energy = (torch.from_numpy(cyc[k].astype(np.int64) if k != 'energy' else cyc[k]) for k in ('adduct', 'instrument', 'energy'))
|
| 156 |
+
groups_of = {}
|
| 157 |
+
for g, s in enumerate(cyc['group_pool']):
|
| 158 |
+
groups_of.setdefault(int(s), []).append(g)
|
| 159 |
+
g_start, g_tasks, g_qstart, g_queries = cyc['group_start'], cyc['group_tasks'], cyc['group_qstart'], cyc['group_queries']
|
| 160 |
+
|
| 161 |
+
@torch.no_grad()
|
| 162 |
+
def simulated(rows, batch=4096):
|
| 163 |
+
"""Mean bit probabilities of the models for the annotated simulation rows ``rows`` (sorted unique)."""
|
| 164 |
+
out = torch.zeros((len(rows), inverse.FP_BITS), dtype=torch.float32, device=device)
|
| 165 |
+
for start in range(0, len(rows), batch):
|
| 166 |
+
part = rows[start:start + batch]
|
| 167 |
+
n = len(part)
|
| 168 |
+
peaks = np.zeros((n, max_peaks, c_peaks.shape[1]), np.uint8)
|
| 169 |
+
inten = np.zeros((n, max_peaks), np.float32)
|
| 170 |
+
for j, r in enumerate(part):
|
| 171 |
+
k = min(int(counts[r]), max_peaks)
|
| 172 |
+
peaks[j, :k] = c_peaks[c_offset[r]:c_offset[r] + k]
|
| 173 |
+
inten[j, :k] = c_inten[c_offset[r]:c_offset[r] + k]
|
| 174 |
+
count = torch.from_numpy(np.minimum(counts[part], max_peaks)).to(device)
|
| 175 |
+
mask = torch.arange(max_peaks, device=device).unsqueeze(0) < count.unsqueeze(1)
|
| 176 |
+
index = torch.from_numpy(part)
|
| 177 |
+
with torch.autocast('cuda', dtype=torch.bfloat16):
|
| 178 |
+
for model in models:
|
| 179 |
+
y = model(c_root[index].to(device).long(), torch.from_numpy(peaks).to(device).long(), torch.from_numpy(inten).to(device), mask,
|
| 180 |
+
c_adduct[index].to(device), c_instrument[index].to(device), c_energy[index].to(device))
|
| 181 |
+
out[start:start + n] += torch.sigmoid(y.float()) / len(models)
|
| 182 |
+
return out
|
| 183 |
+
|
| 184 |
+
def cosine(a, b):
|
| 185 |
+
return 1.0 - (a * b).sum(-1) / ((a * a).sum(-1).sqrt() * (b * b).sum(-1).sqrt()).clamp_min(1e-9)
|
| 186 |
+
|
| 187 |
+
names = ['inv', 'cycA', 'cycA1', 'cycG', 'cycC', 'cycD', 'cycK', 'cycS']
|
| 188 |
+
terms = {name: [None] * len(queries) for name in names}
|
| 189 |
+
covered = 0
|
| 190 |
+
for number, group in enumerate(store.groups(None, 2000)):
|
| 191 |
+
low, high = int(store.pair_start[group[0]]), int(store.pair_start[group[-1] + 1])
|
| 192 |
+
logits = [store.logits(model, low, high, batch=2048) for model in models]
|
| 193 |
+
blank = [store.logits(model, low, high, batch=2048, blank=True) for model in models]
|
| 194 |
+
need = np.unique(np.concatenate([g_tasks[g_start[g]:g_start[g + 1]] for s in group for g in groups_of.get(s, [])] + [np.zeros(0, np.int64)]))
|
| 195 |
+
need = need[need >= 0]
|
| 196 |
+
rows = np.unique(row_of_task[need])
|
| 197 |
+
rows = rows[rows >= 0]
|
| 198 |
+
psim_all = simulated(rows)
|
| 199 |
+
for s in group:
|
| 200 |
+
members = store.members[s]
|
| 201 |
+
nq, nf = len(members), int(store.formula_start[s + 1] - store.formula_start[s])
|
| 202 |
+
if nq == 0 or nf == 0:
|
| 203 |
+
continue
|
| 204 |
+
span = slice(int(store.pair_start[s]) - low, int(store.pair_start[s + 1]) - low)
|
| 205 |
+
per_query = torch.stack([torch.sigmoid(x[span].view(nq, nf, -1)) for x in logits]).mean(0) # [nq, nf, bits]
|
| 206 |
+
pobs = per_query.mean(0)
|
| 207 |
+
pblank = torch.stack([torch.sigmoid(x[span].view(nq, nf, -1)).mean(0) for x in blank]).mean(0)
|
| 208 |
+
cs = slice(int(store.cand_start[s]), int(store.cand_start[s + 1]))
|
| 209 |
+
fidx = store.cand_formula[cs]
|
| 210 |
+
bits = inverse.unpack_bits(store.cand_fps[cs]).float()
|
| 211 |
+
ok = fidx >= 0
|
| 212 |
+
fsafe = fidx.clamp_min(0)
|
| 213 |
+
ncand = len(fidx)
|
| 214 |
+
position = {int(q): n for n, q in enumerate(members)}
|
| 215 |
+
psim = torch.zeros((ncand, inverse.FP_BITS), device=device)
|
| 216 |
+
weight = torch.zeros(ncand, device=device)
|
| 217 |
+
d_group = torch.zeros(ncand, device=device)
|
| 218 |
+
for g in groups_of.get(s, []):
|
| 219 |
+
tasks = g_tasks[g_start[g]:g_start[g + 1]]
|
| 220 |
+
r = np.where(tasks >= 0, row_of_task[np.maximum(tasks, 0)], -1)
|
| 221 |
+
good = torch.from_numpy(r >= 0).to(device)
|
| 222 |
+
where = torch.from_numpy(np.searchsorted(rows, np.maximum(r, 0))).to(device).clamp_max(max(len(rows) - 1, 0))
|
| 223 |
+
part = psim_all[where] * good[:, None] if len(rows) else torch.zeros((ncand, inverse.FP_BITS), device=device)
|
| 224 |
+
gq = [position[int(q)] for q in g_queries[g_qstart[g]:g_qstart[g + 1]] if int(q) in position]
|
| 225 |
+
share = len(gq) / nq
|
| 226 |
+
psim += share * part
|
| 227 |
+
weight += share * good
|
| 228 |
+
pg = per_query[gq].mean(0)[fsafe]
|
| 229 |
+
d_group += share * torch.where(good, cosine(pg ** 0.7, part ** 0.7), torch.ones_like(weight))
|
| 230 |
+
seen = weight > 0
|
| 231 |
+
psim = psim / weight.clamp_min(1e-9)[:, None]
|
| 232 |
+
po, pb = pobs[fsafe], pblank[fsafe]
|
| 233 |
+
out = {
|
| 234 |
+
'inv': cosine(po ** 0.7, bits),
|
| 235 |
+
'cycA': cosine(po ** 0.7, psim ** 0.7),
|
| 236 |
+
'cycA1': cosine(po, psim),
|
| 237 |
+
'cycG': d_group,
|
| 238 |
+
'cycC': cosine(po - pb, psim - pb),
|
| 239 |
+
'cycK': (psim * (torch.log(psim.clamp_min(1e-4)) - torch.log(po.clamp_min(1e-4)))
|
| 240 |
+
+ (1 - psim) * (torch.log((1 - psim).clamp_min(1e-4)) - torch.log((1 - po).clamp_min(1e-4)))).mean(-1) * 10.0,
|
| 241 |
+
'cycS': cosine(po ** 0.7, 0.5 * (psim ** 0.7 + bits)),
|
| 242 |
+
}
|
| 243 |
+
rel = 1.0 - (bits - psim).abs()
|
| 244 |
+
out['cycD'] = 1.0 - (rel * po ** 0.7 * bits).sum(-1) / ((rel * po ** 1.4).sum(-1).sqrt() * (rel * bits).sum(-1).sqrt()).clamp_min(1e-9)
|
| 245 |
+
covered += int((seen & ok).sum())
|
| 246 |
+
for name, value in out.items():
|
| 247 |
+
usable = ok if name == 'inv' else (ok & seen)
|
| 248 |
+
worst = float(value[usable].max()) if bool(usable.any()) else 1.0
|
| 249 |
+
value = torch.where(usable, value, torch.full_like(value, worst)).cpu().numpy().astype(np.float64)
|
| 250 |
+
for q in members:
|
| 251 |
+
terms[name][int(q)] = value
|
| 252 |
+
del logits, blank, psim_all
|
| 253 |
+
if number % 40 == 0:
|
| 254 |
+
print(f' run {number} {time.monotonic() - started:.0f} s', flush=True)
|
| 255 |
+
print(f'terms in {time.monotonic() - started:.0f} s; candidates with a simulated prediction {covered}', flush=True)
|
| 256 |
+
if args.save:
|
| 257 |
+
(ROOT / args.save).parent.mkdir(parents=True, exist_ok=True)
|
| 258 |
+
pickle.dump(terms, open(ROOT / args.save, 'wb'))
|
| 259 |
+
evaluate(args, queries, ev, base, terms, names)
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
def evaluate(args, queries, ev, base, terms, names):
|
| 263 |
+
released_term = pickle.load(open(ROOT / args.released_term, 'rb'))['term']
|
| 264 |
+
released_term = released_term[next(iter(released_term))]
|
| 265 |
+
net = [b if (b is None or t is None) else b + t for b, t in zip(base, released_term)]
|
| 266 |
+
members = {}
|
| 267 |
+
for i, q in enumerate(queries):
|
| 268 |
+
members.setdefault(q['candidate_pool_id'], []).append(i)
|
| 269 |
+
plist = list(members)
|
| 270 |
+
first_q = np.array([members[pid][0] for pid in plist])
|
| 271 |
+
sizes = np.array([len(members[pid]) for pid in plist], dtype=float)
|
| 272 |
+
capped = np.minimum(sizes, 30.0)
|
| 273 |
+
boot, domain = ev.boot, ev.domain
|
| 274 |
+
|
| 275 |
+
def report(label, ref, fused):
|
| 276 |
+
rank, rank0 = ev.ranks(fused, 1.0), ref
|
| 277 |
+
hit, hit0 = rank == 0, rank0 == 0
|
| 278 |
+
d = hit[first_q].astype(float) - hit0[first_q].astype(float)
|
| 279 |
+
macro = d[boot].mean(axis=1)
|
| 280 |
+
per_query = np.sum(d[boot] * sizes[boot], axis=1) / np.sum(sizes[boot], axis=1)
|
| 281 |
+
d5 = (rank[first_q] < 5).astype(float) - (rank0[first_q] < 5).astype(float)
|
| 282 |
+
print(f' {label}: Hit@1 {hit.mean():.4f} ({hit.mean() - hit0.mean():+.4f} [{np.percentile(per_query, 2.5):+.4f}, {np.percentile(per_query, 97.5):+.4f}]) macro {d.mean():+.4f} '
|
| 283 |
+
f'[{np.percentile(macro, 2.5):+.4f}, {np.percentile(macro, 97.5):+.4f}] pools +{int((d > 0).sum())} -{int((d < 0).sum())} | cap30 {np.sum(d * capped) / capped.sum():+.4f} '
|
| 284 |
+
f'| Hit@5 {np.mean(rank < 5) - np.mean(rank0 < 5):+.4f} macro@5 {d5.mean():+.4f} | dom {hit[domain].mean() - hit0[domain].mean():+.4f} oth {hit[~domain].mean() - hit0[~domain].mean():+.4f}', flush=True)
|
| 285 |
+
|
| 286 |
+
base_rank, net_rank = ev.ranks(base, 1.0), ev.ranks(net, 1.0)
|
| 287 |
+
print(f'base (release without the consensus term) Hit@1 {np.mean(base_rank == 0):.4f} macro {np.mean(base_rank[first_q] == 0):.4f}; '
|
| 288 |
+
f'net (the release) Hit@1 {np.mean(net_rank == 0):.4f} macro {np.mean(net_rank[first_q] == 0):.4f}')
|
| 289 |
+
lams = [float(x) for x in args.lams.split(',')]
|
| 290 |
+
for name in names:
|
| 291 |
+
term = terms[name]
|
| 292 |
+
alone = ev.ranks(term, 1.0)
|
| 293 |
+
print(f'\n{name}: alone Hit@1 {np.mean(alone == 0):.4f} macro {np.mean(alone[first_q] == 0):.4f} | dom {np.mean(alone[domain] == 0):.4f} oth {np.mean(alone[~domain] == 0):.4f}')
|
| 294 |
+
for lam in lams:
|
| 295 |
+
report(f'base + {lam:g} x term', base_rank, [b if (b is None or t is None) else b + lam * t for b, t in zip(base, term)])
|
| 296 |
+
for lam in lams:
|
| 297 |
+
report(f'net + {lam:g} x term', net_rank, [b if (b is None or t is None) else b + lam * t for b, t in zip(net, term)])
|
| 298 |
+
|
| 299 |
+
|
| 300 |
+
def rescore(args):
|
| 301 |
+
import netprop
|
| 302 |
+
import scorelab
|
| 303 |
+
queries, pools = netprop.load(None)
|
| 304 |
+
ev = scorelab.Evaluator(queries, pools)
|
| 305 |
+
config = json.load(open(ROOT / args.build / 'model_config.json'))
|
| 306 |
+
pred = {name: pickle.load(open(ROOT / args.pred / f'{name}.pkl', 'rb')) for name in ('distances', 'inverse', 'library', 'ion')}
|
| 307 |
+
base = netprop.released(queries, pools, pred, config)
|
| 308 |
+
terms = pickle.load(open(ROOT / args.save, 'rb'))
|
| 309 |
+
evaluate(args, queries, ev, base, terms, [n for n in (args.names.split(',') if args.names else terms)])
|
| 310 |
+
|
| 311 |
+
|
| 312 |
+
def main():
|
| 313 |
+
parser = argparse.ArgumentParser()
|
| 314 |
+
sub = parser.add_subparsers(dest='command', required=True)
|
| 315 |
+
p = sub.add_parser('prepare')
|
| 316 |
+
p.add_argument('--out', required=True)
|
| 317 |
+
p.add_argument('--members', default='evals/B30k-full/pred,evals/B2-30k-full/pred')
|
| 318 |
+
p.add_argument('--floor', type=float, default=0.02)
|
| 319 |
+
p.add_argument('--workers', type=int, default=5)
|
| 320 |
+
for name in ('score', 'rescore'):
|
| 321 |
+
p = sub.add_parser(name)
|
| 322 |
+
p.add_argument('--store')
|
| 323 |
+
p.add_argument('--build', default='builds/5Ms-I9b+I13-L-ion-net')
|
| 324 |
+
p.add_argument('--pred', default='evals/fullfold/5Ms-I9b+I13-L-ion/pred')
|
| 325 |
+
p.add_argument('--released-term', default='evals/netprop/term-m10-half05-ties.pkl')
|
| 326 |
+
p.add_argument('--lams', default='0.1,0.25,0.5,1')
|
| 327 |
+
p.add_argument('--save')
|
| 328 |
+
p.add_argument('--names')
|
| 329 |
+
args = parser.parse_args()
|
| 330 |
+
{'prepare': prepare, 'score': score, 'rescore': rescore}[args.command](args)
|
| 331 |
+
|
| 332 |
+
|
| 333 |
+
if __name__ == '__main__':
|
| 334 |
+
main()
|
shared/package-files/26/267e0693fa268f2bfb165485332ee52eaf290e5da9280077acc80b5a34ff97d2/netprop-eval-cap08.log
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released rule from saved branches: Hit@1 0.7713 pool-macro 0.8591 Hit@5 0.8797 Hit@20 0.9377 | twin pools 354 (macro 0.7429), others macro 0.8727
|
| 2 |
+
|
| 3 |
+
k=10 p=6.0 norm | m=1 tau=1.0 kernel=cap=0.8 debias=fold control=none shuffle=None: alone Hit@1 0.4150 (domain 0.3974 / other 0.4327) macro 0.3582
|
| 4 |
+
lam 0.00/0.25: Hit@1 0.7749 (+0.0036 [-0.0190, +0.0228]) macro +0.0065 [+0.0021, +0.0106] pools +40 -18 | no top 20 +0.0144 cap30 +0.0105 [-0.0012, +0.0225] | Hit@5 -0.0049 macro@5 +0.0065 cap30@5 +0.0039 | twin +11 -3 other +29 -15 | dom -0.0009 oth +0.0080
|
| 5 |
+
lam 0.00/0.50: Hit@1 0.7728 (+0.0014 [-0.0227, +0.0218]) macro +0.0080 [+0.0030, +0.0127] pools +51 -24 | no top 20 +0.0155 cap30 +0.0099 [-0.0028, +0.0237] | Hit@5 -0.0021 macro@5 +0.0062 cap30@5 +0.0070 | twin +15 -4 other +36 -20 | dom -0.0010 oth +0.0039
|
| 6 |
+
lam 0.50/0.50: Hit@1 0.7718 (+0.0005 [-0.0235, +0.0209]) macro +0.0089 [+0.0035, +0.0139] pools +62 -32 | no top 20 +0.0144 cap30 +0.0087 [-0.0053, +0.0235] | Hit@5 -0.0022 macro@5 +0.0062 cap30@5 +0.0068 | twin +19 -5 other +43 -27 | dom -0.0026 oth +0.0035
|
shared/package-files/2c/2c1d1d1556dcc6cd38eabf319f9a059e6b4f0a73b84d64cfe6ea5b09eb9c385d/eval-score-I30-on-merged-10-freq.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 1 members, 36.3 s
|
| 2 |
+
cos pool rule all=0.5875 dom=0.7836 non=0.3906 h5=0.7094 macro=0.6754
|
| 3 |
+
cen pool rule all=0.5618 dom=0.7458 non=0.3770 h5=0.6992 macro=0.6364
|
| 4 |
+
cos_pm pool rule all=0.5875 dom=0.7836 non=0.3906 h5=0.7094 macro=0.6754
|
| 5 |
+
dot pool rule all=0.6178 dom=0.7718 non=0.4632 h5=0.7562 macro=0.6666
|
| 6 |
+
geo pool rule all=0.5830 dom=0.7819 non=0.3833 h5=0.6940 macro=0.6719
|
| 7 |
+
idf05 pool rule all=0.5983 dom=0.7892 non=0.4066 h5=0.7224 macro=0.6837
|
| 8 |
+
idf1 pool rule all=0.6016 dom=0.7878 non=0.4146 h5=0.7235 macro=0.6831
|
| 9 |
+
lin pool rule all=0.5662 dom=0.7446 non=0.3871 h5=0.6889 macro=0.6382
|
| 10 |
+
log01 pool rule all=0.6284 dom=0.7940 non=0.4622 h5=0.7613 macro=0.6831
|
| 11 |
+
log05 pool rule all=0.6347 dom=0.7937 non=0.4750 h5=0.7599 macro=0.6887
|
| 12 |
+
log20 pool rule all=0.5990 dom=0.7893 non=0.4079 h5=0.7205 macro=0.6864
|
| 13 |
+
nll02 pool rule all=0.4388 dom=0.6620 non=0.2147 h5=0.5992 macro=0.5328
|
| 14 |
+
nll10 pool rule all=0.4026 dom=0.6039 non=0.2006 h5=0.5498 macro=0.4829
|
| 15 |
+
poolcen pool rule all=0.5984 dom=0.7397 non=0.4566 h5=0.7391 macro=0.6350
|
| 16 |
+
pow020 pool rule all=0.5765 dom=0.7642 non=0.3879 h5=0.7447 macro=0.6542
|
| 17 |
+
pow030 pool rule all=0.5923 dom=0.7827 non=0.4010 h5=0.7571 macro=0.6675
|
| 18 |
+
pow040 pool rule all=0.6306 dom=0.7913 non=0.4691 h5=0.7677 macro=0.6802
|
| 19 |
+
pow05 pool rule all=0.6321 dom=0.7952 non=0.4685 h5=0.7576 macro=0.6875
|
| 20 |
+
pow05idf025 pool rule all=0.6301 dom=0.7915 non=0.4682 h5=0.7616 macro=0.6846
|
| 21 |
+
pow05idf05 pool rule all=0.6298 dom=0.7940 non=0.4649 h5=0.7642 macro=0.6875
|
| 22 |
+
pow05m pool rule all=0.6321 dom=0.7952 non=0.4685 h5=0.7576 macro=0.6875
|
| 23 |
+
pow05s pool rule all=0.6290 dom=0.7963 non=0.4610 h5=0.7564 macro=0.6878
|
| 24 |
+
pow060 pool rule all=0.6315 dom=0.7908 non=0.4716 h5=0.7562 macro=0.6875
|
| 25 |
+
pow060idf025 pool rule all=0.6340 dom=0.7935 non=0.4739 h5=0.7583 macro=0.6911
|
| 26 |
+
pow060idf050 pool rule all=0.6314 dom=0.7934 non=0.4687 h5=0.7625 macro=0.6893
|
| 27 |
+
pow060m pool rule all=0.6315 dom=0.7908 non=0.4716 h5=0.7562 macro=0.6875
|
| 28 |
+
pow065 pool rule all=0.6017 dom=0.7915 non=0.4111 h5=0.7270 macro=0.6872
|
| 29 |
+
pow070 pool rule all=0.5993 dom=0.7910 non=0.4067 h5=0.7228 macro=0.6867
|
| 30 |
+
pow070idf025 pool rule all=0.6034 dom=0.7920 non=0.4141 h5=0.7252 macro=0.6881
|
| 31 |
+
pow070idf050 pool rule all=0.6331 dom=0.7920 non=0.4735 h5=0.7554 macro=0.6893
|
| 32 |
+
pow070m pool rule all=0.5993 dom=0.7910 non=0.4067 h5=0.7228 macro=0.6867
|
| 33 |
+
pow075 pool rule all=0.5995 dom=0.7906 non=0.4076 h5=0.7185 macro=0.6869
|
| 34 |
+
pow080 pool rule all=0.5967 dom=0.7886 non=0.4041 h5=0.7164 macro=0.6837
|
| 35 |
+
pow080m pool rule all=0.5967 dom=0.7886 non=0.4041 h5=0.7164 macro=0.6837
|
| 36 |
+
pow085 pool rule all=0.5962 dom=0.7875 non=0.4041 h5=0.7150 macro=0.6828
|
| 37 |
+
pow085idf025 pool rule all=0.5984 dom=0.7890 non=0.4070 h5=0.7189 macro=0.6849
|
| 38 |
+
pow085idf050 pool rule all=0.5989 dom=0.7881 non=0.4090 h5=0.7233 macro=0.6843
|
| 39 |
+
pow090 pool rule all=0.5920 dom=0.7852 non=0.3979 h5=0.7134 macro=0.6799
|
| 40 |
+
pow2 pool rule all=0.5740 dom=0.7625 non=0.3848 h5=0.7007 macro=0.6551
|
| 41 |
+
tani pool rule all=0.5778 dom=0.7665 non=0.3884 h5=0.7219 macro=0.6595
|
shared/package-files/2c/2c31cd541a7add3868008214c8eaadc44684525c7d58849163797d9a6317c66f/rank_keep.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Train-fold table for the rank-dependent thinning of simulated rows (inverse trainer, E70)
|
| 2 |
+
|
| 3 |
+
rank_keep.py [--sim inv/selfsim/cal2-train.npz] [--out inv/rank_keep.json]
|
| 4 |
+
|
| 5 |
+
For the self-simulated calibration rows of train-fold molecules (one of the molecule's own acquisition
|
| 6 |
+
conditions) and up to three measured train rows of the same molecule and condition: the share of
|
| 7 |
+
simulated peaks at intensity rank r (0 = strongest, inverse-model input space, 24 peaks) that the
|
| 8 |
+
measured row contains. Groups: 0 = recorded collision energy, 1 = no energy and [M+H]+, 2 = [M+Na]+.
|
| 9 |
+
Train fold only; no validation row is read.
|
| 10 |
+
"""
|
| 11 |
+
import argparse
|
| 12 |
+
import json
|
| 13 |
+
import os
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
import numpy as np
|
| 18 |
+
|
| 19 |
+
ROOT = Path('/workspace/research')
|
| 20 |
+
sys.path.insert(0, str(ROOT / 'allcond/pkg'))
|
| 21 |
+
import inverse
|
| 22 |
+
|
| 23 |
+
GROUPS = ('recorded energy', 'no energy [M+H]+', '[M+Na]+')
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
def main():
|
| 27 |
+
parser = argparse.ArgumentParser()
|
| 28 |
+
parser.add_argument('--sim', default='inv/selfsim/cal2-train.npz')
|
| 29 |
+
parser.add_argument('--out', default='inv/rank_keep.json')
|
| 30 |
+
parser.add_argument('--peaks', type=int, default=24)
|
| 31 |
+
args = parser.parse_args()
|
| 32 |
+
keys = ('offset', 'peaks', 'inten', 'adduct', 'instrument', 'energy', 'mol')
|
| 33 |
+
real = np.load(ROOT / 'inv/real-train.npz')
|
| 34 |
+
sim = np.load(ROOT / args.sim)
|
| 35 |
+
R = {k: real[k] for k in keys}
|
| 36 |
+
S = {k: sim[k] for k in keys}
|
| 37 |
+
code = lambda e: -1 if np.isnan(e) else int(round(float(e)))
|
| 38 |
+
sodium = inverse.ADDUCTS.index('[M+Na]+')
|
| 39 |
+
index = {}
|
| 40 |
+
for i in range(len(R['mol'])):
|
| 41 |
+
index.setdefault((int(R['mol'][i]), int(R['adduct'][i]), int(R['instrument'][i]), code(R['energy'][i])), []).append(i)
|
| 42 |
+
total = np.zeros((len(GROUPS), args.peaks))
|
| 43 |
+
found = np.zeros((len(GROUPS), args.peaks))
|
| 44 |
+
pairs = np.zeros(len(GROUPS), dtype=np.int64)
|
| 45 |
+
for j in range(len(S['mol'])):
|
| 46 |
+
cond = (int(S['adduct'][j]), int(S['instrument'][j]), code(S['energy'][j]))
|
| 47 |
+
rows = index.get((int(S['mol'][j]),) + cond)
|
| 48 |
+
sp = S['peaks'][S['offset'][j]:S['offset'][j + 1]][:args.peaks]
|
| 49 |
+
if not rows or len(sp) == 0:
|
| 50 |
+
continue
|
| 51 |
+
group = 2 if cond[0] == sodium else (1 if cond[2] < 0 else 0)
|
| 52 |
+
for i in rows[:3]:
|
| 53 |
+
rp = R['peaks'][R['offset'][i]:R['offset'][i + 1]][:args.peaks]
|
| 54 |
+
if len(rp) == 0:
|
| 55 |
+
continue
|
| 56 |
+
rset = set(tuple(p) for p in rp.tolist())
|
| 57 |
+
hit = np.array([tuple(p) in rset for p in sp.tolist()], dtype=np.float64)
|
| 58 |
+
total[group, :len(sp)] += 1
|
| 59 |
+
found[group, :len(sp)] += hit
|
| 60 |
+
pairs[group] += 1
|
| 61 |
+
keep = found / np.maximum(total, 1)
|
| 62 |
+
# ranks beyond the data of a group (none here) would keep the last measured value
|
| 63 |
+
for g, name in enumerate(GROUPS):
|
| 64 |
+
print(f'{name} | pairs {pairs[g]} | ' + ' '.join(f'{v:.2f}' for v in keep[g]))
|
| 65 |
+
table = {'schema': 'allcond-inverse-rank-keep/v1', 'groups': list(GROUPS), 'peaks': args.peaks,
|
| 66 |
+
'source': f'{args.sim} against inv/real-train.npz (train fold)', 'pairs': pairs.tolist(),
|
| 67 |
+
'keep': [[round(float(v), 4) for v in row] for row in keep]}
|
| 68 |
+
out = ROOT / args.out
|
| 69 |
+
with open(str(out) + '.tmp', 'w') as handle:
|
| 70 |
+
json.dump(table, handle, indent=1)
|
| 71 |
+
os.replace(str(out) + '.tmp', out)
|
| 72 |
+
print('wrote', out)
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
if __name__ == '__main__':
|
| 76 |
+
main()
|
shared/package-files/2c/2cb8e5cf99660ebdb7e2de530ffa2b0355e1d28cfdc9a5ff91f0dca005adfef3/B45a-anneal6k.log
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "resumed", "source": "/workspace/research/forks/B-step0045000-resume.ckpt", "step": 45000, "epoch": 7, "batch_in_epoch": 3644, "elapsed": 12964.771320266067, "skipped": 0}
|
| 2 |
+
{"parameters": 15108154, "train_rows": 189066, "validation_rows": 2048, "steps_per_epoch": 5908, "identity": "own-checkpoint:e50ac2416118a04bedebae881add432fa98fb6f5ec13dd9ad5cdaf13cf4b3ad1", "gpu": "NVIDIA H100 80GB HBM3"}
|
| 3 |
+
/opt/glacier/lib/python3.11/site-packages/torch/nn/modules/transformer.py:508: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. We recommend specifying layout=torch.jagged when constructing a nested tensor, as this layout receives active development, has better operator coverage, and works with torch.compile. (Triggered internally at /pytorch/aten/src/ATen/NestedTensorImpl.cpp:178.)
|
| 4 |
+
output = torch._nested_tensor_from_mask(
|
| 5 |
+
{"step": 46000, "elapsed_seconds": 13259.363614329064, "validation_loss": 0.5682799583300948, "validation_loss_ema": 0.5617907987907529}
|
| 6 |
+
{"step": 47000, "elapsed_seconds": 13547.064763365066, "validation_loss": 0.5652839476242661, "validation_loss_ema": 0.5623764898627996}
|
| 7 |
+
{"step": 48000, "elapsed_seconds": 13877.90905588807, "validation_loss": 0.5649867970496416, "validation_loss_ema": 0.5618297383189201}
|
| 8 |
+
{"step": 49000, "elapsed_seconds": 14180.89154956107, "validation_loss": 0.562397638335824, "validation_loss_ema": 0.5612926306203008}
|
| 9 |
+
{"step": 50000, "elapsed_seconds": 14465.758826909063, "validation_loss": 0.5609858660027385, "validation_loss_ema": 0.5604573851451278}
|
| 10 |
+
{"step": 51000, "elapsed_seconds": 14707.53600471506, "validation_loss": 0.5606449376791716, "validation_loss_ema": 0.5602231975644827}
|
shared/package-files/38/38a8667ef1302bb086a90b575ea6e9db125097721da1b0ff0210243969fedf30/fullfold-5Ms-I9b-L.report.json
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"benchmark_score": {
|
| 3 |
+
"at_or_above_upper_reference": true,
|
| 4 |
+
"comparable_to_test_reference": false,
|
| 5 |
+
"direction": "maximize",
|
| 6 |
+
"evaluation_fold": "validation",
|
| 7 |
+
"lower_reference": 0.04004329004329004,
|
| 8 |
+
"metric": "hit_rate_at_1",
|
| 9 |
+
"raw_performance": 0.7590714910700499,
|
| 10 |
+
"saturation": "upper",
|
| 11 |
+
"score": 1.0,
|
| 12 |
+
"unclipped_score": 1.5842443646116713,
|
| 13 |
+
"upper_reference": 0.4939052175894281,
|
| 14 |
+
"version": "massspecgym-retrieval-score/v1"
|
| 15 |
+
},
|
| 16 |
+
"external_reference_context": {
|
| 17 |
+
"comparable_to_this_validation_report": false,
|
| 18 |
+
"fold": "test",
|
| 19 |
+
"hit_rate_at_1": 0.4939052175894281,
|
| 20 |
+
"name": "GLACIER no-CF with strict-clean MIST fallback"
|
| 21 |
+
},
|
| 22 |
+
"global_error": null,
|
| 23 |
+
"metrics": {
|
| 24 |
+
"hit_rate_at_1": 0.7590714910700499,
|
| 25 |
+
"hit_rate_at_20": 0.9363837562406712,
|
| 26 |
+
"hit_rate_at_5": 0.8761130269185239
|
| 27 |
+
},
|
| 28 |
+
"paired_baseline_delta": {
|
| 29 |
+
"confidence": 0.95,
|
| 30 |
+
"estimate": 0.006588089968603634,
|
| 31 |
+
"grouping": "supplied target_inchikey connectivity block",
|
| 32 |
+
"lower": -0.0017486762663796026,
|
| 33 |
+
"molecule_groups": 3185,
|
| 34 |
+
"queries": 19429,
|
| 35 |
+
"resamples": 2000,
|
| 36 |
+
"seed": 0,
|
| 37 |
+
"statistic": "spectrum-weighted mean; molecules sampled with replacement",
|
| 38 |
+
"upper": 0.014745243737668348
|
| 39 |
+
},
|
| 40 |
+
"queries": 19429,
|
| 41 |
+
"schema": "massspecgym-retrieval-development-report/v1",
|
| 42 |
+
"strata": {
|
| 43 |
+
"adduct": {
|
| 44 |
+
"[M+H]+": {
|
| 45 |
+
"hit_rate_at_1": 0.8283419548053362,
|
| 46 |
+
"queries": 14692
|
| 47 |
+
},
|
| 48 |
+
"[M+Na]+": {
|
| 49 |
+
"hit_rate_at_1": 0.5442263035676589,
|
| 50 |
+
"queries": 4737
|
| 51 |
+
}
|
| 52 |
+
},
|
| 53 |
+
"candidate_pool_size": {
|
| 54 |
+
"129-256": {
|
| 55 |
+
"hit_rate_at_1": 0.7601980300139239,
|
| 56 |
+
"queries": 19391
|
| 57 |
+
},
|
| 58 |
+
"33-128": {
|
| 59 |
+
"hit_rate_at_1": 0.18421052631578946,
|
| 60 |
+
"queries": 38
|
| 61 |
+
}
|
| 62 |
+
},
|
| 63 |
+
"collision_energy": {
|
| 64 |
+
"20-39.999": {
|
| 65 |
+
"hit_rate_at_1": 0.9346868884540117,
|
| 66 |
+
"queries": 4088
|
| 67 |
+
},
|
| 68 |
+
"40-59.999": {
|
| 69 |
+
"hit_rate_at_1": 0.9093809827696235,
|
| 70 |
+
"queries": 1567
|
| 71 |
+
},
|
| 72 |
+
"<20": {
|
| 73 |
+
"hit_rate_at_1": 0.825,
|
| 74 |
+
"queries": 1200
|
| 75 |
+
},
|
| 76 |
+
">=60": {
|
| 77 |
+
"hit_rate_at_1": 0.9397435897435897,
|
| 78 |
+
"queries": 3120
|
| 79 |
+
},
|
| 80 |
+
"missing": {
|
| 81 |
+
"hit_rate_at_1": 0.5902263592130316,
|
| 82 |
+
"queries": 9454
|
| 83 |
+
}
|
| 84 |
+
},
|
| 85 |
+
"instrument_type": {
|
| 86 |
+
"": {
|
| 87 |
+
"hit_rate_at_1": 0.7407407407407407,
|
| 88 |
+
"queries": 486
|
| 89 |
+
},
|
| 90 |
+
"Orbitrap": {
|
| 91 |
+
"hit_rate_at_1": 0.7518097207859359,
|
| 92 |
+
"queries": 16439
|
| 93 |
+
},
|
| 94 |
+
"QTOF": {
|
| 95 |
+
"hit_rate_at_1": 0.8103035143769968,
|
| 96 |
+
"queries": 2504
|
| 97 |
+
}
|
| 98 |
+
},
|
| 99 |
+
"routing_domain": {
|
| 100 |
+
"fallback": {
|
| 101 |
+
"hit_rate_at_1": 0.5947395564724085,
|
| 102 |
+
"queries": 9695
|
| 103 |
+
},
|
| 104 |
+
"glacier_released": {
|
| 105 |
+
"hit_rate_at_1": 0.9227450174645572,
|
| 106 |
+
"queries": 9734
|
| 107 |
+
}
|
| 108 |
+
}
|
| 109 |
+
},
|
| 110 |
+
"uncertainty": {
|
| 111 |
+
"confidence": 0.95,
|
| 112 |
+
"estimate": 0.7590714910700499,
|
| 113 |
+
"grouping": "supplied target_inchikey connectivity block",
|
| 114 |
+
"lower": 0.7022166703804578,
|
| 115 |
+
"molecule_groups": 3185,
|
| 116 |
+
"queries": 19429,
|
| 117 |
+
"resamples": 2000,
|
| 118 |
+
"seed": 0,
|
| 119 |
+
"statistic": "spectrum-weighted mean; molecules sampled with replacement",
|
| 120 |
+
"upper": 0.806398649397918
|
| 121 |
+
},
|
| 122 |
+
"valid_rankings": 19429
|
| 123 |
+
}
|
shared/package-files/38/38ed421583fc85afbabc6ad85c91cec0d699f9c2c327af4236588876936bac6c/eval-I3-50k-100k.log
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
super().__init__(open(name, mode))
|
| 2 |
+
^^^^^^^^^^^^^^^^
|
| 3 |
+
FileNotFoundError: [Errno 2] No such file or directory: 'runs/I3-ff512x6-real08/step-050000-ema.pt'
|
| 4 |
+
19429 queries, 1066979 pairs, 24.2 s
|
shared/package-files/3a/3a37da7fa50fabb4093d8876f075fcf95fb76c68b4cc2c5c3435c592f4016061/fullfold-5Ms-I9b-L.sh
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env bash
|
| 2 |
+
# Full validation fold with the packaged infer.py and the five members' saved simulations:
|
| 3 |
+
# candidate build and the current release (paired baseline), then the official scorer.
|
| 4 |
+
cd /workspace/research
|
| 5 |
+
export CUDA_MPS_PIPE_DIRECTORY=/tmp/mps
|
| 6 |
+
PY=/opt/glacier/bin/python
|
| 7 |
+
N=5Ms-I9b-L; B=5Ms-I1+I3x2g07-L
|
| 8 |
+
mkdir -p evals/fullfold/$N evals/fullfold/$B
|
| 9 |
+
$PY allcond/checks/measure.py taskset -c 14-21 $PY builds/$N/infer.py validation-input evals/fullfold/$N --load-predictions evals/stack/5M-S2-30k --workers 7 > logs/fullfold-$N-saved-simulations.log 2>&1
|
| 10 |
+
$PY allcond/checks/measure.py taskset -c 14-21 $PY builds/$B/infer.py validation-input evals/fullfold/$B --load-predictions evals/stack/5M-S2-30k --workers 7 > logs/fullfold-$B-saved-simulations-rerun2.log 2>&1
|
| 11 |
+
OMP_NUM_THREADS=4 taskset -c 14-21 $PY /workspace/evaluation/score.py --input-root /workspace/data --rankings evals/fullfold/$B/rankings.jsonl --output logs/fullfold-$B-rerun2.report.json > /dev/null 2>&1
|
| 12 |
+
OMP_NUM_THREADS=4 taskset -c 14-21 $PY /workspace/evaluation/score.py --input-root /workspace/data --rankings evals/fullfold/$N/rankings.jsonl --baseline-rankings evals/fullfold/$B/rankings.jsonl --output logs/fullfold-$N.report.json > logs/fullfold-$N.score.log 2>&1
|
| 13 |
+
date -u +%H:%M:%S > logs/fullfold-$N.done
|
shared/package-files/3a/3a3b4478d48856473c3dbd30b55c98a2c401226853ab7182d40bd9387deb7f41/report-ind.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"benchmark_score": {
|
| 3 |
+
"at_or_above_upper_reference": false,
|
| 4 |
+
"comparable_to_test_reference": false,
|
| 5 |
+
"direction": "maximize",
|
| 6 |
+
"evaluation_fold": "validation",
|
| 7 |
+
"lower_reference": 0.04004329004329004,
|
| 8 |
+
"metric": "hit_rate_at_1",
|
| 9 |
+
"raw_performance": 0.47275267815556593,
|
| 10 |
+
"saturation": null,
|
| 11 |
+
"score": 0.9533943295305115,
|
| 12 |
+
"unclipped_score": 0.9533943295305115,
|
| 13 |
+
"upper_reference": 0.4939052175894281,
|
| 14 |
+
"version": "massspecgym-retrieval-score/v1"
|
| 15 |
+
},
|
| 16 |
+
"external_reference_context": {
|
| 17 |
+
"comparable_to_this_validation_report": false,
|
| 18 |
+
"fold": "test",
|
| 19 |
+
"hit_rate_at_1": 0.4939052175894281,
|
| 20 |
+
"name": "GLACIER no-CF with strict-clean MIST fallback"
|
| 21 |
+
},
|
| 22 |
+
"global_error": null,
|
| 23 |
+
"metrics": {
|
| 24 |
+
"hit_rate_at_1": 0.47275267815556593,
|
| 25 |
+
"hit_rate_at_20": 0.680018630647415,
|
| 26 |
+
"hit_rate_at_5": 0.592454587796926
|
| 27 |
+
},
|
| 28 |
+
"queries": 2147,
|
| 29 |
+
"schema": "massspecgym-retrieval-development-report/v1",
|
| 30 |
+
"strata": {
|
| 31 |
+
"adduct": {
|
| 32 |
+
"[M+H]+": {
|
| 33 |
+
"hit_rate_at_1": 0.5850422195416164,
|
| 34 |
+
"queries": 1658
|
| 35 |
+
},
|
| 36 |
+
"[M+Na]+": {
|
| 37 |
+
"hit_rate_at_1": 0.09202453987730061,
|
| 38 |
+
"queries": 489
|
| 39 |
+
}
|
| 40 |
+
},
|
| 41 |
+
"candidate_pool_size": {
|
| 42 |
+
"129-256": {
|
| 43 |
+
"hit_rate_at_1": 0.47275267815556593,
|
| 44 |
+
"queries": 2147
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"collision_energy": {
|
| 48 |
+
"20-39.999": {
|
| 49 |
+
"hit_rate_at_1": 0.71484375,
|
| 50 |
+
"queries": 512
|
| 51 |
+
},
|
| 52 |
+
"40-59.999": {
|
| 53 |
+
"hit_rate_at_1": 0.7288135593220338,
|
| 54 |
+
"queries": 177
|
| 55 |
+
},
|
| 56 |
+
"<20": {
|
| 57 |
+
"hit_rate_at_1": 0.5099337748344371,
|
| 58 |
+
"queries": 151
|
| 59 |
+
},
|
| 60 |
+
">=60": {
|
| 61 |
+
"hit_rate_at_1": 0.7586206896551724,
|
| 62 |
+
"queries": 348
|
| 63 |
+
},
|
| 64 |
+
"missing": {
|
| 65 |
+
"hit_rate_at_1": 0.18665276329509906,
|
| 66 |
+
"queries": 959
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"instrument_type": {
|
| 70 |
+
"": {
|
| 71 |
+
"hit_rate_at_1": 0.5714285714285714,
|
| 72 |
+
"queries": 35
|
| 73 |
+
},
|
| 74 |
+
"Orbitrap": {
|
| 75 |
+
"hit_rate_at_1": 0.4828877005347594,
|
| 76 |
+
"queries": 1870
|
| 77 |
+
},
|
| 78 |
+
"QTOF": {
|
| 79 |
+
"hit_rate_at_1": 0.38016528925619836,
|
| 80 |
+
"queries": 242
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"routing_domain": {
|
| 84 |
+
"fallback": {
|
| 85 |
+
"hit_rate_at_1": 0.18668012108980828,
|
| 86 |
+
"queries": 991
|
| 87 |
+
},
|
| 88 |
+
"glacier_released": {
|
| 89 |
+
"hit_rate_at_1": 0.7179930795847751,
|
| 90 |
+
"queries": 1156
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
"uncertainty": {
|
| 95 |
+
"confidence": 0.95,
|
| 96 |
+
"estimate": 0.47275267815556593,
|
| 97 |
+
"grouping": "supplied target_inchikey connectivity block",
|
| 98 |
+
"lower": 0.3972122998952267,
|
| 99 |
+
"molecule_groups": 413,
|
| 100 |
+
"queries": 2147,
|
| 101 |
+
"resamples": 2000,
|
| 102 |
+
"seed": 0,
|
| 103 |
+
"statistic": "spectrum-weighted mean; molecules sampled with replacement",
|
| 104 |
+
"upper": 0.5597915299028767
|
| 105 |
+
},
|
| 106 |
+
"valid_rankings": 2147
|
| 107 |
+
}
|
shared/package-files/3a/3a94f027d9c7dc0bff6c6f3f083e12827079f68fe14936be6322b7dbae19fed3/swap-I16+I18+I20-w1.0_0.05_0.5.log
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released rule from saved branches: Hit@1 0.7710 pool-macro 0.8641 Hit@5 0.8783 Hit@20 0.9334 | twin pools 354 (macro 0.7655), others macro 0.8757
|
| 2 |
+
|
| 3 |
+
k=10 p=3.0 half=0.5 | m=10 tau=0.02 kernel=plain fps=morgan debias=fold control=none shuffle=None: alone Hit@1 0.4485 (domain 0.4195 / other 0.4777) macro 0.3819
|
| 4 |
+
lam 1.00/1.00: Hit@1 0.8044 (+0.0334 [+0.0138, +0.0584]) macro +0.0145 [+0.0083, +0.0207] pools +84 -35 | no top 20 +0.0274 cap30 +0.0267 [+0.0141, +0.0414] | Hit@5 -0.0032 macro@5 +0.0074 cap30@5 +0.0148
|
| 5 |
+
without consensus term: Hit@1 0.7710 (ref 0.7713; -0.0003 [-0.0074, +0.0052]) macro 0.8641 (+0.0050 [+0.0006, +0.0095]) pools +40 -23 cap30 +0.0004 | Hit@5 0.8783 (-0.0014) Hit@20 0.9334 (-0.0042)
|
| 6 |
+
domain 0.9358 (+0.0044) other 0.6056 (-0.0051) | Orbitrap no energy 0.5690 (-0.0074) | above 850 0.4237 (+0.0092) below 850 0.8501 (-0.0025)
|
| 7 |
+
full rule : Hit@1 0.8044 (ref 0.8022; +0.0023 [-0.0035, +0.0082]) macro 0.8786 (+0.0047 [+0.0003, +0.0089]) pools +36 -20 cap30 +0.0026 | Hit@5 0.8751 (+0.0032) Hit@20 0.9168 (+0.0005)
|
| 8 |
+
domain 0.9398 (+0.0034) other 0.6685 (+0.0011) | Orbitrap no energy 0.6376 (-0.0026) | above 850 0.5372 (-0.0075) below 850 0.8653 (+0.0045)
|
shared/package-files/3c/3c02d5172d26f1587777ace6f7dacea73daab5aaeb92cea81a5670c43cde5cef/netprop-released-sub-0_25-2.log
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released rule from saved branches: Hit@1 0.7629 pool-macro 0.8404 Hit@5 0.8640 Hit@20 0.9229 | twin pools 95 (macro 0.7263), others macro 0.8549
|
| 2 |
+
|
| 3 |
+
k=10 p=3.0 half=0.5 | m=10 tau=0.02 kernel=plain debias=fold control=none shuffle=None: alone Hit@1 0.2613 (domain 0.1879 / other 0.3335) macro 0.2175
|
| 4 |
+
lam 1.00/1.00: Hit@1 0.7761 (+0.0132 [-0.0112, +0.0371]) macro +0.0130 [+0.0012, +0.0236] pools +18 -7 | no top 20 +0.0145 cap30 +0.0154 [-0.0112, +0.0414] | Hit@5 +0.0081 macro@5 +0.0059 cap30@5 +0.0080
|
shared/package-files/3c/3c140bc0e96a66db3c0d7451b4fda9cde77161967797935f6fb8dd197679a5a9/eval-score-I12.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 1 members, 74.8 s
|
| 2 |
+
cos pool rule all=0.5774 dom=0.8090 non=0.3448 h5=0.6880 macro=0.6843
|
| 3 |
+
cen pool rule all=0.5569 dom=0.7836 non=0.3292 h5=0.6811 macro=0.6595
|
| 4 |
+
cos_pm pool rule all=0.5774 dom=0.8090 non=0.3448 h5=0.6880 macro=0.6843
|
| 5 |
+
dot pool rule all=0.5719 dom=0.7781 non=0.3649 h5=0.7033 macro=0.6713
|
| 6 |
+
geo pool rule all=0.5504 dom=0.7874 non=0.3124 h5=0.6751 macro=0.6701
|
| 7 |
+
idf05 pool rule all=0.5816 dom=0.8083 non=0.3540 h5=0.6995 macro=0.6872
|
| 8 |
+
idf1 pool rule all=0.5828 dom=0.8136 non=0.3510 h5=0.7017 macro=0.6896
|
| 9 |
+
lin pool rule all=0.5297 dom=0.7473 non=0.3113 h5=0.6544 macro=0.6344
|
| 10 |
+
log01 pool rule all=0.5749 dom=0.8033 non=0.3455 h5=0.7140 macro=0.6843
|
| 11 |
+
log05 pool rule all=0.5809 dom=0.8184 non=0.3425 h5=0.7138 macro=0.6946
|
| 12 |
+
log20 pool rule all=0.5845 dom=0.8178 non=0.3503 h5=0.7048 macro=0.6952
|
| 13 |
+
nll02 pool rule all=0.4138 dom=0.6669 non=0.1596 h5=0.5605 macro=0.5313
|
| 14 |
+
nll10 pool rule all=0.3690 dom=0.5997 non=0.1375 h5=0.5197 macro=0.4722
|
| 15 |
+
poolcen pool rule all=0.5483 dom=0.7715 non=0.3242 h5=0.6824 macro=0.6542
|
| 16 |
+
pow020 pool rule all=0.5431 dom=0.7596 non=0.3256 h5=0.7052 macro=0.6447
|
| 17 |
+
pow030 pool rule all=0.5636 dom=0.7829 non=0.3435 h5=0.7080 macro=0.6630
|
| 18 |
+
pow040 pool rule all=0.5785 dom=0.8037 non=0.3523 h5=0.7166 macro=0.6807
|
| 19 |
+
pow05 pool rule all=0.5814 dom=0.8161 non=0.3457 h5=0.7090 macro=0.6917
|
| 20 |
+
pow05idf025 pool rule all=0.5841 dom=0.8143 non=0.3530 h5=0.7230 macro=0.6929
|
| 21 |
+
pow05idf05 pool rule all=0.5833 dom=0.8179 non=0.3478 h5=0.7247 macro=0.6937
|
| 22 |
+
pow05m pool rule all=0.5814 dom=0.8161 non=0.3457 h5=0.7090 macro=0.6917
|
| 23 |
+
pow05s pool rule all=0.5750 dom=0.8117 non=0.3374 h5=0.6999 macro=0.6890
|
| 24 |
+
pow060 pool rule all=0.5766 dom=0.8180 non=0.3342 h5=0.7086 macro=0.6934
|
| 25 |
+
pow060idf025 pool rule all=0.5834 dom=0.8213 non=0.3445 h5=0.7148 macro=0.6967
|
| 26 |
+
pow060idf050 pool rule all=0.5867 dom=0.8227 non=0.3498 h5=0.7193 macro=0.6964
|
| 27 |
+
pow060m pool rule all=0.5766 dom=0.8180 non=0.3342 h5=0.7086 macro=0.6934
|
| 28 |
+
pow065 pool rule all=0.5775 dom=0.8199 non=0.3341 h5=0.7042 macro=0.6958
|
| 29 |
+
pow070 pool rule all=0.5770 dom=0.8189 non=0.3342 h5=0.6991 macro=0.6940
|
| 30 |
+
pow070idf025 pool rule all=0.5819 dom=0.8222 non=0.3407 h5=0.7086 macro=0.6964
|
| 31 |
+
pow070idf050 pool rule all=0.5824 dom=0.8221 non=0.3418 h5=0.7140 macro=0.6976
|
| 32 |
+
pow070m pool rule all=0.5770 dom=0.8189 non=0.3342 h5=0.6991 macro=0.6940
|
| 33 |
+
pow075 pool rule all=0.5791 dom=0.8176 non=0.3397 h5=0.6977 macro=0.6943
|
| 34 |
+
pow080 pool rule all=0.5802 dom=0.8142 non=0.3452 h5=0.6956 macro=0.6917
|
| 35 |
+
pow080m pool rule all=0.5802 dom=0.8142 non=0.3452 h5=0.6956 macro=0.6917
|
| 36 |
+
pow085 pool rule all=0.5792 dom=0.8135 non=0.3439 h5=0.6936 macro=0.6893
|
| 37 |
+
pow085idf025 pool rule all=0.5855 dom=0.8179 non=0.3522 h5=0.6997 macro=0.6926
|
| 38 |
+
pow085idf050 pool rule all=0.5866 dom=0.8163 non=0.3561 h5=0.7060 macro=0.6934
|
| 39 |
+
pow090 pool rule all=0.5816 dom=0.8141 non=0.3482 h5=0.6900 macro=0.6872
|
| 40 |
+
pow2 pool rule all=0.5330 dom=0.7677 non=0.2973 h5=0.6614 macro=0.6512
|
| 41 |
+
tani pool rule all=0.5421 dom=0.7674 non=0.3158 h5=0.6806 macro=0.6571
|
shared/package-files/3c/3ca1aa2268d6a4235b90b917bd4ec950f2712c826e93d39952b9ba05e725c5db/library-reverse-small-znw_8.log
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
base (released rule without consensus): Hit@1 0.7685 domain 0.9301 other 0.6062 macro 0.8650
|
| 2 |
+
znw_8 alone per spectrum 0.2180 (0.2150 / 0.2209) pool mean 0.3129 (0.2614 / 0.3647) macro 0.2227
|
| 3 |
+
other w 0.05 (x0.05/sd): Hit@1 0.7594 (-0.0091 [-0.0291, +0.0043]) macro 0.8647 (-0.0003 [-0.0027, +0.0018]) pools +8 -9 | domain 0.9294 other 0.5888 Hit@5 0.8855
|
| 4 |
+
other w 0.10 (x0.05/sd): Hit@1 0.7567 (-0.0118 [-0.0331, +0.0038]) macro 0.8639 (-0.0012 [-0.0044, +0.0024]) pools +15 -19 | domain 0.9297 other 0.5830 Hit@5 0.8880
|
| 5 |
+
other w 0.20 (x0.05/sd): Hit@1 0.7475 (-0.0209 [-0.0452, -0.0002]) macro 0.8615 (-0.0035 [-0.0077, +0.0012]) pools +25 -37 | domain 0.9286 other 0.5658 Hit@5 0.8959
|
| 6 |
+
other w 0.30 (x0.05/sd): Hit@1 0.7536 (-0.0149 [-0.0412, +0.0091]) macro 0.8606 (-0.0044 [-0.0092, +0.0012]) pools +32 -47 | domain 0.9293 other 0.5772 Hit@5 0.8921
|
| 7 |
+
all w 0.05 (x0.05/sd): Hit@1 0.7610 (-0.0075 [-0.0280, +0.0062]) macro 0.8656 (+0.0006 [-0.0024, +0.0035]) pools +15 -13 | domain 0.9321 other 0.5892 Hit@5 0.8858
|
| 8 |
+
all w 0.10 (x0.05/sd): Hit@1 0.7575 (-0.0110 [-0.0323, +0.0047]) macro 0.8639 (-0.0012 [-0.0050, +0.0030]) pools +22 -26 | domain 0.9317 other 0.5826 Hit@5 0.8890
|
| 9 |
+
all w 0.20 (x0.05/sd): Hit@1 0.7471 (-0.0214 [-0.0455, -0.0005]) macro 0.8606 (-0.0044 [-0.0095, +0.0009]) pools +34 -49 | domain 0.9276 other 0.5659 Hit@5 0.8958
|
| 10 |
+
all w 0.30 (x0.05/sd): Hit@1 0.7533 (-0.0152 [-0.0413, +0.0089]) macro 0.8597 (-0.0053 [-0.0112, +0.0012]) pools +46 -64 | domain 0.9282 other 0.5777 Hit@5 0.8934
|
shared/package-files/56/5606ac500db6e746b0790eaf33948de692ddb40e206e2a256478df7b39fe0160/validation.jsonl
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"step": 5000, "elapsed": 122.89247310091741, "val_loss": 0.03769003911150656, "val_cos": 0.6351265645909465, "val_loss_ema": 0.03506690962903995, "val_cos_ema": 0.6560519946524043}
|
| 2 |
+
{"step": 10000, "elapsed": 241.18909381492995, "val_loss": 0.03136553374853031, "val_cos": 0.6962334086409169, "val_loss_ema": 0.030148990683526396, "val_cos_ema": 0.7082829277835323, "ind_cos": 0.45205620464254465, "agg_cos": 0.4891656801688198, "ind_nll": 0.3135519069432292, "agg_nll": 0.2895156724484019, "retrieval_seconds": 11.547416899935342}
|
| 3 |
+
{"step": 15000, "elapsed": 354.96333089098334, "val_loss": 0.029885894965448113, "val_cos": 0.7181207809122317, "val_loss_ema": 0.02857240176899102, "val_cos_ema": 0.7286305014009342}
|
| 4 |
+
{"step": 20000, "elapsed": 455.4616900680121, "val_loss": 0.02877548722760898, "val_cos": 0.730062623848371, "val_loss_ema": 0.02760639295715932, "val_cos_ema": 0.741453834112345, "ind_cos": 0.5139224870039631, "agg_cos": 0.5566421328941273, "ind_nll": 0.4076895362602296, "agg_nll": 0.38900612486489267, "retrieval_seconds": 11.382992881932296}
|
| 5 |
+
{"step": 25000, "elapsed": 566.4225651749875, "val_loss": 0.028477733112766957, "val_cos": 0.7375770131793967, "val_loss_ema": 0.027340128698009822, "val_cos_ema": 0.7472576683453215}
|
| 6 |
+
{"step": 30000, "elapsed": 665.1743251919979, "val_loss": 0.02754206203127111, "val_cos": 0.7456102060507167, "val_loss_ema": 0.026788575189456845, "val_cos_ema": 0.7542761992583573, "ind_cos": 0.5410983581244532, "agg_cos": 0.5792372227083226, "ind_nll": 0.4386226774409388, "agg_nll": 0.4280199701477173, "retrieval_seconds": 11.324746005935594}
|
| 7 |
+
{"step": 35000, "elapsed": 774.31287277292, "val_loss": 0.028099377737330473, "val_cos": 0.7470852280860762, "val_loss_ema": 0.027340684733969275, "val_cos_ema": 0.7524030052128905}
|
| 8 |
+
{"step": 40000, "elapsed": 868.8698491069954, "val_loss": 0.027492598784406123, "val_cos": 0.752357755823286, "val_loss_ema": 0.027221920008126545, "val_cos_ema": 0.7546660527191955, "ind_cos": 0.536774924082557, "agg_cos": 0.5725976632868393, "ind_nll": 0.44433578671058727, "agg_nll": 0.4258582531267693, "retrieval_seconds": 11.217270076973364}
|
| 9 |
+
{"step": 45000, "elapsed": 987.770604688907, "val_loss": 0.02711030717700807, "val_cos": 0.756390153732822, "val_loss_ema": 0.02730759745293561, "val_cos_ema": 0.7553835590081193}
|
| 10 |
+
{"step": 50000, "elapsed": 1090.247666540905, "val_loss": 0.02738600794755705, "val_cos": 0.754768325638382, "val_loss_ema": 0.027265339505378558, "val_cos_ema": 0.7557645033278219, "ind_cos": 0.5379072520459107, "agg_cos": 0.5739873385145916, "ind_nll": 0.4516444490195069, "agg_nll": 0.43522569355087753, "retrieval_seconds": 11.337262545945123}
|
shared/package-files/56/56382d924fa83294fbf0719351015cf3cd417b347da8c0754849c9ed485ed27d/stack_ceiling.py
ADDED
|
@@ -0,0 +1,130 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Ceiling diagnostic for a learned re-ranker over the released branches (lab, E65)
|
| 2 |
+
|
| 3 |
+
stack_ceiling.py --pred evals/fullfold/NAME/pred --rankings evals/fullfold/NAME/rankings.jsonl
|
| 4 |
+
|
| 5 |
+
DIAGNOSTIC ONLY - nothing fitted here may enter a package. A LightGBM ranker is fitted on the
|
| 6 |
+
branch scores of VALIDATION pools in a pool-grouped 5-fold cross-validation, to measure how much a
|
| 7 |
+
learned fusion could add at most over the hand-set released rule if its training features had the
|
| 8 |
+
validation distribution. It decides whether a train-fold stacker (cross-fitted forward members,
|
| 9 |
+
10+ GPU hours) is worth building. The fitted models are discarded.
|
| 10 |
+
"""
|
| 11 |
+
import argparse
|
| 12 |
+
import json
|
| 13 |
+
import pickle
|
| 14 |
+
import sys
|
| 15 |
+
from pathlib import Path
|
| 16 |
+
|
| 17 |
+
import lightgbm as lgb
|
| 18 |
+
import numpy as np
|
| 19 |
+
|
| 20 |
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 21 |
+
import scorelab
|
| 22 |
+
sys.path.insert(0, str(Path(__file__).resolve().parent.parent / 'pkg'))
|
| 23 |
+
import infer
|
| 24 |
+
|
| 25 |
+
ROOT = Path('/workspace/research')
|
| 26 |
+
BRANCHES = ('distances', 'inverse', 'library', 'ion')
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
def zscore(x):
|
| 30 |
+
out = np.full(len(x), np.nan)
|
| 31 |
+
ok = np.isfinite(x)
|
| 32 |
+
if ok.sum() > 1:
|
| 33 |
+
s = x[ok].std()
|
| 34 |
+
out[ok] = (x[ok] - x[ok].mean()) / (s if s > 0 else 1.0)
|
| 35 |
+
return out
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
def pct(x):
|
| 39 |
+
out = np.full(len(x), np.nan)
|
| 40 |
+
ok = np.isfinite(x)
|
| 41 |
+
if ok.sum() > 1:
|
| 42 |
+
out[ok] = np.argsort(np.argsort(x[ok])) / (ok.sum() - 1)
|
| 43 |
+
return out
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def main():
|
| 47 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 48 |
+
p.add_argument('--pred', required=True)
|
| 49 |
+
p.add_argument('--rankings', required=True)
|
| 50 |
+
p.add_argument('--folds', type=int, default=5)
|
| 51 |
+
p.add_argument('--seed', type=int, default=0)
|
| 52 |
+
args = p.parse_args()
|
| 53 |
+
root = ROOT / 'validation-input'
|
| 54 |
+
queries = list(infer.read_jsonl(root / 'queries.jsonl'))
|
| 55 |
+
pools = {r['candidate_pool_id']: r['candidates'] for r in infer.read_jsonl(root / 'candidate_pools.jsonl')}
|
| 56 |
+
ev = scorelab.Evaluator(queries, pools)
|
| 57 |
+
branch = {name: pickle.load(open(ROOT / args.pred / f'{name}.pkl', 'rb')) for name in BRANCHES}
|
| 58 |
+
index = {q['query_id']: i for i, q in enumerate(queries)}
|
| 59 |
+
released = {}
|
| 60 |
+
for line in open(ROOT / args.rankings):
|
| 61 |
+
row = json.loads(line)
|
| 62 |
+
released[index[row['query_id']]] = row['ranking']
|
| 63 |
+
domain = ev.domain
|
| 64 |
+
X, y, group, pool_of, sizes, base_hit = [], [], [], [], [], []
|
| 65 |
+
names = None
|
| 66 |
+
for pid, members in ev.by_pool.items():
|
| 67 |
+
members = np.array(members)
|
| 68 |
+
n = len(pools[pid])
|
| 69 |
+
ids = ev.ids[pid]
|
| 70 |
+
feats, cols = [], []
|
| 71 |
+
for part, sel in (('dom', members[domain[members]]), ('oth', members[~domain[members]]), ('all', members)):
|
| 72 |
+
for name in BRANCHES:
|
| 73 |
+
vals = [branch[name].get(queries[i]['query_id']) for i in sel]
|
| 74 |
+
vals = [np.where(np.isfinite(v), v, np.nan) for v in vals if v is not None]
|
| 75 |
+
mean = np.nanmean(vals, axis=0) if vals else np.full(n, np.nan)
|
| 76 |
+
feats += [mean, zscore(mean), pct(mean)]
|
| 77 |
+
cols += [f'{part}_{name}', f'{part}_{name}_z', f'{part}_{name}_pct']
|
| 78 |
+
order = {cid: k for k, cid in enumerate(released[int(members[0])])}
|
| 79 |
+
rel = np.array([order[c] for c in ids], dtype=float)
|
| 80 |
+
feats += [rel, rel / max(n - 1, 1), np.full(n, len(members)), np.full(n, domain[members].mean()), np.full(n, n),
|
| 81 |
+
np.full(n, np.median([float(queries[i]['precursor_mz']) for i in members])),
|
| 82 |
+
np.full(n, np.mean([queries[i]['adduct'] == '[M+Na]+' for i in members]))]
|
| 83 |
+
cols += ['release_rank', 'release_pct', 'n_spectra', 'domain_share', 'n_cands', 'mz', 'na_share']
|
| 84 |
+
names = cols
|
| 85 |
+
X.append(np.stack(feats, axis=1))
|
| 86 |
+
label = np.zeros(n, dtype=int)
|
| 87 |
+
label[ev.target[members[0]]] = 1
|
| 88 |
+
y.append(label)
|
| 89 |
+
group.append(n)
|
| 90 |
+
sizes.append(len(members))
|
| 91 |
+
base_hit.append(float(rel[ev.target[members[0]]] == 0))
|
| 92 |
+
sizes = np.array(sizes, dtype=float)
|
| 93 |
+
base_hit = np.array(base_hit)
|
| 94 |
+
n_pools = len(X)
|
| 95 |
+
print(f'pools {n_pools}, rows {sum(group)}, features {len(names)}')
|
| 96 |
+
print(f'release: per query {np.sum(base_hit * sizes) / sizes.sum():.4f} pool-macro {base_hit.mean():.4f}')
|
| 97 |
+
rng = np.random.default_rng(args.seed)
|
| 98 |
+
fold = rng.permutation(n_pools) % args.folds
|
| 99 |
+
variants = {
|
| 100 |
+
'branches only (no release rank)': [k for k, c in enumerate(names) if not c.startswith('release')],
|
| 101 |
+
'branches + release rank': list(range(len(names))),
|
| 102 |
+
'all-part means only (4 raw + z)': [k for k, c in enumerate(names) if c.startswith('all_') and not c.endswith('pct')] + [names.index(c) for c in ('n_spectra', 'domain_share', 'mz', 'na_share')],
|
| 103 |
+
}
|
| 104 |
+
boot = np.random.default_rng(1).integers(0, n_pools, size=(1000, n_pools))
|
| 105 |
+
for label, cols in variants.items():
|
| 106 |
+
hit = np.zeros(n_pools)
|
| 107 |
+
top5 = np.zeros(n_pools)
|
| 108 |
+
for f in range(args.folds):
|
| 109 |
+
tr = np.where(fold != f)[0]
|
| 110 |
+
te = np.where(fold == f)[0]
|
| 111 |
+
model = lgb.LGBMRanker(objective='lambdarank', n_estimators=300, learning_rate=0.05, num_leaves=15, min_child_samples=40,
|
| 112 |
+
subsample=0.8, subsample_freq=1, colsample_bytree=0.8, lambdarank_truncation_level=10, verbose=-1, n_jobs=6,
|
| 113 |
+
random_state=args.seed)
|
| 114 |
+
model.fit(np.concatenate([X[k][:, cols] for k in tr]), np.concatenate([y[k] for k in tr]), group=[group[k] for k in tr])
|
| 115 |
+
for k in te:
|
| 116 |
+
score = model.predict(X[k][:, cols])
|
| 117 |
+
order = np.argsort(-score, kind='stable')
|
| 118 |
+
pos = int(np.where(order == int(np.argmax(y[k])))[0][0])
|
| 119 |
+
hit[k] = pos == 0
|
| 120 |
+
top5[k] = pos < 5
|
| 121 |
+
d = hit - base_hit
|
| 122 |
+
per_query = np.sum(d[boot] * sizes[boot], axis=1) / np.sum(sizes[boot], axis=1)
|
| 123 |
+
macro = d[boot].mean(axis=1)
|
| 124 |
+
print(f'{label}: per query {np.sum(hit * sizes) / sizes.sum():.4f} ({np.sum(d * sizes) / sizes.sum():+.4f} [{np.percentile(per_query, 2.5):+.4f}, {np.percentile(per_query, 97.5):+.4f}])'
|
| 125 |
+
f' pool-macro {hit.mean():.4f} ({d.mean():+.4f} [{np.percentile(macro, 2.5):+.4f}, {np.percentile(macro, 97.5):+.4f}])'
|
| 126 |
+
f' top-5 per query {np.sum(top5 * sizes) / sizes.sum():.4f} pools +{int((d > 0).sum())} -{int((d < 0).sum())}')
|
| 127 |
+
|
| 128 |
+
|
| 129 |
+
if __name__ == '__main__':
|
| 130 |
+
main()
|
shared/package-files/56/565d1106b459cf127e3695d8351dab7b2c257a2e849af804956e688275602ac4/report-np075-val-sub-replay.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"benchmark_score": {
|
| 3 |
+
"at_or_above_upper_reference": true,
|
| 4 |
+
"comparable_to_test_reference": false,
|
| 5 |
+
"direction": "maximize",
|
| 6 |
+
"evaluation_fold": "validation",
|
| 7 |
+
"lower_reference": 0.04004329004329004,
|
| 8 |
+
"metric": "hit_rate_at_1",
|
| 9 |
+
"raw_performance": 0.5770843036795529,
|
| 10 |
+
"saturation": "upper",
|
| 11 |
+
"score": 1.0,
|
| 12 |
+
"unclipped_score": 1.1832695827558022,
|
| 13 |
+
"upper_reference": 0.4939052175894281,
|
| 14 |
+
"version": "massspecgym-retrieval-score/v1"
|
| 15 |
+
},
|
| 16 |
+
"external_reference_context": {
|
| 17 |
+
"comparable_to_this_validation_report": false,
|
| 18 |
+
"fold": "test",
|
| 19 |
+
"hit_rate_at_1": 0.4939052175894281,
|
| 20 |
+
"name": "GLACIER no-CF with strict-clean MIST fallback"
|
| 21 |
+
},
|
| 22 |
+
"global_error": null,
|
| 23 |
+
"metrics": {
|
| 24 |
+
"hit_rate_at_1": 0.5770843036795529,
|
| 25 |
+
"hit_rate_at_20": 0.8164881229622729,
|
| 26 |
+
"hit_rate_at_5": 0.7177456916627852
|
| 27 |
+
},
|
| 28 |
+
"queries": 2147,
|
| 29 |
+
"schema": "massspecgym-retrieval-development-report/v1",
|
| 30 |
+
"strata": {
|
| 31 |
+
"adduct": {
|
| 32 |
+
"[M+H]+": {
|
| 33 |
+
"hit_rate_at_1": 0.6628468033775633,
|
| 34 |
+
"queries": 1658
|
| 35 |
+
},
|
| 36 |
+
"[M+Na]+": {
|
| 37 |
+
"hit_rate_at_1": 0.28629856850715746,
|
| 38 |
+
"queries": 489
|
| 39 |
+
}
|
| 40 |
+
},
|
| 41 |
+
"candidate_pool_size": {
|
| 42 |
+
"129-256": {
|
| 43 |
+
"hit_rate_at_1": 0.5770843036795529,
|
| 44 |
+
"queries": 2147
|
| 45 |
+
}
|
| 46 |
+
},
|
| 47 |
+
"collision_energy": {
|
| 48 |
+
"20-39.999": {
|
| 49 |
+
"hit_rate_at_1": 0.796875,
|
| 50 |
+
"queries": 512
|
| 51 |
+
},
|
| 52 |
+
"40-59.999": {
|
| 53 |
+
"hit_rate_at_1": 0.7401129943502824,
|
| 54 |
+
"queries": 177
|
| 55 |
+
},
|
| 56 |
+
"<20": {
|
| 57 |
+
"hit_rate_at_1": 0.6291390728476821,
|
| 58 |
+
"queries": 151
|
| 59 |
+
},
|
| 60 |
+
">=60": {
|
| 61 |
+
"hit_rate_at_1": 0.8132183908045977,
|
| 62 |
+
"queries": 348
|
| 63 |
+
},
|
| 64 |
+
"missing": {
|
| 65 |
+
"hit_rate_at_1": 0.3357664233576642,
|
| 66 |
+
"queries": 959
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"instrument_type": {
|
| 70 |
+
"": {
|
| 71 |
+
"hit_rate_at_1": 0.6,
|
| 72 |
+
"queries": 35
|
| 73 |
+
},
|
| 74 |
+
"Orbitrap": {
|
| 75 |
+
"hit_rate_at_1": 0.5941176470588235,
|
| 76 |
+
"queries": 1870
|
| 77 |
+
},
|
| 78 |
+
"QTOF": {
|
| 79 |
+
"hit_rate_at_1": 0.44214876033057854,
|
| 80 |
+
"queries": 242
|
| 81 |
+
}
|
| 82 |
+
},
|
| 83 |
+
"routing_domain": {
|
| 84 |
+
"fallback": {
|
| 85 |
+
"hit_rate_at_1": 0.32896064581231077,
|
| 86 |
+
"queries": 991
|
| 87 |
+
},
|
| 88 |
+
"glacier_released": {
|
| 89 |
+
"hit_rate_at_1": 0.7897923875432526,
|
| 90 |
+
"queries": 1156
|
| 91 |
+
}
|
| 92 |
+
}
|
| 93 |
+
},
|
| 94 |
+
"uncertainty": {
|
| 95 |
+
"confidence": 0.95,
|
| 96 |
+
"estimate": 0.5770843036795529,
|
| 97 |
+
"grouping": "supplied target_inchikey connectivity block",
|
| 98 |
+
"lower": 0.476581171734675,
|
| 99 |
+
"molecule_groups": 413,
|
| 100 |
+
"queries": 2147,
|
| 101 |
+
"resamples": 2000,
|
| 102 |
+
"seed": 0,
|
| 103 |
+
"statistic": "spectrum-weighted mean; molecules sampled with replacement",
|
| 104 |
+
"upper": 0.6835037618988236
|
| 105 |
+
},
|
| 106 |
+
"valid_rankings": 2147
|
| 107 |
+
}
|
shared/package-files/56/56d8f62123d1d469f6fba33cb1d2528e433075d82052bd9ce09172670c665e98/matched-B3-30k.log
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "canonicalized", "unique_candidates": 828117, "unsupported": 7007, "seconds": 73.11523634800687}
|
| 2 |
+
{"event": "planned", "queries": 19429, "groups": 10176, "molecules": 944948, "simulations": 2540748, "seconds": 76.45933417799824}
|
| 3 |
+
ind meanD all=0.4820 dom=0.7160 non=0.2470 h5=0.6341 h20=0.7118 | diff=+0.0000 [+0.0000,+0.0000]
|
| 4 |
+
agg meanD all=0.6241 dom=0.7888 non=0.4588 h5=0.8174 h20=0.9036 | diff=+0.0000 [+0.0000,+0.0000]
|
| 5 |
+
ind Dmean all=0.4820 dom=0.7160 non=0.2470 h5=0.6341 h20=0.7118 | diff=+0.0000 [+0.0000,+0.0000]
|
| 6 |
+
agg Dmean all=0.6241 dom=0.7888 non=0.4588 h5=0.8174 h20=0.9036 | diff=+0.0000 [+0.0000,+0.0000]
|
| 7 |
+
ind gmean all=0.4820 dom=0.7160 non=0.2470 h5=0.6341 h20=0.7118 | diff=+0.0000 [+0.0000,+0.0000]
|
| 8 |
+
agg gmean all=0.6241 dom=0.7888 non=0.4588 h5=0.8174 h20=0.9036 | diff=+0.0000 [+0.0000,+0.0000]
|
shared/package-files/75/751915c72e387c626ac9a076693ea766f19ade5559e92addc37cec166f8c5f9d/train.py
ADDED
|
@@ -0,0 +1,371 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Train native GLACIER from random initialization on all acquisition conditions.
|
| 3 |
+
|
| 4 |
+
Plain PyTorch loop around the pinned ``JointModel`` (same losses, optimizer,
|
| 5 |
+
LR and MAGMa schedules as the native recipe). Differences from the starter
|
| 6 |
+
wrapper: native batch size 32 without gradient accumulation, several loader
|
| 7 |
+
workers, every adduct/instrument/collision-energy condition, optional EMA
|
| 8 |
+
weights and optional warm start from one of OUR OWN train-fold checkpoints.
|
| 9 |
+
No test input is read. Validation rows are used for a monitoring loss only.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import functools
|
| 14 |
+
import hashlib
|
| 15 |
+
import json
|
| 16 |
+
import math
|
| 17 |
+
import os
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
import random
|
| 20 |
+
import shutil
|
| 21 |
+
import sys
|
| 22 |
+
import time
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
def sha256(path):
|
| 26 |
+
h = hashlib.sha256()
|
| 27 |
+
with Path(path).open('rb') as f:
|
| 28 |
+
for block in iter(lambda: f.read(1024 * 1024), b''):
|
| 29 |
+
h.update(block)
|
| 30 |
+
return h.hexdigest()
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
def seed_worker(base, worker):
|
| 34 |
+
import numpy as np
|
| 35 |
+
random.seed(base + worker)
|
| 36 |
+
np.random.seed((base + worker) % 2**32)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
def main():
|
| 40 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 41 |
+
p.add_argument('--data-root', type=Path, required=True)
|
| 42 |
+
p.add_argument('--source-root', type=Path, default=Path('/workspace/research/ms-pred'))
|
| 43 |
+
p.add_argument('--config', type=Path, default=Path(__file__).with_name('config.json'))
|
| 44 |
+
p.add_argument('--work-dir', type=Path, required=True)
|
| 45 |
+
p.add_argument('--subset', choices=['all', 'released', 'other'], default='all')
|
| 46 |
+
p.add_argument('--batch-size', type=int, default=32)
|
| 47 |
+
p.add_argument('--workers', type=int, default=5)
|
| 48 |
+
p.add_argument('--max-steps', type=int, required=True)
|
| 49 |
+
p.add_argument('--max-seconds', type=float, default=1e9)
|
| 50 |
+
p.add_argument('--checkpoint-every', type=int, default=5000)
|
| 51 |
+
p.add_argument('--resume-every', type=int, default=1000)
|
| 52 |
+
p.add_argument('--validate-every', type=int, default=5000)
|
| 53 |
+
p.add_argument('--validation-rows', type=int, default=2048)
|
| 54 |
+
p.add_argument('--ema-decay', type=float, default=0.999)
|
| 55 |
+
p.add_argument('--seed', type=int, default=1)
|
| 56 |
+
p.add_argument('--init', type=Path, help='warm start from our own exported train-fold checkpoint')
|
| 57 |
+
p.add_argument('--override', action='append', default=[], help='config override key=value (JSON value)')
|
| 58 |
+
p.add_argument('--limit-train', type=int)
|
| 59 |
+
p.add_argument('--fork', type=Path, help='resume state (last.ckpt copy) of another of our runs to branch from')
|
| 60 |
+
p.add_argument('--loss-precursor-window', type=float,
|
| 61 |
+
help='fragment-only intensity loss: ignore predicted and target peaks at or above precursor - window')
|
| 62 |
+
p.add_argument('--decoys', type=Path, help='decoy table (prepare_decoys.py): adds the contrastive ranking term')
|
| 63 |
+
p.add_argument('--num-decoys', type=int, default=3)
|
| 64 |
+
p.add_argument('--mutation-rate', type=float, default=0.5, help='share of decoys taken from mutations')
|
| 65 |
+
p.add_argument('--contr-weight', type=float, default=1.0)
|
| 66 |
+
p.add_argument('--contr-loss', choices=['sinkhorn', 'softmax'], default='sinkhorn')
|
| 67 |
+
p.add_argument('--contr-tau', type=float, default=0.05)
|
| 68 |
+
p.add_argument('--contr-threshold', type=float, default=0.5)
|
| 69 |
+
p.add_argument('--contr-window', type=float, default=0.5, help='fragment-only ranked distance; negative = full')
|
| 70 |
+
p.add_argument('--contr-power', type=float, default=0.75)
|
| 71 |
+
p.add_argument('--contr-topk', type=int, default=100)
|
| 72 |
+
p.add_argument('--synth', type=Path,
|
| 73 |
+
help='synthetic-augmentation store (prepare_synth.py): adds an end-to-end intensity loss on it')
|
| 74 |
+
p.add_argument('--synth-per-item', type=int, default=1, help='synthetic spectra per real spectrum per step')
|
| 75 |
+
p.add_argument('--synth-weight', type=float, default=1.0)
|
| 76 |
+
p.add_argument('--synth-schedule', choices=['e2e', 'constant'], default='e2e',
|
| 77 |
+
help="e2e: weight x (1 - magma_weight), the stock end-to-end intensity weight")
|
| 78 |
+
p.add_argument('--synth-instrument', choices=['flag', 'label'], default='flag',
|
| 79 |
+
help='flag: synthetic spectra use their own instrument index; label: their labelled instrument')
|
| 80 |
+
args = p.parse_args()
|
| 81 |
+
args.work_dir = args.work_dir.resolve()
|
| 82 |
+
args.work_dir.mkdir(parents=True, exist_ok=True)
|
| 83 |
+
source = args.source_root.resolve() / 'src'
|
| 84 |
+
sys.path.insert(0, str(source))
|
| 85 |
+
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
| 86 |
+
sys.path.insert(0, str(Path(__file__).resolve().parent / 'pkg'))
|
| 87 |
+
import numpy as np
|
| 88 |
+
import torch
|
| 89 |
+
from torch.utils.data import DataLoader, Sampler
|
| 90 |
+
from ms_pred.glacier.joint_model import JointModel
|
| 91 |
+
from dataset_all import AllConditionDataset
|
| 92 |
+
|
| 93 |
+
config = json.loads(args.config.read_text())
|
| 94 |
+
for item in args.override:
|
| 95 |
+
key, value = item.split('=', 1)
|
| 96 |
+
config[key] = json.loads(value)
|
| 97 |
+
manifest_path = args.data_root / 'manifest.json'
|
| 98 |
+
source_digest = hashlib.sha256()
|
| 99 |
+
for path in sorted((source / 'ms_pred').rglob('*.py')):
|
| 100 |
+
source_digest.update(str(path.relative_to(source)).encode())
|
| 101 |
+
source_digest.update(path.read_bytes())
|
| 102 |
+
identity = {
|
| 103 |
+
'initialization': 'random' if not args.init else f'own-checkpoint:{sha256(args.init)}',
|
| 104 |
+
'data_manifest_sha256': sha256(manifest_path), 'subset': args.subset,
|
| 105 |
+
'config': config, 'source_sha256': source_digest.hexdigest(), 'seed': args.seed,
|
| 106 |
+
'batch_size': args.batch_size, 'ema_decay': args.ema_decay, 'limit_train': args.limit_train,
|
| 107 |
+
'trainer': 'allcond-plain-loop-v1',
|
| 108 |
+
}
|
| 109 |
+
if args.loss_precursor_window is not None:
|
| 110 |
+
identity['loss_precursor_window'] = args.loss_precursor_window
|
| 111 |
+
if args.decoys:
|
| 112 |
+
identity['contrastive'] = {
|
| 113 |
+
'decoys_sha256': sha256(args.decoys), 'num_decoys': args.num_decoys, 'mutation_rate': args.mutation_rate,
|
| 114 |
+
'weight': args.contr_weight, 'loss': args.contr_loss, 'tau': args.contr_tau,
|
| 115 |
+
'threshold': args.contr_threshold, 'window': args.contr_window, 'power': args.contr_power,
|
| 116 |
+
'topk': args.contr_topk,
|
| 117 |
+
}
|
| 118 |
+
if args.synth:
|
| 119 |
+
if args.decoys:
|
| 120 |
+
raise ValueError('--synth and --decoys are exclusive')
|
| 121 |
+
identity['synthetic'] = {
|
| 122 |
+
'manifest_sha256': sha256(args.synth / 'manifest.json'), 'per_item': args.synth_per_item,
|
| 123 |
+
'weight': args.synth_weight, 'schedule': args.synth_schedule, 'instrument': args.synth_instrument,
|
| 124 |
+
}
|
| 125 |
+
if args.fork:
|
| 126 |
+
if args.init:
|
| 127 |
+
raise ValueError('--fork and --init are exclusive')
|
| 128 |
+
identity['initialization'] = f'own-checkpoint:{sha256(args.fork)}'
|
| 129 |
+
identity['fork'] = str(args.fork)
|
| 130 |
+
recipe = args.work_dir / 'recipe.json'
|
| 131 |
+
last_path = args.work_dir / 'last.ckpt'
|
| 132 |
+
if recipe.exists() and json.loads(recipe.read_text()) != identity:
|
| 133 |
+
raise ValueError('recipe changed; use a new work directory')
|
| 134 |
+
recipe.write_text(json.dumps(identity, indent=2) + '\n')
|
| 135 |
+
if not (args.work_dir / 'training-source').exists():
|
| 136 |
+
shutil.copytree(Path(__file__).parent, args.work_dir / 'training-source',
|
| 137 |
+
ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
|
| 138 |
+
|
| 139 |
+
random.seed(args.seed)
|
| 140 |
+
np.random.seed(args.seed)
|
| 141 |
+
torch.manual_seed(args.seed)
|
| 142 |
+
torch.cuda.manual_seed_all(args.seed)
|
| 143 |
+
|
| 144 |
+
train = AllConditionDataset(args.data_root, 'train', config, subset=args.subset, limit=args.limit_train)
|
| 145 |
+
validation = AllConditionDataset(args.data_root, 'validation', config, subset=args.subset,
|
| 146 |
+
limit=args.validation_rows)
|
| 147 |
+
model = JointModel(**dict(config, node_feats=train.processor.get_node_feats(),
|
| 148 |
+
edge_feats=train.processor.get_edge_feats()))
|
| 149 |
+
logged = {}
|
| 150 |
+
model.log = lambda name, value, **kwargs: logged.__setitem__(name, float(value))
|
| 151 |
+
if args.init:
|
| 152 |
+
saved = torch.load(args.init, map_location='cpu', weights_only=False)
|
| 153 |
+
if saved.get('task_training', {}).get('pretrained_assets', []) != []:
|
| 154 |
+
raise ValueError('warm start must come from our own random-initialized train-fold run')
|
| 155 |
+
model.load_state_dict(saved['state_dict'])
|
| 156 |
+
if args.loss_precursor_window is not None:
|
| 157 |
+
full_loss, precursor_window = model.inten_loss_fn, float(args.loss_precursor_window)
|
| 158 |
+
|
| 159 |
+
def fragment_loss(pred, targ, parent_mass=None, use_hun=False):
|
| 160 |
+
# compare fragment regions only; spectra without any fragment target keep the full comparison
|
| 161 |
+
limit = parent_mass.view(-1, 1).to(pred.dtype) - precursor_window
|
| 162 |
+
targ_low = targ[:, :, 0] < limit
|
| 163 |
+
full = ~((targ_low & (targ[:, :, 1] > 0)).any(dim=1, keepdim=True))
|
| 164 |
+
targ_inten = torch.where(targ_low | full, targ[:, :, 1], torch.zeros_like(targ[:, :, 1]))
|
| 165 |
+
pred_inten = torch.where((pred[:, :, 0] < limit) | full, pred[:, :, 1], torch.zeros_like(pred[:, :, 1]))
|
| 166 |
+
return full_loss(torch.stack([pred[:, :, 0], pred_inten], dim=-1),
|
| 167 |
+
torch.stack([targ[:, :, 0], targ_inten], dim=-1), parent_mass=parent_mass, use_hun=use_hun)
|
| 168 |
+
|
| 169 |
+
model.inten_loss_fn = fragment_loss
|
| 170 |
+
contrast, train_items, train_collate = None, train, train.collate_fn
|
| 171 |
+
if args.decoys:
|
| 172 |
+
from contrastive import ContrastiveDataset, ContrastiveStep, collate_contrastive
|
| 173 |
+
from fastfeat import expand_graphormer
|
| 174 |
+
train_items = ContrastiveDataset(train, args.data_root, args.decoys, num_decoys=args.num_decoys,
|
| 175 |
+
mutation_rate=args.mutation_rate, seed=args.seed)
|
| 176 |
+
train_collate = collate_contrastive
|
| 177 |
+
contrast = ContrastiveStep(model, weight=args.contr_weight, kind=args.contr_loss, tau=args.contr_tau,
|
| 178 |
+
threshold=args.contr_threshold,
|
| 179 |
+
window=args.contr_window if args.contr_window >= 0 else None,
|
| 180 |
+
power=args.contr_power, topk=args.contr_topk)
|
| 181 |
+
synth_step = None
|
| 182 |
+
if args.synth:
|
| 183 |
+
from synth import SynthMixDataset, SynthStep, collate_synth
|
| 184 |
+
from fastfeat import expand_graphormer
|
| 185 |
+
train_items = SynthMixDataset(train, args.synth, per_item=args.synth_per_item, seed=args.seed,
|
| 186 |
+
instrument=args.synth_instrument)
|
| 187 |
+
train_collate = collate_synth
|
| 188 |
+
synth_step = SynthStep(model, weight=args.synth_weight, schedule=args.synth_schedule)
|
| 189 |
+
device = torch.device('cuda')
|
| 190 |
+
model.to(device)
|
| 191 |
+
optim_config = model.configure_optimizers()
|
| 192 |
+
optimizer = optim_config['optimizer']
|
| 193 |
+
scheduler = optim_config['lr_scheduler']['scheduler']
|
| 194 |
+
ema = {k: v.detach().clone() for k, v in model.state_dict().items() if v.dtype.is_floating_point}
|
| 195 |
+
|
| 196 |
+
state = {'step': 0, 'epoch': 0, 'batch_in_epoch': 0, 'elapsed': 0.0, 'skipped': 0}
|
| 197 |
+
resume_path = last_path if last_path.exists() else args.fork
|
| 198 |
+
if resume_path is not None and resume_path.exists():
|
| 199 |
+
saved = torch.load(resume_path, map_location='cpu', weights_only=False)
|
| 200 |
+
if resume_path != last_path and saved['identity'].get('initialization') != 'random' \
|
| 201 |
+
and not str(saved['identity'].get('initialization')).startswith('own-checkpoint:'):
|
| 202 |
+
raise ValueError('fork source must be one of our own train-fold runs')
|
| 203 |
+
model.load_state_dict(saved['state_dict'])
|
| 204 |
+
optimizer.load_state_dict(saved['optimizer'])
|
| 205 |
+
scheduler.load_state_dict(saved['scheduler'])
|
| 206 |
+
ema = {k: v.to(device) for k, v in saved['ema_state_dict'].items()}
|
| 207 |
+
state = saved['loop_state']
|
| 208 |
+
model.step = saved['magma_step']
|
| 209 |
+
print(json.dumps({'event': 'resumed', 'source': str(resume_path), **state}), flush=True)
|
| 210 |
+
|
| 211 |
+
class EpochSampler(Sampler):
|
| 212 |
+
"""Deterministic per-epoch permutation that can restart mid-epoch."""
|
| 213 |
+
|
| 214 |
+
def __init__(self, size, epoch, start):
|
| 215 |
+
self.size, self.epoch, self.start = size, epoch, start
|
| 216 |
+
|
| 217 |
+
def __iter__(self):
|
| 218 |
+
generator = torch.Generator().manual_seed(args.seed * 1000003 + self.epoch)
|
| 219 |
+
order = torch.randperm(self.size, generator=generator).tolist()
|
| 220 |
+
usable = (self.size // args.batch_size) * args.batch_size
|
| 221 |
+
return iter(order[self.start * args.batch_size:usable])
|
| 222 |
+
|
| 223 |
+
def __len__(self):
|
| 224 |
+
return (self.size // args.batch_size) * args.batch_size - self.start * args.batch_size
|
| 225 |
+
|
| 226 |
+
def loader_for(epoch, start):
|
| 227 |
+
if contrast is not None or synth_step is not None:
|
| 228 |
+
train_items.epoch = epoch
|
| 229 |
+
return DataLoader(train_items, batch_size=args.batch_size, sampler=EpochSampler(len(train), epoch, start),
|
| 230 |
+
num_workers=args.workers, collate_fn=train_collate, drop_last=True,
|
| 231 |
+
multiprocessing_context='spawn' if args.workers else None,
|
| 232 |
+
prefetch_factor=4 if args.workers else None,
|
| 233 |
+
worker_init_fn=functools.partial(seed_worker, args.seed * 7919 + epoch * 131))
|
| 234 |
+
|
| 235 |
+
def to_device(batch):
|
| 236 |
+
out = {}
|
| 237 |
+
for key, value in batch.items():
|
| 238 |
+
if torch.is_tensor(value):
|
| 239 |
+
out[key] = value.to(device, non_blocking=True)
|
| 240 |
+
elif isinstance(value, dict):
|
| 241 |
+
out[key] = to_device(value)
|
| 242 |
+
else:
|
| 243 |
+
out[key] = value
|
| 244 |
+
return out
|
| 245 |
+
|
| 246 |
+
validation_batches = None
|
| 247 |
+
|
| 248 |
+
def validate(weights=None):
|
| 249 |
+
nonlocal validation_batches
|
| 250 |
+
if validation_batches is None:
|
| 251 |
+
validation_batches = [validation.collate_fn([validation[i] for i in range(s, min(s + 64, len(validation)))])
|
| 252 |
+
for s in range(0, len(validation), 64)]
|
| 253 |
+
backup = None
|
| 254 |
+
if weights is not None:
|
| 255 |
+
backup = {k: v.detach().clone() for k, v in model.state_dict().items() if k in weights}
|
| 256 |
+
model.load_state_dict(weights, strict=False)
|
| 257 |
+
model.eval()
|
| 258 |
+
total, count = 0.0, 0
|
| 259 |
+
with torch.no_grad():
|
| 260 |
+
for batch in validation_batches:
|
| 261 |
+
size = len(batch['names'])
|
| 262 |
+
loss = model.validation_step(to_device(batch), 0)['loss']
|
| 263 |
+
total += float(loss) * size
|
| 264 |
+
count += size
|
| 265 |
+
model.train()
|
| 266 |
+
if backup is not None:
|
| 267 |
+
model.load_state_dict(backup, strict=False)
|
| 268 |
+
return total / max(count, 1)
|
| 269 |
+
|
| 270 |
+
def export(path, weights, kind):
|
| 271 |
+
state_dict = dict(model.state_dict())
|
| 272 |
+
state_dict.update(weights)
|
| 273 |
+
payload = {
|
| 274 |
+
'state_dict': {k: v.detach().cpu() for k, v in state_dict.items()},
|
| 275 |
+
'hyper_parameters': dict(model.hparams), 'global_step': state['step'], 'weights': kind,
|
| 276 |
+
'task_training': dict(identity, elapsed_seconds=state['elapsed'], pretrained_assets=[],
|
| 277 |
+
data='MassSpecGym v1.5 train fold'),
|
| 278 |
+
}
|
| 279 |
+
temporary = Path(str(path) + '.tmp')
|
| 280 |
+
torch.save(payload, temporary)
|
| 281 |
+
os.replace(temporary, path)
|
| 282 |
+
|
| 283 |
+
def save_resume():
|
| 284 |
+
payload = {
|
| 285 |
+
'state_dict': model.state_dict(), 'optimizer': optimizer.state_dict(),
|
| 286 |
+
'scheduler': scheduler.state_dict(), 'ema_state_dict': ema, 'loop_state': state,
|
| 287 |
+
'magma_step': model.step, 'identity': identity,
|
| 288 |
+
}
|
| 289 |
+
temporary = Path(str(last_path) + '.tmp')
|
| 290 |
+
torch.save(payload, temporary)
|
| 291 |
+
os.replace(temporary, last_path)
|
| 292 |
+
|
| 293 |
+
checkpoints = args.work_dir / 'checkpoints'
|
| 294 |
+
checkpoints.mkdir(exist_ok=True)
|
| 295 |
+
print(json.dumps({'parameters': sum(p.numel() for p in model.parameters()), 'train_rows': len(train),
|
| 296 |
+
'validation_rows': len(validation), 'steps_per_epoch': len(train) // args.batch_size,
|
| 297 |
+
'identity': identity['initialization'], 'gpu': torch.cuda.get_device_name()}), flush=True)
|
| 298 |
+
model.train()
|
| 299 |
+
started = time.monotonic()
|
| 300 |
+
base_elapsed = state['elapsed']
|
| 301 |
+
window = []
|
| 302 |
+
done = state['step'] >= args.max_steps
|
| 303 |
+
while not done:
|
| 304 |
+
loader = loader_for(state['epoch'], state['batch_in_epoch'])
|
| 305 |
+
for batch in loader:
|
| 306 |
+
batch = to_device(batch)
|
| 307 |
+
if contrast is not None:
|
| 308 |
+
if 'decoy' in batch:
|
| 309 |
+
batch['decoy']['graphormer_input'] = expand_graphormer(batch['decoy'].pop('graphormer_compact'))
|
| 310 |
+
loss = contrast(batch)
|
| 311 |
+
elif synth_step is not None:
|
| 312 |
+
if 'synth' in batch:
|
| 313 |
+
batch['synth']['graphormer_input'] = expand_graphormer(batch['synth'].pop('graphormer_compact'))
|
| 314 |
+
loss = synth_step(batch, state['step'])
|
| 315 |
+
else:
|
| 316 |
+
loss = model.training_step(batch, state['step'])['loss']
|
| 317 |
+
if not torch.isfinite(loss):
|
| 318 |
+
state['skipped'] += 1
|
| 319 |
+
optimizer.zero_grad(set_to_none=True)
|
| 320 |
+
else:
|
| 321 |
+
optimizer.zero_grad(set_to_none=True)
|
| 322 |
+
loss.backward()
|
| 323 |
+
torch.nn.utils.clip_grad_value_(model.parameters(), 5)
|
| 324 |
+
optimizer.step()
|
| 325 |
+
window.append(float(loss))
|
| 326 |
+
scheduler.step()
|
| 327 |
+
state['step'] += 1
|
| 328 |
+
state['batch_in_epoch'] += 1
|
| 329 |
+
with torch.no_grad():
|
| 330 |
+
decay = min(args.ema_decay, (1 + state['step']) / (10 + state['step']))
|
| 331 |
+
for key, value in model.state_dict().items():
|
| 332 |
+
if key in ema:
|
| 333 |
+
ema[key].mul_(decay).add_(value.detach(), alpha=1 - decay)
|
| 334 |
+
state['elapsed'] = base_elapsed + time.monotonic() - started
|
| 335 |
+
step = state['step']
|
| 336 |
+
if step % 100 == 0:
|
| 337 |
+
record = {'step': step, 'epoch': state['epoch'], 'elapsed_seconds': state['elapsed'],
|
| 338 |
+
'train_loss': float(np.mean(window)) if window else None,
|
| 339 |
+
'lr': scheduler.get_last_lr()[0], 'magma_weight': model.magma_weight_scheduler(),
|
| 340 |
+
'skipped': state['skipped'], 'metrics': dict(logged)}
|
| 341 |
+
window = []
|
| 342 |
+
with (args.work_dir / 'metrics.jsonl').open('a') as f:
|
| 343 |
+
f.write(json.dumps(record) + '\n')
|
| 344 |
+
if step % args.validate_every == 0 or step == args.max_steps:
|
| 345 |
+
record = {'step': step, 'elapsed_seconds': state['elapsed'], 'validation_loss': validate(),
|
| 346 |
+
'validation_loss_ema': validate(ema)}
|
| 347 |
+
print(json.dumps(record), flush=True)
|
| 348 |
+
with (args.work_dir / 'validation.jsonl').open('a') as f:
|
| 349 |
+
f.write(json.dumps(record) + '\n')
|
| 350 |
+
if step % args.checkpoint_every == 0 or step == args.max_steps:
|
| 351 |
+
export(checkpoints / f'step-{step:07d}.ckpt', {}, 'raw')
|
| 352 |
+
export(checkpoints / f'step-{step:07d}-ema.ckpt', ema, 'ema')
|
| 353 |
+
if step % args.resume_every == 0 or step == args.max_steps:
|
| 354 |
+
save_resume()
|
| 355 |
+
if step >= args.max_steps or state['elapsed'] >= args.max_seconds:
|
| 356 |
+
done = True
|
| 357 |
+
break
|
| 358 |
+
else:
|
| 359 |
+
state['epoch'] += 1
|
| 360 |
+
state['batch_in_epoch'] = 0
|
| 361 |
+
del loader
|
| 362 |
+
save_resume()
|
| 363 |
+
(args.work_dir / 'result.json').write_text(json.dumps({
|
| 364 |
+
'global_step': state['step'], 'elapsed_seconds': state['elapsed'], 'skipped_batches': state['skipped'],
|
| 365 |
+
'hardware': torch.cuda.get_device_name(),
|
| 366 |
+
'peak_cuda_allocated_bytes': torch.cuda.max_memory_allocated(),
|
| 367 |
+
}, indent=2) + '\n')
|
| 368 |
+
|
| 369 |
+
|
| 370 |
+
if __name__ == '__main__':
|
| 371 |
+
main()
|
shared/package-files/75/75a4f93f95b85ff5388ef21c1eeaa788e8ece72ef666c843530028f7c82eabad/e73-store-real-validation.log
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "allcond-inverse-real/v1",
|
| 3 |
+
"fold": "validation",
|
| 4 |
+
"spectra": 19429,
|
| 5 |
+
"structures": 3386,
|
| 6 |
+
"skipped": {
|
| 7 |
+
"structure": 0,
|
| 8 |
+
"adduct": 0
|
| 9 |
+
},
|
| 10 |
+
"ppm": 20.0,
|
| 11 |
+
"floor": 0.004,
|
| 12 |
+
"max_peaks": 48,
|
| 13 |
+
"mean_selected_peaks": 25.164084615780535,
|
| 14 |
+
"mean_annotated_peaks": 18.12532811776211,
|
| 15 |
+
"no_annotated_peak": 20,
|
| 16 |
+
"mean_explained_intensity": 0.8726378016248633,
|
| 17 |
+
"source_sha256": "26788b56a3cb9d19c265c925504a4ce4e77e4c6b65b2a11068be6f24d15bf70f",
|
| 18 |
+
"sha256": "4c0dec880ce9abc3419fabbb4b8d501fa4858c972c748fe6c03ade121918efc9",
|
| 19 |
+
"elapsed_seconds": 1.9333453039871529
|
| 20 |
+
}
|
shared/package-files/7c/7cf300e8d128316f3531a381d6e0cf81481efe9217b1c01a28a078b8628e2611/eval-score-N5-recur-mop-10.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 5 members, 151.7 s
|
| 2 |
+
cos pool rule all=0.6373 dom=0.8503 non=0.4235 h5=0.7486 macro=0.7348
|
| 3 |
+
cen pool rule all=0.6204 dom=0.8281 non=0.4119 h5=0.7458 macro=0.7103
|
| 4 |
+
cos_pm pool rule all=0.6387 dom=0.8478 non=0.4288 h5=0.7492 macro=0.7333
|
| 5 |
+
dot pool rule all=0.6437 dom=0.8113 non=0.4754 h5=0.7768 macro=0.7194
|
| 6 |
+
geo pool rule all=0.6299 dom=0.8336 non=0.4255 h5=0.7402 macro=0.7212
|
| 7 |
+
idf05 pool rule all=0.6400 dom=0.8470 non=0.4321 h5=0.7617 macro=0.7327
|
| 8 |
+
idf1 pool rule all=0.6367 dom=0.8481 non=0.4245 h5=0.7638 macro=0.7327
|
| 9 |
+
lin pool rule all=0.6058 dom=0.8006 non=0.4103 h5=0.7239 macro=0.6929
|
| 10 |
+
log01 pool rule all=0.6548 dom=0.8419 non=0.4670 h5=0.7800 macro=0.7277
|
| 11 |
+
log05 pool rule all=0.6716 dom=0.8547 non=0.4878 h5=0.7903 macro=0.7383
|
| 12 |
+
log20 pool rule all=0.6398 dom=0.8566 non=0.4222 h5=0.7573 macro=0.7404
|
| 13 |
+
nll02 pool rule all=0.5049 dom=0.7335 non=0.2754 h5=0.6406 macro=0.6063
|
| 14 |
+
nll10 pool rule all=0.4476 dom=0.6822 non=0.2121 h5=0.6114 macro=0.5540
|
| 15 |
+
poolcen pool rule all=0.6179 dom=0.8197 non=0.4153 h5=0.7570 macro=0.7123
|
| 16 |
+
pow020 pool rule all=0.6036 dom=0.8127 non=0.3936 h5=0.7745 macro=0.7050
|
| 17 |
+
pow030 pool rule all=0.6170 dom=0.8254 non=0.4077 h5=0.7702 macro=0.7126
|
| 18 |
+
pow040 pool rule all=0.6586 dom=0.8395 non=0.4768 h5=0.7800 macro=0.7274
|
| 19 |
+
pow05 pool rule all=0.6717 dom=0.8505 non=0.4921 h5=0.7924 macro=0.7342
|
| 20 |
+
pow05idf025 pool rule all=0.6709 dom=0.8521 non=0.4889 h5=0.7959 macro=0.7372
|
| 21 |
+
pow05idf05 pool rule all=0.6698 dom=0.8523 non=0.4866 h5=0.7993 macro=0.7374
|
| 22 |
+
pow05m pool rule all=0.6706 dom=0.8517 non=0.4888 h5=0.7902 macro=0.7333
|
| 23 |
+
pow05s pool rule all=0.6715 dom=0.8497 non=0.4925 h5=0.7859 macro=0.7333
|
| 24 |
+
pow060 pool rule all=0.6434 dom=0.8542 non=0.4318 h5=0.7625 macro=0.7395
|
| 25 |
+
pow060idf025 pool rule all=0.6405 dom=0.8519 non=0.4284 h5=0.7699 macro=0.7357
|
| 26 |
+
pow060idf050 pool rule all=0.6726 dom=0.8543 non=0.4900 h5=0.7954 macro=0.7398
|
| 27 |
+
pow060m pool rule all=0.6382 dom=0.8547 non=0.4207 h5=0.7584 macro=0.7374
|
| 28 |
+
pow065 pool rule all=0.6440 dom=0.8551 non=0.4320 h5=0.7613 macro=0.7389
|
| 29 |
+
pow070 pool rule all=0.6434 dom=0.8543 non=0.4316 h5=0.7578 macro=0.7389
|
| 30 |
+
pow070idf025 pool rule all=0.6395 dom=0.8500 non=0.4282 h5=0.7589 macro=0.7377
|
| 31 |
+
pow070idf050 pool rule all=0.6440 dom=0.8511 non=0.4361 h5=0.7659 macro=0.7380
|
| 32 |
+
pow070m pool rule all=0.6415 dom=0.8559 non=0.4262 h5=0.7554 macro=0.7389
|
| 33 |
+
pow075 pool rule all=0.6389 dom=0.8488 non=0.4282 h5=0.7542 macro=0.7369
|
| 34 |
+
pow080 pool rule all=0.6361 dom=0.8476 non=0.4237 h5=0.7515 macro=0.7345
|
| 35 |
+
pow080m pool rule all=0.6381 dom=0.8517 non=0.4236 h5=0.7499 macro=0.7369
|
| 36 |
+
pow085 pool rule all=0.6362 dom=0.8470 non=0.4244 h5=0.7491 macro=0.7342
|
| 37 |
+
pow085idf025 pool rule all=0.6385 dom=0.8492 non=0.4270 h5=0.7569 macro=0.7360
|
| 38 |
+
pow085idf050 pool rule all=0.6405 dom=0.8520 non=0.4282 h5=0.7626 macro=0.7363
|
| 39 |
+
pow090 pool rule all=0.6373 dom=0.8469 non=0.4268 h5=0.7490 macro=0.7342
|
| 40 |
+
pow2 pool rule all=0.6021 dom=0.8090 non=0.3944 h5=0.7278 macro=0.7047
|
| 41 |
+
tani pool rule all=0.6097 dom=0.8257 non=0.3928 h5=0.7489 macro=0.7147
|
shared/package-files/93/93355d7b360441f5ecd9b3cb24b5c389ef9a69d901c4f0f60c5cd3ca863ace0d/inv-pool-strata.log
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
pools | all (3386) | domain only (2153) | mixed (254) | other only (979) | other only < 850 (831) | other only >= 850 (148)
|
| 2 |
+
I16 | 0.7289 | 0.8291 | 0.7008 | 0.5158 | 0.5572 | 0.2838
|
| 3 |
+
I18 | 0.7295 | 0.8291 | 0.7283 | 0.5107 | 0.5535 | 0.2703
|
| 4 |
+
I19 | 0.7224 | 0.8258 | 0.7087 | 0.4985 | 0.5355 | 0.2905
|
| 5 |
+
I20 | 0.7215 | 0.8268 | 0.7087 | 0.4934 | 0.5355 | 0.2568
|
| 6 |
+
I21 | 0.7212 | 0.8240 | 0.6890 | 0.5036 | 0.5487 | 0.2500
|
| 7 |
+
I22 | 0.7197 | 0.8263 | 0.6732 | 0.4974 | 0.5367 | 0.2770
|
| 8 |
+
I25 | 0.7044 | 0.8012 | 0.6575 | 0.5036 | 0.5439 | 0.2770
|
| 9 |
+
I23 | 0.7259 | 0.8281 | 0.7362 | 0.4985 | 0.5391 | 0.2703
|
| 10 |
+
I24 | 0.7097 | 0.8170 | 0.6732 | 0.4831 | 0.5211 | 0.2703
|
| 11 |
+
N5 | 0.7357 | 0.8360 | 0.7087 | 0.5220 | 0.5704 | 0.2500
|
| 12 |
+
I14 | 0.7132 | 0.8216 | 0.6732 | 0.4852 | 0.5295 | 0.2365
|
shared/package-files/93/93356a643cbdd9fba86186125a89b55bda768140821198c6378c5aef321ac800/eval-score-I16+I17.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 2 members, 68.8 s
|
| 2 |
+
cos pool rule all=0.6003 dom=0.8409 non=0.3588 h5=0.7008 macro=0.7194
|
| 3 |
+
cen pool rule all=0.5749 dom=0.8124 non=0.3365 h5=0.6960 macro=0.6961
|
| 4 |
+
cos_pm pool rule all=0.5995 dom=0.8399 non=0.3581 h5=0.7047 macro=0.7180
|
| 5 |
+
dot pool rule all=0.5787 dom=0.8027 non=0.3539 h5=0.7140 macro=0.7050
|
| 6 |
+
geo pool rule all=0.5722 dom=0.8251 non=0.3182 h5=0.6903 macro=0.7050
|
| 7 |
+
idf05 pool rule all=0.6020 dom=0.8360 non=0.3671 h5=0.7125 macro=0.7203
|
| 8 |
+
idf1 pool rule all=0.6050 dom=0.8354 non=0.3736 h5=0.7205 macro=0.7215
|
| 9 |
+
lin pool rule all=0.5575 dom=0.7901 non=0.3240 h5=0.6812 macro=0.6766
|
| 10 |
+
log01 pool rule all=0.5913 dom=0.8268 non=0.3548 h5=0.7273 macro=0.7141
|
| 11 |
+
log05 pool rule all=0.6056 dom=0.8421 non=0.3682 h5=0.7197 macro=0.7245
|
| 12 |
+
log20 pool rule all=0.6019 dom=0.8445 non=0.3584 h5=0.7135 macro=0.7221
|
| 13 |
+
nll02 pool rule all=0.4479 dom=0.7168 non=0.1780 h5=0.5869 macro=0.5856
|
| 14 |
+
nll10 pool rule all=0.4169 dom=0.6652 non=0.1676 h5=0.5418 macro=0.5384
|
| 15 |
+
poolcen pool rule all=0.5776 dom=0.8078 non=0.3465 h5=0.7073 macro=0.6967
|
| 16 |
+
pow020 pool rule all=0.5669 dom=0.7998 non=0.3332 h5=0.7168 macro=0.6911
|
| 17 |
+
pow030 pool rule all=0.5834 dom=0.8167 non=0.3490 h5=0.7230 macro=0.7011
|
| 18 |
+
pow040 pool rule all=0.5923 dom=0.8246 non=0.3589 h5=0.7282 macro=0.7118
|
| 19 |
+
pow05 pool rule all=0.6004 dom=0.8320 non=0.3678 h5=0.7244 macro=0.7188
|
| 20 |
+
pow05idf025 pool rule all=0.6019 dom=0.8385 non=0.3643 h5=0.7246 macro=0.7224
|
| 21 |
+
pow05idf05 pool rule all=0.6011 dom=0.8388 non=0.3625 h5=0.7329 macro=0.7236
|
| 22 |
+
pow05m pool rule all=0.6008 dom=0.8340 non=0.3667 h5=0.7240 macro=0.7194
|
| 23 |
+
pow05s pool rule all=0.6031 dom=0.8411 non=0.3641 h5=0.7154 macro=0.7191
|
| 24 |
+
pow060 pool rule all=0.6045 dom=0.8413 non=0.3668 h5=0.7181 macro=0.7242
|
| 25 |
+
pow060idf025 pool rule all=0.6087 dom=0.8508 non=0.3657 h5=0.7215 macro=0.7271
|
| 26 |
+
pow060idf050 pool rule all=0.6075 dom=0.8496 non=0.3645 h5=0.7295 macro=0.7283
|
| 27 |
+
pow060m pool rule all=0.6038 dom=0.8421 non=0.3645 h5=0.7173 macro=0.7253
|
| 28 |
+
pow065 pool rule all=0.6053 dom=0.8426 non=0.3670 h5=0.7158 macro=0.7224
|
| 29 |
+
pow070 pool rule all=0.6028 dom=0.8422 non=0.3625 h5=0.7127 macro=0.7209
|
| 30 |
+
pow070idf025 pool rule all=0.6071 dom=0.8489 non=0.3644 h5=0.7176 macro=0.7245
|
| 31 |
+
pow070idf050 pool rule all=0.6043 dom=0.8472 non=0.3604 h5=0.7234 macro=0.7239
|
| 32 |
+
pow070m pool rule all=0.6026 dom=0.8424 non=0.3617 h5=0.7142 macro=0.7215
|
| 33 |
+
pow075 pool rule all=0.6036 dom=0.8432 non=0.3630 h5=0.7147 macro=0.7230
|
| 34 |
+
pow080 pool rule all=0.6024 dom=0.8414 non=0.3625 h5=0.7109 macro=0.7218
|
| 35 |
+
pow080m pool rule all=0.5993 dom=0.8410 non=0.3566 h5=0.7102 macro=0.7206
|
| 36 |
+
pow085 pool rule all=0.6009 dom=0.8427 non=0.3581 h5=0.7078 macro=0.7206
|
| 37 |
+
pow085idf025 pool rule all=0.6049 dom=0.8421 non=0.3667 h5=0.7109 macro=0.7209
|
| 38 |
+
pow085idf050 pool rule all=0.6028 dom=0.8394 non=0.3652 h5=0.7188 macro=0.7212
|
| 39 |
+
pow090 pool rule all=0.6004 dom=0.8418 non=0.3580 h5=0.7066 macro=0.7191
|
| 40 |
+
pow2 pool rule all=0.5689 dom=0.8066 non=0.3304 h5=0.6896 macro=0.6920
|
| 41 |
+
tani pool rule all=0.5794 dom=0.8150 non=0.3430 h5=0.7057 macro=0.7017
|
shared/package-files/93/934b804bda1e0387c4be73816a4bfcef9dda4e1f50a3af300746b49a84e4c801/dataset_all.py
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""All-condition MAGMa supervision for native GLACIER featurization.
|
| 2 |
+
|
| 3 |
+
Rows come from ``prepare_all.py``. Unlike the starter dataset, a missing
|
| 4 |
+
instrument maps to ms-pred's native ``Unknown`` class and a missing collision
|
| 5 |
+
energy is passed as NaN (ms-pred's native missing-energy embedding).
|
| 6 |
+
"""
|
| 7 |
+
|
| 8 |
+
import json
|
| 9 |
+
import math
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
import sqlite3
|
| 12 |
+
|
| 13 |
+
from torch.utils.data import Dataset
|
| 14 |
+
from ms_pred import common
|
| 15 |
+
from ms_pred.glacier.dataset import IntenDataset, TreeProcessor
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
def is_released_domain(row):
|
| 19 |
+
energy = row.get('collision_energy')
|
| 20 |
+
return (row['adduct'] == '[M+H]+' and isinstance(energy, (int, float))
|
| 21 |
+
and math.isfinite(energy) and row['instrument_type'] in {'Orbitrap', 'QTOF'})
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def instrument_index(name):
|
| 25 |
+
return common.instrument2onehot_pos.get(name or 'Unknown', common.instrument2onehot_pos['Unknown'])
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
class AllConditionDataset(Dataset):
|
| 29 |
+
def __init__(self, root, split, model_config, subset='all', limit=None):
|
| 30 |
+
if split not in {'train', 'validation'}:
|
| 31 |
+
raise ValueError('only train and validation are development inputs')
|
| 32 |
+
root = Path(root).resolve()
|
| 33 |
+
rows = []
|
| 34 |
+
with (root / f'{split}.jsonl').open() as stream:
|
| 35 |
+
for line in stream:
|
| 36 |
+
row = json.loads(line)
|
| 37 |
+
released = is_released_domain(row)
|
| 38 |
+
if subset == 'released' and not released:
|
| 39 |
+
continue
|
| 40 |
+
if subset == 'other' and released:
|
| 41 |
+
continue
|
| 42 |
+
# keep only light metadata: spectra live in the target payload
|
| 43 |
+
rows.append({'query_id': row['query_id'], 'adduct': row['adduct'],
|
| 44 |
+
'instrument_type': row['instrument_type'],
|
| 45 |
+
'precursor_mz': row['precursor_mz'], 'released': released})
|
| 46 |
+
self.rows = rows[:limit] if limit else rows
|
| 47 |
+
self.database = root / 'targets.sqlite'
|
| 48 |
+
self.connection = None
|
| 49 |
+
self.processor = TreeProcessor(
|
| 50 |
+
pe_embed_k=model_config['pe_embed_k'], root_encode='graphormer',
|
| 51 |
+
embed_elem_group=model_config['embed_elem_group'],
|
| 52 |
+
multi_hop_max_dist=model_config['multi_hop_max_dist'],
|
| 53 |
+
)
|
| 54 |
+
|
| 55 |
+
def __getstate__(self):
|
| 56 |
+
return dict(self.__dict__, connection=None)
|
| 57 |
+
|
| 58 |
+
def __len__(self):
|
| 59 |
+
return len(self.rows)
|
| 60 |
+
|
| 61 |
+
def __getitem__(self, index):
|
| 62 |
+
if self.connection is None:
|
| 63 |
+
self.connection = sqlite3.connect(self.database.as_uri() + '?mode=ro', uri=True)
|
| 64 |
+
row = self.rows[index]
|
| 65 |
+
result = self.connection.execute('SELECT payload FROM targets WHERE query_id=?', (row['query_id'],)).fetchone()
|
| 66 |
+
if result is None or result[0] is None:
|
| 67 |
+
raise ValueError('missing prepared supervision')
|
| 68 |
+
tree = json.loads(result[0])
|
| 69 |
+
if tree.get('collision_energy') in (None, 'nan'):
|
| 70 |
+
tree['collision_energy'] = float('nan')
|
| 71 |
+
item = self.processor.featurize_tree(tree)
|
| 72 |
+
item.update(name=row['query_id'], adduct=common.ion2onehot_pos[row['adduct']],
|
| 73 |
+
instrument=instrument_index(row['instrument_type']),
|
| 74 |
+
precursor=row['precursor_mz'])
|
| 75 |
+
return item
|
| 76 |
+
|
| 77 |
+
collate_fn = staticmethod(IntenDataset.collate_fn)
|
shared/package-files/93/9352c4e7d7af5238ccfb70c06597c1e117aa2489a28a318dccc5e459fe864cfc/replay-B20k+B30k-I1-50k-val-sub.log
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
reloc
|
| 2 |
+
reloc2
|
| 3 |
+
reloc3
|
| 4 |
+
reloc4
|
| 5 |
+
/opt/glacier/lib/python3.11/site-packages/torch/nn/modules/transformer.py:508: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. We recommend specifying layout=torch.jagged when constructing a nested tensor, as this layout receives active develo
|
| 6 |
+
output = torch._nested_tensor_from_mask(
|
| 7 |
+
{"event": "simulating", "finished": 64000, "total": 295422, "seconds": 402.3761534569785, "per_second": 159.0551513804925}
|
| 8 |
+
{"event": "simulating", "finished": 128000, "total": 295422, "seconds": 880.0155879409285, "per_second": 145.45196898102225}
|
| 9 |
+
{"event": "simulating", "finished": 192000, "total": 295422, "seconds": 1195.0014332679566, "per_second": 160.66926336225373}
|
| 10 |
+
{"event": "simulating", "finished": 256000, "total": 295422, "seconds": 1676.3089701608988, "per_second": 152.71647682910634}
|
| 11 |
+
{"event": "simulated", "finished": 295422, "total": 295422, "failed": 0, "seconds": 2013.4490474959603}
|
| 12 |
+
{"event": "finished", "queries": 2147, "unscored": 0, "directly_scored": 2147, "scoring_seconds": 25.9191494329134, "total_seconds": 2076.9211527400184}
|
| 13 |
+
|
| 14 |
+
real 34m38.615s
|
| 15 |
+
user 52m47.035s
|
| 16 |
+
sys 0m33.758s
|
| 17 |
+
|
| 18 |
+
[exited with code 0]
|
shared/package-files/93/93e3bd183a2c73f60c7d014cc0ba3f6c0e33353d079873b4416ef58a826a3aee/ce-jitter-fused-B30k.log
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
718 pools; 2436 queries; jittered members: B30k=evals/tta-B30k-x scales ['0.8', '1.25']
|
| 2 |
+
forward B20k alone, recorded energy 0.8444 (pool macro 0.8524)
|
| 3 |
+
forward B20k alone, jitter mean 0.8444 (pool macro 0.8524) | +0.0000 [+0.0000,+0.0000] pools gained 0 lost 0
|
| 4 |
+
forward B30k alone, recorded energy 0.8247 (pool macro 0.8454)
|
| 5 |
+
forward B30k alone, jitter mean 0.8333 (pool macro 0.8524) | +0.0086 [+0.0024,+0.0161] pools gained 10 lost 5
|
| 6 |
+
forward pair, recorded energy 0.8461 (pool macro 0.8579)
|
| 7 |
+
forward pair, jitter mean 0.8571 (pool macro 0.8649) | +0.0111 [+0.0013,+0.0243] pools gained 7 lost 2
|
| 8 |
+
fused (released rule), recorded energy 0.9183 (pool macro 0.9234)
|
| 9 |
+
fused (released rule), jitter mean 0.9158 (pool macro 0.9192) | -0.0025 [-0.0058,+0.0000] pools gained 0 lost 3
|
| 10 |
+
fused, domain weight 0.5, recorded energy 0.9122 (pool macro 0.9164) | -0.0062 [-0.0139,+0.0016] pools gained 3 lost 8
|
| 11 |
+
fused, domain weight 0.5, jitter mean 0.9109 (pool macro 0.9150) | -0.0074 [-0.0154,+0.0004] pools gained 3 lost 9
|
| 12 |
+
fused, domain weight 1.0, recorded energy 0.9130 (pool macro 0.9164) | -0.0053 [-0.0106,-0.0012] pools gained 0 lost 5
|
| 13 |
+
fused, domain weight 1.0, jitter mean 0.9126 (pool macro 0.9164) | -0.0057 [-0.0115,-0.0012] pools gained 1 lost 6
|
shared/package-files/a5/a535d77b8ebc5ee1cd2b998a0eae5cd64daea829ff52d893e59d012178cc519d/publish.py
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Build, release and document the GLACIER all-condition retrieval package.
|
| 3 |
+
|
| 4 |
+
``build`` assembles one complete, standalone package directory (used for the
|
| 5 |
+
relocated validation replay).
|
| 6 |
+
``release`` copies a validated build byte-for-byte into a new immutable
|
| 7 |
+
generation of the submission and switches the manifest atomically.
|
| 8 |
+
``records`` copies EXPERIMENTS.md and research records (file-by-file, each
|
| 9 |
+
file replaced atomically) into the submission root.
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
import argparse
|
| 13 |
+
import hashlib
|
| 14 |
+
import json
|
| 15 |
+
import os
|
| 16 |
+
from pathlib import Path
|
| 17 |
+
import shutil
|
| 18 |
+
import sys
|
| 19 |
+
|
| 20 |
+
HERE = Path(__file__).resolve().parent
|
| 21 |
+
RESEARCH = HERE.parent
|
| 22 |
+
|
| 23 |
+
|
| 24 |
+
def sha256(path):
|
| 25 |
+
h = hashlib.sha256()
|
| 26 |
+
with Path(path).open('rb') as f:
|
| 27 |
+
for block in iter(lambda: f.read(1024 * 1024), b''):
|
| 28 |
+
h.update(block)
|
| 29 |
+
return h.hexdigest()
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
INFER_SH = '''#!/usr/bin/env bash
|
| 33 |
+
set -euo pipefail
|
| 34 |
+
package_root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
| 35 |
+
scratch="$(mktemp -d)"
|
| 36 |
+
trap 'rm -rf "$scratch"' EXIT
|
| 37 |
+
export PYTHONDONTWRITEBYTECODE=1 DGLBACKEND=pytorch MPLCONFIGDIR="$scratch/mpl" NUMBA_CACHE_DIR="$scratch/numba"
|
| 38 |
+
if [ ! -w "${HOME:-/nonexistent}" ]; then export HOME="$scratch"; fi
|
| 39 |
+
"${MASSSPECGYM_GLACIER_PYTHON:-/opt/glacier/bin/python}" "$package_root/infer.py" "$@"
|
| 40 |
+
'''
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
ROOT_INFER_SH = '''#!/usr/bin/env bash
|
| 44 |
+
set -euo pipefail
|
| 45 |
+
root="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
|
| 46 |
+
for candidate in python3 "${MASSSPECGYM_GLACIER_PYTHON:-/opt/glacier/bin/python}" /opt/conda/bin/python3; do
|
| 47 |
+
if command -v "$candidate" >/dev/null 2>&1; then exec "$candidate" "$root/dispatch.py" "$@"; fi
|
| 48 |
+
done
|
| 49 |
+
echo "infer.sh: no Python interpreter found" >&2
|
| 50 |
+
exit 1
|
| 51 |
+
'''
|
| 52 |
+
|
| 53 |
+
|
| 54 |
+
def build(args):
|
| 55 |
+
import torch
|
| 56 |
+
out = args.output.resolve()
|
| 57 |
+
if out.exists():
|
| 58 |
+
raise FileExistsError(out)
|
| 59 |
+
out.mkdir(parents=True)
|
| 60 |
+
members, provenance = [], []
|
| 61 |
+
for path in args.checkpoint:
|
| 62 |
+
saved = torch.load(path, map_location='cpu', weights_only=False)
|
| 63 |
+
training = saved['task_training']
|
| 64 |
+
if training.get('pretrained_assets') != [] or not str(training.get('initialization', '')).startswith(('random', 'own-checkpoint:')):
|
| 65 |
+
raise ValueError(f'{path}: not a train-fold, scratch-initialized checkpoint')
|
| 66 |
+
digest = sha256(path)
|
| 67 |
+
members.append({'state_dict': saved['state_dict'], 'hyper_parameters': saved['hyper_parameters'],
|
| 68 |
+
'global_step': saved['global_step'], 'weights': saved['weights'],
|
| 69 |
+
'task_training': training, 'source_checkpoint_sha256': digest})
|
| 70 |
+
provenance.append({'source': str(path), 'sha256': digest, 'global_step': saved['global_step'],
|
| 71 |
+
'weights': saved['weights'], 'subset': training.get('subset'), 'seed': training.get('seed'),
|
| 72 |
+
'elapsed_seconds': training.get('elapsed_seconds'),
|
| 73 |
+
'data_manifest_sha256': training.get('data_manifest_sha256')})
|
| 74 |
+
bundle = {'format': 'glacier-members/v1', 'members': members}
|
| 75 |
+
inverse_provenance = []
|
| 76 |
+
for path in args.inverse or []:
|
| 77 |
+
saved = torch.load(path, map_location='cpu', weights_only=True)
|
| 78 |
+
digest = sha256(path)
|
| 79 |
+
recipe = json.loads((path.parent / 'recipe.json').read_text())
|
| 80 |
+
bundle.setdefault('inverse', []).append({'ema': saved['ema'], 'config': saved['config'],
|
| 81 |
+
'class': saved.get('class', 'FormulaFormer'), 'step': saved['step'],
|
| 82 |
+
'source_checkpoint_sha256': digest})
|
| 83 |
+
inverse_provenance.append({'source': str(path), 'sha256': digest, 'step': saved['step'],
|
| 84 |
+
'class': saved.get('class', 'FormulaFormer'), 'weights': 'ema',
|
| 85 |
+
'initialization': 'random', 'seed': recipe['args']['seed'],
|
| 86 |
+
'training_data': 'MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus',
|
| 87 |
+
'stores': recipe.get('stores'), 'recipe': recipe['args']})
|
| 88 |
+
torch.save(bundle, out / 'model.pt')
|
| 89 |
+
config = json.loads((HERE / 'pkg' / 'model_config.json').read_text())
|
| 90 |
+
for item in args.set:
|
| 91 |
+
key, value = item.split('=', 1)
|
| 92 |
+
config[key] = json.loads(value)
|
| 93 |
+
if inverse_provenance:
|
| 94 |
+
if not isinstance(config.get('inverse'), dict):
|
| 95 |
+
raise ValueError('--inverse needs --set inverse={...} (fusion options)')
|
| 96 |
+
config['inverse_members'] = inverse_provenance
|
| 97 |
+
elif config.get('inverse'):
|
| 98 |
+
raise ValueError('fusion options without --inverse checkpoints')
|
| 99 |
+
config['checkpoint'] = 'model.pt'
|
| 100 |
+
config['method'] = 'native-glacier-all-conditions-forward-simulation' + ('+formula-transformer-inverse-fusion' if inverse_provenance else '')
|
| 101 |
+
config['inference_runtime'] = '/opt/glacier/bin/python'
|
| 102 |
+
config['members'] = provenance
|
| 103 |
+
(out / 'model_config.json').write_text(json.dumps(config, indent=2) + '\n')
|
| 104 |
+
manifest = {'schema': 'massspecgym-retrieval-model/v1',
|
| 105 |
+
'checkpoint': {'path': 'model.pt', 'sha256': sha256(out / 'model.pt'), 'format': 'pytorch'},
|
| 106 |
+
'model_config': 'model_config.json',
|
| 107 |
+
'training_provenance': {'data': 'MassSpecGym v1.5 train fold', 'pretrained_assets': []}}
|
| 108 |
+
(out / 'model_manifest.json').write_text(json.dumps(manifest, indent=2) + '\n')
|
| 109 |
+
for name in ['infer.py', 'fastfeat.py', 'inverse.py', 'invrun.py']:
|
| 110 |
+
shutil.copyfile(HERE / 'pkg' / name, out / name)
|
| 111 |
+
(out / 'infer.sh').write_text(INFER_SH)
|
| 112 |
+
(out / 'infer.sh').chmod(0o755)
|
| 113 |
+
source_root = args.source_root.resolve()
|
| 114 |
+
shutil.copytree(source_root / 'src' / 'ms_pred', out / 'vendor' / 'ms_pred',
|
| 115 |
+
ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
|
| 116 |
+
shutil.copyfile(source_root / 'LICENSE', out / 'LICENSE.ms-pred')
|
| 117 |
+
shutil.copytree(HERE, out / 'training', ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
|
| 118 |
+
readme = args.readme.read_text() if args.readme else '# GLACIER all-condition retrieval package\n'
|
| 119 |
+
(out / 'README.md').write_text(readme)
|
| 120 |
+
for path in [out, *out.rglob('*')]:
|
| 121 |
+
path.chmod(0o755 if path.is_dir() or path.stat().st_mode & 0o111 else 0o644)
|
| 122 |
+
print(json.dumps({'built': str(out), 'checkpoint_sha256': manifest['checkpoint']['sha256'],
|
| 123 |
+
'members': provenance, 'config': {k: v for k, v in config.items() if k != 'members'}}, indent=2))
|
| 124 |
+
|
| 125 |
+
|
| 126 |
+
def release(args):
|
| 127 |
+
sys.path.insert(0, str(RESEARCH / 'starter'))
|
| 128 |
+
from publication import publish_directory
|
| 129 |
+
source = args.source.resolve()
|
| 130 |
+
manifest = json.loads((source / 'model_manifest.json').read_text())
|
| 131 |
+
if sha256(source / manifest['checkpoint']['path']) != manifest['checkpoint']['sha256']:
|
| 132 |
+
raise ValueError('staged checkpoint hash mismatch')
|
| 133 |
+
if args.readme:
|
| 134 |
+
readme = args.readme.read_text()
|
| 135 |
+
|
| 136 |
+
def copy(stage):
|
| 137 |
+
shutil.copytree(source, stage, dirs_exist_ok=True)
|
| 138 |
+
if args.readme:
|
| 139 |
+
(stage / 'README.md').write_text(readme)
|
| 140 |
+
|
| 141 |
+
destination = args.output_dir.resolve()
|
| 142 |
+
publish_directory(destination, copy)
|
| 143 |
+
# The stock root launcher needs `python3` on PATH; fall back to the documented runtimes.
|
| 144 |
+
temporary = destination / '.infer.sh.tmp'
|
| 145 |
+
temporary.write_text(ROOT_INFER_SH)
|
| 146 |
+
temporary.chmod(0o755)
|
| 147 |
+
os.replace(temporary, destination / 'infer.sh')
|
| 148 |
+
current = json.loads((destination / 'model_manifest.json').read_text())
|
| 149 |
+
selected = Path(current['model_config']).parts[1]
|
| 150 |
+
# Keep the selected generation and its predecessor; older ones are unreferenced.
|
| 151 |
+
generations = sorted((p for p in (destination / '.versions').iterdir() if p.is_dir()),
|
| 152 |
+
key=lambda p: p.stat().st_mtime, reverse=True)
|
| 153 |
+
keep = {selected}
|
| 154 |
+
for path in generations:
|
| 155 |
+
if path.name != selected and len(keep) < 2:
|
| 156 |
+
keep.add(path.name)
|
| 157 |
+
for path in generations:
|
| 158 |
+
if path.name not in keep:
|
| 159 |
+
shutil.rmtree(path, ignore_errors=True)
|
| 160 |
+
print(json.dumps({'released': selected, 'checkpoint_sha256': current['checkpoint']['sha256'], 'kept': sorted(keep)}))
|
| 161 |
+
|
| 162 |
+
|
| 163 |
+
def records(args):
|
| 164 |
+
destination = args.output_dir.resolve()
|
| 165 |
+
|
| 166 |
+
def put(source, relative):
|
| 167 |
+
target = destination / relative
|
| 168 |
+
target.parent.mkdir(parents=True, exist_ok=True)
|
| 169 |
+
target.parent.chmod(0o755)
|
| 170 |
+
if target.exists() and target.stat().st_size == source.stat().st_size and target.stat().st_mtime >= source.stat().st_mtime:
|
| 171 |
+
return
|
| 172 |
+
temporary = target.with_name(target.name + '.tmp')
|
| 173 |
+
shutil.copyfile(source, temporary)
|
| 174 |
+
temporary.chmod(0o644)
|
| 175 |
+
os.replace(temporary, target)
|
| 176 |
+
|
| 177 |
+
put(RESEARCH / 'EXPERIMENTS.md', 'EXPERIMENTS.md')
|
| 178 |
+
skip = {'__pycache__'}
|
| 179 |
+
for path in sorted(HERE.rglob('*')):
|
| 180 |
+
if path.is_file() and not (set(path.parts) & skip) and path.suffix != '.pyc':
|
| 181 |
+
put(path, Path('research') / 'source' / path.relative_to(HERE))
|
| 182 |
+
for run in sorted((RESEARCH / 'runs').iterdir()):
|
| 183 |
+
for name in ['recipe.json', 'metrics.jsonl', 'validation.jsonl', 'result.json']:
|
| 184 |
+
if (run / name).is_file():
|
| 185 |
+
put(run / name, Path('research') / 'runs' / run.name / name)
|
| 186 |
+
if (run / 'training-source').is_dir():
|
| 187 |
+
for path in sorted((run / 'training-source').rglob('*')):
|
| 188 |
+
if path.is_file() and not (set(path.parts) & skip):
|
| 189 |
+
put(path, Path('research') / 'runs' / run.name / 'training-source' / path.relative_to(run / 'training-source'))
|
| 190 |
+
for path in sorted((RESEARCH / 'logs').glob('*')):
|
| 191 |
+
if path.is_file() and path.stat().st_size < 50 * 1024 * 1024:
|
| 192 |
+
put(path, Path('research') / 'logs' / path.name)
|
| 193 |
+
for path in sorted((RESEARCH / 'evals').glob('*/report*.json')) + sorted((RESEARCH / 'evals').glob('*/*.log')) \
|
| 194 |
+
+ sorted((RESEARCH / 'evals').glob('*/summary*.json')) + sorted((RESEARCH / 'evals').glob('*/summary*.txt')):
|
| 195 |
+
put(path, Path('research') / 'evals' / path.parent.name / path.name)
|
| 196 |
+
for name in ['manifest.json', 'preparation.json']:
|
| 197 |
+
if (RESEARCH / 'prep_all' / name).is_file():
|
| 198 |
+
put(RESEARCH / 'prep_all' / name, Path('research') / 'prep_all' / name)
|
| 199 |
+
for path in [destination / 'research', *(destination / 'research').rglob('*')]:
|
| 200 |
+
if path.is_dir():
|
| 201 |
+
path.chmod(0o755)
|
| 202 |
+
print(json.dumps({'records': str(destination / 'research')}))
|
| 203 |
+
|
| 204 |
+
|
| 205 |
+
def main():
|
| 206 |
+
parser = argparse.ArgumentParser(description=__doc__)
|
| 207 |
+
sub = parser.add_subparsers(dest='command', required=True)
|
| 208 |
+
b = sub.add_parser('build')
|
| 209 |
+
b.add_argument('--checkpoint', type=Path, action='append', required=True)
|
| 210 |
+
b.add_argument('--set', action='append', default=[])
|
| 211 |
+
b.add_argument('--inverse', type=Path, action='append', help='inverse-branch EMA checkpoint (train_inv.py / train_set.py)')
|
| 212 |
+
b.add_argument('--output', type=Path, required=True)
|
| 213 |
+
b.add_argument('--source-root', type=Path, default=RESEARCH / 'ms-pred')
|
| 214 |
+
b.add_argument('--readme', type=Path)
|
| 215 |
+
r = sub.add_parser('release')
|
| 216 |
+
r.add_argument('--source', type=Path, required=True)
|
| 217 |
+
r.add_argument('--output-dir', type=Path, default=Path('/workspace/submission'))
|
| 218 |
+
r.add_argument('--readme', type=Path)
|
| 219 |
+
c = sub.add_parser('records')
|
| 220 |
+
c.add_argument('--output-dir', type=Path, default=Path('/workspace/submission'))
|
| 221 |
+
args = parser.parse_args()
|
| 222 |
+
{'build': build, 'release': release, 'records': records}[args.command](args)
|
| 223 |
+
|
| 224 |
+
|
| 225 |
+
if __name__ == '__main__':
|
| 226 |
+
main()
|
shared/package-files/b6/b63740294886c81680e5a0189d2abc271cd9d7726978ea72eb962bad61eb5d32/model_config.json
ADDED
|
@@ -0,0 +1,610 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"sparse_k": 100,
|
| 3 |
+
"inference_batch_size": 128,
|
| 4 |
+
"workers": 14,
|
| 5 |
+
"num_bins": 150000,
|
| 6 |
+
"upper_limit": 1500,
|
| 7 |
+
"max_observed_peaks": 50,
|
| 8 |
+
"observed_intensity_threshold": 0.001,
|
| 9 |
+
"ensemble": "prediction",
|
| 10 |
+
"pool_aggregation": 1.0,
|
| 11 |
+
"autocast": false,
|
| 12 |
+
"model": {
|
| 13 |
+
"pe_embed_k": 14,
|
| 14 |
+
"embed_elem_group": true,
|
| 15 |
+
"multi_hop_max_dist": 10
|
| 16 |
+
},
|
| 17 |
+
"checkpoint": "model.pt",
|
| 18 |
+
"views": [
|
| 19 |
+
{
|
| 20 |
+
"precursor_window": 0.5,
|
| 21 |
+
"pred_power": 0.75,
|
| 22 |
+
"match_ppm": 20,
|
| 23 |
+
"match_floor_mda": 4,
|
| 24 |
+
"match_by_instrument": {
|
| 25 |
+
"Orbitrap": [
|
| 26 |
+
10,
|
| 27 |
+
1
|
| 28 |
+
]
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
],
|
| 32 |
+
"inverse": {
|
| 33 |
+
"pooled": true,
|
| 34 |
+
"score": {
|
| 35 |
+
"members": "probability",
|
| 36 |
+
"power": 0.7
|
| 37 |
+
},
|
| 38 |
+
"weight_domain": 0.75,
|
| 39 |
+
"weight_other": 0.05,
|
| 40 |
+
"weight_other_single": 0.5,
|
| 41 |
+
"batch": 2048
|
| 42 |
+
},
|
| 43 |
+
"library": {
|
| 44 |
+
"kind": "sum",
|
| 45 |
+
"k": 20,
|
| 46 |
+
"top": 32,
|
| 47 |
+
"power": 6,
|
| 48 |
+
"debias": true,
|
| 49 |
+
"weight_domain": 0.0,
|
| 50 |
+
"weight_other": 0.4,
|
| 51 |
+
"weight_other_single": 0.0
|
| 52 |
+
},
|
| 53 |
+
"ion": {
|
| 54 |
+
"weight_domain": 0.05,
|
| 55 |
+
"weight_other": 0.01
|
| 56 |
+
},
|
| 57 |
+
"inverse_members": [
|
| 58 |
+
{
|
| 59 |
+
"source": "runs/I9b-ff512x6-real08-corpus2+train3/step-0050000-ema.pt",
|
| 60 |
+
"sha256": "f2741a9676a4743fa586d3effe8753d6eade9356fb2ceac8055ff50baf34195f",
|
| 61 |
+
"step": 50000,
|
| 62 |
+
"class": "FormulaFormer",
|
| 63 |
+
"weights": "ema",
|
| 64 |
+
"initialization": "random",
|
| 65 |
+
"seed": 1,
|
| 66 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 67 |
+
"self_simulated_store": {
|
| 68 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 69 |
+
"rows": 2031301,
|
| 70 |
+
"manifest": {
|
| 71 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 72 |
+
"merged": [
|
| 73 |
+
"inv/selfsim/corpus2.npz",
|
| 74 |
+
"inv/selfsim/train3.npz"
|
| 75 |
+
],
|
| 76 |
+
"parts": [
|
| 77 |
+
{
|
| 78 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 79 |
+
"merged": [
|
| 80 |
+
"inv/selfsim/sub75.npz",
|
| 81 |
+
"inv/selfsim/sub25.npz"
|
| 82 |
+
],
|
| 83 |
+
"parts": [
|
| 84 |
+
{
|
| 85 |
+
"name": "sub75",
|
| 86 |
+
"source": "synth",
|
| 87 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 88 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 89 |
+
"members": "1,3",
|
| 90 |
+
"structures": 435076,
|
| 91 |
+
"tasks": 651127,
|
| 92 |
+
"failed": 0,
|
| 93 |
+
"rows": 651127,
|
| 94 |
+
"seconds": 635.7592854518443,
|
| 95 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 96 |
+
"floor": 0.02,
|
| 97 |
+
"spectra": 651083,
|
| 98 |
+
"without_peak": 44,
|
| 99 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 100 |
+
"mean_candidates": 20.62178653319552,
|
| 101 |
+
"ppm": 20.0,
|
| 102 |
+
"floor_da": 0.004,
|
| 103 |
+
"max_peaks": 24,
|
| 104 |
+
"annotate_seconds": 25.62758301384747
|
| 105 |
+
},
|
| 106 |
+
{
|
| 107 |
+
"name": "sub25",
|
| 108 |
+
"source": "synth",
|
| 109 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 110 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 111 |
+
"members": "1,3",
|
| 112 |
+
"structures": 435076,
|
| 113 |
+
"tasks": 217012,
|
| 114 |
+
"failed": 0,
|
| 115 |
+
"rows": 217012,
|
| 116 |
+
"seconds": 227.74617605702952,
|
| 117 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 118 |
+
"floor": 0.02,
|
| 119 |
+
"spectra": 217000,
|
| 120 |
+
"without_peak": 12,
|
| 121 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 122 |
+
"mean_candidates": 20.61567563084069,
|
| 123 |
+
"ppm": 20.0,
|
| 124 |
+
"floor_da": 0.004,
|
| 125 |
+
"max_peaks": 24,
|
| 126 |
+
"annotate_seconds": 10.8742212112993
|
| 127 |
+
}
|
| 128 |
+
],
|
| 129 |
+
"spectra": 868083,
|
| 130 |
+
"structures": 434944
|
| 131 |
+
},
|
| 132 |
+
{
|
| 133 |
+
"name": "train3",
|
| 134 |
+
"source": "synth",
|
| 135 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 136 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 137 |
+
"members": "1,3",
|
| 138 |
+
"structures": 435076,
|
| 139 |
+
"tasks": 1163260,
|
| 140 |
+
"failed": 0,
|
| 141 |
+
"rows": 1163260,
|
| 142 |
+
"seconds": 1262.926542488858,
|
| 143 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 144 |
+
"floor": 0.02,
|
| 145 |
+
"spectra": 1163218,
|
| 146 |
+
"without_peak": 42,
|
| 147 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 148 |
+
"mean_candidates": 25.376552103570997,
|
| 149 |
+
"ppm": 20.0,
|
| 150 |
+
"floor_da": 0.004,
|
| 151 |
+
"max_peaks": 24,
|
| 152 |
+
"annotate_seconds": 43.40271363919601
|
| 153 |
+
}
|
| 154 |
+
],
|
| 155 |
+
"spectra": 2031301,
|
| 156 |
+
"structures": 434950
|
| 157 |
+
}
|
| 158 |
+
},
|
| 159 |
+
"stores": {
|
| 160 |
+
"gen-x1.manifest.json": null,
|
| 161 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 162 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 163 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 164 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 165 |
+
},
|
| 166 |
+
"recipe": {
|
| 167 |
+
"store": "/workspace/research/inv",
|
| 168 |
+
"out": "runs/I9b-ff512x6-real08-corpus2+train3",
|
| 169 |
+
"pools": "pools-validation-input.npz",
|
| 170 |
+
"input": "/workspace/research/validation-input",
|
| 171 |
+
"steps": 50000,
|
| 172 |
+
"batch": 512,
|
| 173 |
+
"real_frac": 0.08,
|
| 174 |
+
"real_balance": 0.5,
|
| 175 |
+
"no_synth": false,
|
| 176 |
+
"target": "",
|
| 177 |
+
"heavy_boost": 1.0,
|
| 178 |
+
"synth_structures": 1.0,
|
| 179 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 180 |
+
"extra_frac": 0.5,
|
| 181 |
+
"heavy_lo": 450.0,
|
| 182 |
+
"heavy_hi": 850.0,
|
| 183 |
+
"lr": 0.0006,
|
| 184 |
+
"weight_decay": 0.0001,
|
| 185 |
+
"warmup": 2000,
|
| 186 |
+
"ema": 0.999,
|
| 187 |
+
"dim": 512,
|
| 188 |
+
"layers": 6,
|
| 189 |
+
"heads": 8,
|
| 190 |
+
"dropout": 0.1,
|
| 191 |
+
"peak_drop": 0.3,
|
| 192 |
+
"truncate": 0.3,
|
| 193 |
+
"min_keep": 4,
|
| 194 |
+
"jitter": 0.15,
|
| 195 |
+
"synth_energy_drop": 0.3,
|
| 196 |
+
"synth_instrument_drop": 0.3,
|
| 197 |
+
"validate_every": 5000,
|
| 198 |
+
"retrieve_every": 10000,
|
| 199 |
+
"retrieve_pools": 0,
|
| 200 |
+
"seed": 1,
|
| 201 |
+
"contrast_weight": 0.0,
|
| 202 |
+
"contrast_k": 31,
|
| 203 |
+
"contrast_tau": 0.05,
|
| 204 |
+
"init": null,
|
| 205 |
+
"max_steps_this_run": 0
|
| 206 |
+
}
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"source": "runs/I13-ff512x6-real08-corpus2+train3-seed2/step-0050000-ema.pt",
|
| 210 |
+
"sha256": "bd0f9c965cf7e0101877c780d9f3592e6fc07b4b20cdfc35adb9f60e3aa295a7",
|
| 211 |
+
"step": 50000,
|
| 212 |
+
"class": "FormulaFormer",
|
| 213 |
+
"weights": "ema",
|
| 214 |
+
"initialization": "random",
|
| 215 |
+
"seed": 2,
|
| 216 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus + spectra of the corpus structures simulated by our own train-fold-trained GLACIER forward members (self-simulation, E60)",
|
| 217 |
+
"self_simulated_store": {
|
| 218 |
+
"path": "inv/selfsim/corpus2+train3.npz",
|
| 219 |
+
"rows": 2031301,
|
| 220 |
+
"manifest": {
|
| 221 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 222 |
+
"merged": [
|
| 223 |
+
"inv/selfsim/corpus2.npz",
|
| 224 |
+
"inv/selfsim/train3.npz"
|
| 225 |
+
],
|
| 226 |
+
"parts": [
|
| 227 |
+
{
|
| 228 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 229 |
+
"merged": [
|
| 230 |
+
"inv/selfsim/sub75.npz",
|
| 231 |
+
"inv/selfsim/sub25.npz"
|
| 232 |
+
],
|
| 233 |
+
"parts": [
|
| 234 |
+
{
|
| 235 |
+
"name": "sub75",
|
| 236 |
+
"source": "synth",
|
| 237 |
+
"conditions": "from-rows 2 hash-range 0.25,1 (534 conditions)",
|
| 238 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 239 |
+
"members": "1,3",
|
| 240 |
+
"structures": 435076,
|
| 241 |
+
"tasks": 651127,
|
| 242 |
+
"failed": 0,
|
| 243 |
+
"rows": 651127,
|
| 244 |
+
"seconds": 635.7592854518443,
|
| 245 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 246 |
+
"floor": 0.02,
|
| 247 |
+
"spectra": 651083,
|
| 248 |
+
"without_peak": 44,
|
| 249 |
+
"mean_annotated_peaks": 15.61580167198345,
|
| 250 |
+
"mean_candidates": 20.62178653319552,
|
| 251 |
+
"ppm": 20.0,
|
| 252 |
+
"floor_da": 0.004,
|
| 253 |
+
"max_peaks": 24,
|
| 254 |
+
"annotate_seconds": 25.62758301384747
|
| 255 |
+
},
|
| 256 |
+
{
|
| 257 |
+
"name": "sub25",
|
| 258 |
+
"source": "synth",
|
| 259 |
+
"conditions": "from-rows 2 hash-range 0,0.25 (485 conditions)",
|
| 260 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 261 |
+
"members": "1,3",
|
| 262 |
+
"structures": 435076,
|
| 263 |
+
"tasks": 217012,
|
| 264 |
+
"failed": 0,
|
| 265 |
+
"rows": 217012,
|
| 266 |
+
"seconds": 227.74617605702952,
|
| 267 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 268 |
+
"floor": 0.02,
|
| 269 |
+
"spectra": 217000,
|
| 270 |
+
"without_peak": 12,
|
| 271 |
+
"mean_annotated_peaks": 15.62026728110599,
|
| 272 |
+
"mean_candidates": 20.61567563084069,
|
| 273 |
+
"ppm": 20.0,
|
| 274 |
+
"floor_da": 0.004,
|
| 275 |
+
"max_peaks": 24,
|
| 276 |
+
"annotate_seconds": 10.8742212112993
|
| 277 |
+
}
|
| 278 |
+
],
|
| 279 |
+
"spectra": 868083,
|
| 280 |
+
"structures": 434944
|
| 281 |
+
},
|
| 282 |
+
{
|
| 283 |
+
"name": "train3",
|
| 284 |
+
"source": "synth",
|
| 285 |
+
"conditions": "from-train 3 window 2000 seed 0 hash-range 0,1 (301 conditions)",
|
| 286 |
+
"bundle": "builds/5Ms-I1+I3x2-L",
|
| 287 |
+
"members": "1,3",
|
| 288 |
+
"structures": 435076,
|
| 289 |
+
"tasks": 1163260,
|
| 290 |
+
"failed": 0,
|
| 291 |
+
"rows": 1163260,
|
| 292 |
+
"seconds": 1262.926542488858,
|
| 293 |
+
"schema": "allcond-inverse-selfsim/v1",
|
| 294 |
+
"floor": 0.02,
|
| 295 |
+
"spectra": 1163218,
|
| 296 |
+
"without_peak": 42,
|
| 297 |
+
"mean_annotated_peaks": 17.868643710809152,
|
| 298 |
+
"mean_candidates": 25.376552103570997,
|
| 299 |
+
"ppm": 20.0,
|
| 300 |
+
"floor_da": 0.004,
|
| 301 |
+
"max_peaks": 24,
|
| 302 |
+
"annotate_seconds": 43.40271363919601
|
| 303 |
+
}
|
| 304 |
+
],
|
| 305 |
+
"spectra": 2031301,
|
| 306 |
+
"structures": 434950
|
| 307 |
+
}
|
| 308 |
+
},
|
| 309 |
+
"stores": {
|
| 310 |
+
"gen-x1.manifest.json": null,
|
| 311 |
+
"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758",
|
| 312 |
+
"real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 313 |
+
"real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597",
|
| 314 |
+
"synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"
|
| 315 |
+
},
|
| 316 |
+
"recipe": {
|
| 317 |
+
"store": "/workspace/research/inv",
|
| 318 |
+
"out": "runs/I13-ff512x6-real08-corpus2+train3-seed2",
|
| 319 |
+
"pools": "pools-validation-input.npz",
|
| 320 |
+
"input": "/workspace/research/validation-input",
|
| 321 |
+
"steps": 50000,
|
| 322 |
+
"batch": 512,
|
| 323 |
+
"real_frac": 0.08,
|
| 324 |
+
"real_balance": 0.5,
|
| 325 |
+
"no_synth": false,
|
| 326 |
+
"target": "",
|
| 327 |
+
"heavy_boost": 1.0,
|
| 328 |
+
"synth_structures": 1.0,
|
| 329 |
+
"extra_store": "inv/selfsim/corpus2+train3.npz",
|
| 330 |
+
"extra_frac": 0.5,
|
| 331 |
+
"heavy_lo": 450.0,
|
| 332 |
+
"heavy_hi": 850.0,
|
| 333 |
+
"lr": 0.0006,
|
| 334 |
+
"weight_decay": 0.0001,
|
| 335 |
+
"warmup": 2000,
|
| 336 |
+
"ema": 0.999,
|
| 337 |
+
"dim": 512,
|
| 338 |
+
"layers": 6,
|
| 339 |
+
"heads": 8,
|
| 340 |
+
"dropout": 0.1,
|
| 341 |
+
"peak_drop": 0.3,
|
| 342 |
+
"truncate": 0.3,
|
| 343 |
+
"min_keep": 4,
|
| 344 |
+
"jitter": 0.15,
|
| 345 |
+
"synth_energy_drop": 0.3,
|
| 346 |
+
"synth_instrument_drop": 0.3,
|
| 347 |
+
"validate_every": 5000,
|
| 348 |
+
"retrieve_every": 10000,
|
| 349 |
+
"retrieve_pools": 0,
|
| 350 |
+
"seed": 2,
|
| 351 |
+
"contrast_weight": 0.0,
|
| 352 |
+
"contrast_k": 31,
|
| 353 |
+
"contrast_tau": 0.05,
|
| 354 |
+
"init": null,
|
| 355 |
+
"max_steps_this_run": 0
|
| 356 |
+
}
|
| 357 |
+
}
|
| 358 |
+
],
|
| 359 |
+
"library_asset": {
|
| 360 |
+
"schema": "train-library/v1",
|
| 361 |
+
"fold": "train",
|
| 362 |
+
"spectra": 194119,
|
| 363 |
+
"molecules": 25046,
|
| 364 |
+
"bin": 0.01,
|
| 365 |
+
"prior_sample": 1024,
|
| 366 |
+
"prior_seed": 0,
|
| 367 |
+
"fragment_entries": 6765621,
|
| 368 |
+
"loss_entries": 6763777,
|
| 369 |
+
"source": "/workspace/data/train.jsonl",
|
| 370 |
+
"source_sha256": "de7f46e91f7b67eb5ca67468381abbdb20a8f739a0ae4b27070276798ecad0fc",
|
| 371 |
+
"structure_store": "/run-state/workspace/research/inv/real-train.npz",
|
| 372 |
+
"structure_store_sha256": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6",
|
| 373 |
+
"sha256": "22d1ddb216eef78d5040209ff6526371e5fcd8aac88e68a36823b6d5e73b3712",
|
| 374 |
+
"elapsed_seconds": 13.499361125999712,
|
| 375 |
+
"training_data": "MassSpecGym v1.5 train fold"
|
| 376 |
+
},
|
| 377 |
+
"ion_asset": {
|
| 378 |
+
"source": "inv/ion_error_table.json",
|
| 379 |
+
"sha256": "39aca3a714fd25a20cbaba4d46942764b52d730828a4b8205bf46ac5fc2a6225",
|
| 380 |
+
"fit": "MassSpecGym v1.5 train fold (194,119 spectra with [M+H]+ / [M+Na]+), analysis/ion_fit.py",
|
| 381 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 382 |
+
"window_da": 0.02,
|
| 383 |
+
"classes": {
|
| 384 |
+
"domain|Orbitrap": {
|
| 385 |
+
"median_ppm": 0.358,
|
| 386 |
+
"sigma_ppm": 1.51,
|
| 387 |
+
"background": 0.0204
|
| 388 |
+
},
|
| 389 |
+
"domain|QTOF": {
|
| 390 |
+
"median_ppm": 0.027,
|
| 391 |
+
"sigma_ppm": 4.348,
|
| 392 |
+
"background": 0.0869
|
| 393 |
+
},
|
| 394 |
+
"domain|other": {
|
| 395 |
+
"median_ppm": 0.027,
|
| 396 |
+
"sigma_ppm": 4.348,
|
| 397 |
+
"background": 0.0869
|
| 398 |
+
},
|
| 399 |
+
"H-no-energy|Orbitrap": {
|
| 400 |
+
"median_ppm": -0.943,
|
| 401 |
+
"sigma_ppm": 2.937,
|
| 402 |
+
"background": 0.1196
|
| 403 |
+
},
|
| 404 |
+
"H-no-energy|QTOF": {
|
| 405 |
+
"median_ppm": 0.665,
|
| 406 |
+
"sigma_ppm": 4.58,
|
| 407 |
+
"background": 0.08
|
| 408 |
+
},
|
| 409 |
+
"H-no-energy|other": {
|
| 410 |
+
"median_ppm": 0.851,
|
| 411 |
+
"sigma_ppm": 4.269,
|
| 412 |
+
"background": 0.1021
|
| 413 |
+
},
|
| 414 |
+
"Na|Orbitrap": {
|
| 415 |
+
"median_ppm": -0.872,
|
| 416 |
+
"sigma_ppm": 2.935,
|
| 417 |
+
"background": 0.1834
|
| 418 |
+
},
|
| 419 |
+
"Na|QTOF": {
|
| 420 |
+
"median_ppm": 1.119,
|
| 421 |
+
"sigma_ppm": 4.103,
|
| 422 |
+
"background": 0.0798
|
| 423 |
+
},
|
| 424 |
+
"Na|other": {
|
| 425 |
+
"median_ppm": 3.003,
|
| 426 |
+
"sigma_ppm": 2.969,
|
| 427 |
+
"background": 0.0319
|
| 428 |
+
}
|
| 429 |
+
},
|
| 430 |
+
"fallback": {
|
| 431 |
+
"domain|other": "domain|QTOF"
|
| 432 |
+
},
|
| 433 |
+
"train_fold_statistics": {
|
| 434 |
+
"domain|Orbitrap": {
|
| 435 |
+
"spectra": 64738,
|
| 436 |
+
"present": 0.5068,
|
| 437 |
+
"median_ppm": 0.176,
|
| 438 |
+
"sigma_ppm": 1.093,
|
| 439 |
+
"beyond_3_sigma": 0.0763,
|
| 440 |
+
"ml_median_ppm": 0.358,
|
| 441 |
+
"ml_sigma_ppm": 1.51,
|
| 442 |
+
"ml_background": 0.0204,
|
| 443 |
+
"ml_mean_log_density": 6.2307
|
| 444 |
+
},
|
| 445 |
+
"domain|QTOF": {
|
| 446 |
+
"spectra": 34603,
|
| 447 |
+
"present": 0.5111,
|
| 448 |
+
"median_ppm": 0.045,
|
| 449 |
+
"sigma_ppm": 3.847,
|
| 450 |
+
"beyond_3_sigma": 0.0914,
|
| 451 |
+
"ml_median_ppm": 0.027,
|
| 452 |
+
"ml_sigma_ppm": 4.348,
|
| 453 |
+
"ml_background": 0.0869,
|
| 454 |
+
"ml_mean_log_density": 4.9233
|
| 455 |
+
},
|
| 456 |
+
"domain|other": {
|
| 457 |
+
"spectra": 36,
|
| 458 |
+
"present": 0.8611,
|
| 459 |
+
"median_ppm": 2.185,
|
| 460 |
+
"sigma_ppm": 4.203,
|
| 461 |
+
"beyond_3_sigma": 0.0,
|
| 462 |
+
"ml_median_ppm": 2.789,
|
| 463 |
+
"ml_sigma_ppm": 3.688,
|
| 464 |
+
"ml_background": 0.0,
|
| 465 |
+
"ml_mean_log_density": 5.6271
|
| 466 |
+
},
|
| 467 |
+
"H-no-energy|Orbitrap": {
|
| 468 |
+
"spectra": 51704,
|
| 469 |
+
"present": 0.5479,
|
| 470 |
+
"median_ppm": -0.989,
|
| 471 |
+
"sigma_ppm": 2.647,
|
| 472 |
+
"beyond_3_sigma": 0.1156,
|
| 473 |
+
"ml_median_ppm": -0.943,
|
| 474 |
+
"ml_sigma_ppm": 2.937,
|
| 475 |
+
"ml_background": 0.1196,
|
| 476 |
+
"ml_mean_log_density": 5.0128
|
| 477 |
+
},
|
| 478 |
+
"H-no-energy|QTOF": {
|
| 479 |
+
"spectra": 11931,
|
| 480 |
+
"present": 0.626,
|
| 481 |
+
"median_ppm": 0.801,
|
| 482 |
+
"sigma_ppm": 4.239,
|
| 483 |
+
"beyond_3_sigma": 0.0754,
|
| 484 |
+
"ml_median_ppm": 0.665,
|
| 485 |
+
"ml_sigma_ppm": 4.58,
|
| 486 |
+
"ml_background": 0.08,
|
| 487 |
+
"ml_mean_log_density": 4.7319
|
| 488 |
+
},
|
| 489 |
+
"H-no-energy|other": {
|
| 490 |
+
"spectra": 3467,
|
| 491 |
+
"present": 0.67,
|
| 492 |
+
"median_ppm": 0.61,
|
| 493 |
+
"sigma_ppm": 4.033,
|
| 494 |
+
"beyond_3_sigma": 0.0895,
|
| 495 |
+
"ml_median_ppm": 0.851,
|
| 496 |
+
"ml_sigma_ppm": 4.269,
|
| 497 |
+
"ml_background": 0.1021,
|
| 498 |
+
"ml_mean_log_density": 4.7426
|
| 499 |
+
},
|
| 500 |
+
"Na|Orbitrap": {
|
| 501 |
+
"spectra": 24454,
|
| 502 |
+
"present": 0.4954,
|
| 503 |
+
"median_ppm": -0.875,
|
| 504 |
+
"sigma_ppm": 2.797,
|
| 505 |
+
"beyond_3_sigma": 0.1574,
|
| 506 |
+
"ml_median_ppm": -0.872,
|
| 507 |
+
"ml_sigma_ppm": 2.935,
|
| 508 |
+
"ml_background": 0.1834,
|
| 509 |
+
"ml_mean_log_density": 4.589
|
| 510 |
+
},
|
| 511 |
+
"Na|QTOF": {
|
| 512 |
+
"spectra": 2361,
|
| 513 |
+
"present": 0.8602,
|
| 514 |
+
"median_ppm": 1.126,
|
| 515 |
+
"sigma_ppm": 4.211,
|
| 516 |
+
"beyond_3_sigma": 0.0551,
|
| 517 |
+
"ml_median_ppm": 1.119,
|
| 518 |
+
"ml_sigma_ppm": 4.103,
|
| 519 |
+
"ml_background": 0.0798,
|
| 520 |
+
"ml_mean_log_density": 4.5016
|
| 521 |
+
},
|
| 522 |
+
"Na|other": {
|
| 523 |
+
"spectra": 825,
|
| 524 |
+
"present": 0.9309,
|
| 525 |
+
"median_ppm": 3.305,
|
| 526 |
+
"sigma_ppm": 3.261,
|
| 527 |
+
"beyond_3_sigma": 0.026,
|
| 528 |
+
"ml_median_ppm": 3.003,
|
| 529 |
+
"ml_sigma_ppm": 2.969,
|
| 530 |
+
"ml_background": 0.0319,
|
| 531 |
+
"ml_mean_log_density": 4.9698
|
| 532 |
+
}
|
| 533 |
+
}
|
| 534 |
+
},
|
| 535 |
+
"method": "native-glacier-all-conditions-forward-simulation+formula-transformer-inverse-fusion+train-library-neighbour-fusion+measured-intact-ion-term",
|
| 536 |
+
"inference_runtime": "/opt/glacier/bin/python",
|
| 537 |
+
"members": [
|
| 538 |
+
{
|
| 539 |
+
"source": "runs/B-all-b32/checkpoints/step-0020000-ema.ckpt",
|
| 540 |
+
"sha256": "80ec4715663e505007412e3d89dbe6020cd145713840c15affaf82604fc5765c",
|
| 541 |
+
"global_step": 20000,
|
| 542 |
+
"weights": "ema",
|
| 543 |
+
"subset": "all",
|
| 544 |
+
"seed": 1,
|
| 545 |
+
"elapsed_seconds": 5136.2172065590275,
|
| 546 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 547 |
+
"initialization": "random",
|
| 548 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 549 |
+
"synthetic": null
|
| 550 |
+
},
|
| 551 |
+
{
|
| 552 |
+
"source": "runs/B-all-b32/checkpoints/step-0030000-ema.ckpt",
|
| 553 |
+
"sha256": "0228e4fa0589333f02db8223e49d6ecd23cd100d1a6182ad268d9db4f8468798",
|
| 554 |
+
"global_step": 30000,
|
| 555 |
+
"weights": "ema",
|
| 556 |
+
"subset": "all",
|
| 557 |
+
"seed": 1,
|
| 558 |
+
"elapsed_seconds": 8314.79353913304,
|
| 559 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 560 |
+
"initialization": "random",
|
| 561 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 562 |
+
"synthetic": null
|
| 563 |
+
},
|
| 564 |
+
{
|
| 565 |
+
"source": "runs/B2-all-b32-seed2/checkpoints/step-0020000-ema.ckpt",
|
| 566 |
+
"sha256": "ac3c85cdabfb5f68ca3ca506732f1f8e79fa6e9f3d5bf5fa574b6e1f3249312c",
|
| 567 |
+
"global_step": 20000,
|
| 568 |
+
"weights": "ema",
|
| 569 |
+
"subset": "all",
|
| 570 |
+
"seed": 2,
|
| 571 |
+
"elapsed_seconds": 6945.18486677701,
|
| 572 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 573 |
+
"initialization": "random",
|
| 574 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 575 |
+
"synthetic": null
|
| 576 |
+
},
|
| 577 |
+
{
|
| 578 |
+
"source": "runs/B2-all-b32-seed2/checkpoints/step-0030000-ema.ckpt",
|
| 579 |
+
"sha256": "f11667b8ee56a15c82d26ab9052816ecc63f2081eaa6fd4ea82d38d1e2a36ce1",
|
| 580 |
+
"global_step": 30000,
|
| 581 |
+
"weights": "ema",
|
| 582 |
+
"subset": "all",
|
| 583 |
+
"seed": 2,
|
| 584 |
+
"elapsed_seconds": 9298.063542745003,
|
| 585 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 586 |
+
"initialization": "random",
|
| 587 |
+
"training_data": "MassSpecGym v1.5 train fold",
|
| 588 |
+
"synthetic": null
|
| 589 |
+
},
|
| 590 |
+
{
|
| 591 |
+
"source": "runs/S2-B20k-synth/checkpoints/step-0030000-ema.ckpt",
|
| 592 |
+
"sha256": "44742fa31f337e59b543d903018780560569c2e8e50a008ba008859c8440e3a2",
|
| 593 |
+
"global_step": 30000,
|
| 594 |
+
"weights": "ema",
|
| 595 |
+
"subset": "all",
|
| 596 |
+
"seed": 1,
|
| 597 |
+
"elapsed_seconds": 8906.84206694903,
|
| 598 |
+
"data_manifest_sha256": "695645989510ffe27c4ef0d2f8f8f14f8c5514a5b23b5bfda55a7d035503ed4e",
|
| 599 |
+
"initialization": "own-checkpoint:6c5a43fada335e5f4e9f8265ec6cfd54a8f317eb8d2100d96ea3731809005be2",
|
| 600 |
+
"training_data": "MassSpecGym v1.5 train fold + supplied synthetic_augmentation corpus (auxiliary intensity term)",
|
| 601 |
+
"synthetic": {
|
| 602 |
+
"manifest_sha256": "431454e702f8da3194684fc9a565135d29a38a407aaa31e9399d871360c6e962",
|
| 603 |
+
"per_item": 1,
|
| 604 |
+
"weight": 1.0,
|
| 605 |
+
"schedule": "e2e",
|
| 606 |
+
"instrument": "flag"
|
| 607 |
+
}
|
| 608 |
+
}
|
| 609 |
+
]
|
| 610 |
+
}
|
shared/package-files/b6/b665f6a2fef711b478e6d456fccce87c974a50619a8d892d36877cff76f550fb/anchor-B2-30k-v1.log
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "canonicalized", "unique_candidates": 828117, "unsupported": 7007, "seconds": 97.26345496000431}
|
| 2 |
+
{"event": "planned", "queries": 19429, "groups": 10176, "molecules": 944948, "simulations": 2540748, "seconds": 101.55645595600072}
|
| 3 |
+
ind noprec_pp0.75 all=0.4708 dom=0.7065 non=0.2342 h5=0.6277 h20=0.7027 | diff=+0.0000 [+0.0000,+0.0000]
|
| 4 |
+
agg noprec_pp0.75 all=0.6118 dom=0.7970 non=0.4259 h5=0.7901 h20=0.8848 | diff=+0.0000 [+0.0000,+0.0000]
|
| 5 |
+
ind a5 all=0.4807 dom=0.7139 non=0.2466 h5=0.6380 h20=0.7151 | diff=+0.0099 [+0.0063,+0.0137]
|
| 6 |
+
agg a5 all=0.6308 dom=0.8033 non=0.4576 h5=0.7779 h20=0.8902 | diff=+0.0189 [+0.0046,+0.0343]
|
| 7 |
+
ind a10 all=0.4778 dom=0.7033 non=0.2515 h5=0.6410 h20=0.7231 | diff=+0.0070 [+0.0024,+0.0115]
|
| 8 |
+
agg a10 all=0.6282 dom=0.8031 non=0.4527 h5=0.7753 h20=0.8969 | diff=+0.0164 [-0.0010,+0.0353]
|
| 9 |
+
ind p10f1 all=0.4786 dom=0.7161 non=0.2400 h5=0.6326 h20=0.7086 | diff=+0.0077 [+0.0034,+0.0122]
|
| 10 |
+
agg p10f1 all=0.6340 dom=0.8107 non=0.4566 h5=0.7848 h20=0.8930 | diff=+0.0222 [+0.0059,+0.0390]
|
| 11 |
+
ind p10f2 all=0.4803 dom=0.7191 non=0.2405 h5=0.6343 h20=0.7105 | diff=+0.0095 [+0.0055,+0.0138]
|
| 12 |
+
agg p10f2 all=0.6290 dom=0.8101 non=0.4470 h5=0.7792 h20=0.8933 | diff=+0.0171 [+0.0029,+0.0319]
|
| 13 |
+
ind p20f2 all=0.4804 dom=0.7137 non=0.2461 h5=0.6392 h20=0.7178 | diff=+0.0095 [+0.0058,+0.0133]
|
| 14 |
+
agg p20f2 all=0.6282 dom=0.8080 non=0.4477 h5=0.7778 h20=0.8939 | diff=+0.0164 [-0.0012,+0.0330]
|
| 15 |
+
ind p20f4 all=0.4818 dom=0.7145 non=0.2482 h5=0.6397 h20=0.7193 | diff=+0.0110 [+0.0074,+0.0148]
|
| 16 |
+
agg p20f4 all=0.6335 dom=0.8097 non=0.4566 h5=0.7739 h20=0.8931 | diff=+0.0217 [+0.0068,+0.0360]
|
shared/package-files/b6/b672973a2274bbae420e6ec878372a79c2cb4916874eb9a6436bc7dd9292db77/eval-A10k-sub.log
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "loaded", "queries": 2147, "pools": 413, "members": 1, "workers": 10}
|
| 2 |
+
{"event": "canonicalized", "unique_candidates": 105046, "unsupported": 928, "seconds": 6.584986881003715}
|
| 3 |
+
{"event": "planned", "queries": 2147, "groups": 1168, "molecules": 116802, "simulations": 295422, "seconds": 6.909893014002591}
|
| 4 |
+
/opt/glacier/lib/python3.11/site-packages/torch/nn/modules/transformer.py:508: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. We recommend specifying layout=torch.jagged when constructing a nested tensor, as this layout receives active development, has better operator coverage, and works with torch.compile. (Triggered internally at /pytorch/aten/src/ATen/NestedTensorImpl.cpp:178.)
|
| 5 |
+
output = torch._nested_tensor_from_mask(
|
| 6 |
+
{"event": "simulating", "finished": 64000, "total": 295422, "seconds": 25.547479233937338, "per_second": 2505.1395252719194}
|
| 7 |
+
{"event": "simulating", "finished": 128000, "total": 295422, "seconds": 53.30762945394963, "per_second": 2401.1572322977554}
|
| 8 |
+
{"event": "simulating", "finished": 192000, "total": 295422, "seconds": 83.09802224196028, "per_second": 2310.5243039472693}
|
| 9 |
+
{"event": "simulating", "finished": 256000, "total": 295422, "seconds": 118.18431927694473, "per_second": 2166.1080045662216}
|
| 10 |
+
{"event": "simulated", "finished": 295422, "total": 295422, "failed": 0, "seconds": 157.38810374191962}
|
| 11 |
+
{"event": "finished", "queries": 2147, "unscored": 0, "directly_scored": 2147, "scoring_seconds": 1.8268624959746376, "total_seconds": 178.23354486201424}
|
shared/package-files/b6/b6da4868833e77578579a777da141035ab34a9f6aa4814e9233c49b7697c721d/netprop-oracle-rerank.log
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released rule from saved branches: Hit@1 0.7713 pool-macro 0.8591 Hit@5 0.8797 Hit@20 0.9377 | twin pools 354 (macro 0.7429), others macro 0.8727
|
| 2 |
+
|
| 3 |
+
k=10 p=3.0 half=0.5 | m=10 tau=0.02 kernel=plain debias=fold control=none shuffle=None: alone Hit@1 0.6827 (domain 0.7351 / other 0.6302) macro 0.6917
|
| 4 |
+
lam 1.00/1.00: Hit@1 0.8167 (+0.0453 [+0.0172, +0.0750]) macro +0.0269 [+0.0195, +0.0337] pools +120 -29 | no top 20 +0.0386 cap30 +0.0410 [+0.0233, +0.0597] | Hit@5 +0.0072 macro@5 +0.0171 cap30@5 +0.0252 | twin +31 -5 other +89 -24 | dom +0.0078 oth +0.0830
|
| 5 |
+
lam 2.00/2.00: Hit@1 0.8186 (+0.0473 [+0.0188, +0.0776]) macro +0.0298 [+0.0222, +0.0375] pools +143 -42 | no top 20 +0.0408 cap30 +0.0427 [+0.0239, +0.0617] | Hit@5 +0.0097 macro@5 +0.0177 cap30@5 +0.0279 | twin +35 -7 other +108 -35 | dom +0.0079 oth +0.0868
|
shared/package-files/b9/b9052f01862eff09dd56dcd554fe689280543be8842bdb1fbbfc31cd4651f67d/consensus-subset-5Ms-N5u48-L-ion-net2.log
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
== val-tiny
|
| 2 |
+
consensus {"scored": 168, "pools": 40, "answers": 400, "search_seconds": 0.02126318495720625, "seconds": 0.5167010120349005}
|
| 3 |
+
subset: 180 labelled queries, 40 pools
|
| 4 |
+
base (no term) Hit@1 0.9056 Hit@5 0.9111 Hit@20 0.9889 macro 0.9000
|
| 5 |
+
lab, with term Hit@1 0.9056 Hit@5 0.9111 Hit@20 0.9889 macro 0.9000 pools +0 -0
|
| 6 |
+
replay Hit@1 0.9056 Hit@5 0.9111 Hit@20 0.9889 macro 0.9000
|
| 7 |
+
label rank: replay == lab for 180 / 180 queries; top-1 status equal for 180; largest rank difference 0
|
| 8 |
+
== val-sub
|
| 9 |
+
consensus {"scored": 2147, "pools": 413, "answers": 4130, "search_seconds": 0.3022799019818194, "seconds": 1.2762607790064067}
|
| 10 |
+
subset: 2147 labelled queries, 413 pools
|
| 11 |
+
base (no term) Hit@1 0.7946 Hit@5 0.8836 Hit@20 0.8975 macro 0.9080
|
| 12 |
+
lab, with term Hit@1 0.7960 Hit@5 0.8896 Hit@20 0.8985 macro 0.9128 pools +2 -0
|
| 13 |
+
replay Hit@1 0.7960 Hit@5 0.8896 Hit@20 0.8985 macro 0.9128
|
| 14 |
+
label rank: replay == lab for 2147 / 2147 queries; top-1 status equal for 2147; largest rank difference 0
|
shared/package-files/b9/b90cf50c87342676bbe09c8ae51cac8f1e1bdf71c9feefd8e3b49ed81e3d8435/eval-B3-20k30k-full.log
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "loaded", "queries": 19429, "pools": 3386, "members": 2, "inverse_members": 0, "workers": 13}
|
| 2 |
+
{"event": "canonicalized", "unique_candidates": 828117, "unsupported": 7007, "seconds": 46.74947982298909}
|
| 3 |
+
{"event": "planned", "queries": 19429, "groups": 10176, "molecules": 944948, "simulations": 2540748, "seconds": 51.1962361879996}
|
| 4 |
+
/opt/glacier/lib/python3.11/site-packages/torch/nn/modules/transformer.py:508: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. We recommend specifying layout=torch.jagged when constructing a nested tensor, as this layout receives active development, has better operator coverage, and works with torch.compile. (Triggered internally at /pytorch/aten/src/ATen/NestedTensorImpl.cpp:178.)
|
| 5 |
+
output = torch._nested_tensor_from_mask(
|
| 6 |
+
{"event": "simulating", "finished": 64000, "total": 2540748, "seconds": 44.795899763994385, "per_second": 1428.7021878605349}
|
| 7 |
+
{"event": "simulating", "finished": 128000, "total": 2540748, "seconds": 95.81436122699233, "per_second": 1335.9166450711618}
|
| 8 |
+
{"event": "simulating", "finished": 192000, "total": 2540748, "seconds": 156.3520112769911, "per_second": 1227.9982740986645}
|
| 9 |
+
{"event": "simulating", "finished": 256000, "total": 2540748, "seconds": 224.53731132199755, "per_second": 1140.122318614938}
|
| 10 |
+
{"event": "simulating", "finished": 320000, "total": 2540748, "seconds": 293.4880397050001, "per_second": 1090.3340399208378}
|
| 11 |
+
{"event": "simulating", "finished": 384000, "total": 2540748, "seconds": 360.1647454939957, "per_second": 1066.1787551508191}
|
| 12 |
+
{"event": "simulating", "finished": 448000, "total": 2540748, "seconds": 418.1166265310021, "per_second": 1071.4713827979815}
|
| 13 |
+
{"event": "simulating", "finished": 512000, "total": 2540748, "seconds": 470.3000572279998, "per_second": 1088.6666759468078}
|
| 14 |
+
{"event": "simulating", "finished": 576000, "total": 2540748, "seconds": 522.1164347479935, "per_second": 1103.2022010148257}
|
| 15 |
+
{"event": "simulating", "finished": 640000, "total": 2540748, "seconds": 575.3273913500016, "per_second": 1112.4100983585097}
|
| 16 |
+
{"event": "simulating", "finished": 704000, "total": 2540748, "seconds": 628.9084987160022, "per_second": 1119.3997241845304}
|
| 17 |
+
{"event": "simulating", "finished": 768000, "total": 2540748, "seconds": 681.5814538519917, "per_second": 1126.7912230586815}
|
| 18 |
+
{"event": "simulating", "finished": 832000, "total": 2540748, "seconds": 733.6929246200016, "per_second": 1133.9894008531078}
|
| 19 |
+
{"event": "simulating", "finished": 896000, "total": 2540748, "seconds": 786.778832786993, "per_second": 1138.820673182214}
|
| 20 |
+
{"event": "simulating", "finished": 960000, "total": 2540748, "seconds": 841.7193612550036, "per_second": 1140.5226542117791}
|
| 21 |
+
{"event": "simulating", "finished": 1024000, "total": 2540748, "seconds": 896.5344541950035, "per_second": 1142.1758474630487}
|
| 22 |
+
{"event": "simulating", "finished": 1088000, "total": 2540748, "seconds": 951.7571967349941, "per_second": 1143.148697727096}
|
| 23 |
+
{"event": "simulating", "finished": 1152000, "total": 2540748, "seconds": 1007.1731549319957, "per_second": 1143.7953785392374}
|
| 24 |
+
{"event": "simulating", "finished": 1216000, "total": 2540748, "seconds": 1064.3267858329928, "per_second": 1142.5062454369224}
|
| 25 |
+
{"event": "simulating", "finished": 1280000, "total": 2540748, "seconds": 1121.7517844069953, "per_second": 1141.072399253335}
|
| 26 |
+
{"event": "simulating", "finished": 1344000, "total": 2540748, "seconds": 1178.0490213000012, "per_second": 1140.8693320052748}
|
| 27 |
+
{"event": "simulating", "finished": 1408000, "total": 2540748, "seconds": 1234.53782451, "per_second": 1140.507785218204}
|
| 28 |
+
{"event": "simulating", "finished": 1472000, "total": 2540748, "seconds": 1294.210176624998, "per_second": 1137.3732231333838}
|
| 29 |
+
{"event": "simulating", "finished": 1536000, "total": 2540748, "seconds": 1354.8910518829944, "per_second": 1133.6704880184313}
|
| 30 |
+
{"event": "simulating", "finished": 1600000, "total": 2540748, "seconds": 1415.960358005992, "per_second": 1129.9751373358922}
|
| 31 |
+
{"event": "simulating", "finished": 1664000, "total": 2540748, "seconds": 1473.6734530209942, "per_second": 1129.1510996475108}
|
| 32 |
+
{"event": "simulating", "finished": 1728000, "total": 2540748, "seconds": 1530.6084766400018, "per_second": 1128.9627794256785}
|
| 33 |
+
{"event": "simulating", "finished": 1792000, "total": 2540748, "seconds": 1592.978536744995, "per_second": 1124.9366885141308}
|
| 34 |
+
{"event": "simulating", "finished": 1856000, "total": 2540748, "seconds": 1658.1823645760014, "per_second": 1119.2978767896743}
|
| 35 |
+
{"event": "simulating", "finished": 1920000, "total": 2540748, "seconds": 1723.811496430004, "per_second": 1113.8108801201874}
|
| 36 |
+
{"event": "simulating", "finished": 1984000, "total": 2540748, "seconds": 1791.5775208889972, "per_second": 1107.403936959156}
|
| 37 |
+
{"event": "simulating", "finished": 2048000, "total": 2540748, "seconds": 1859.568839575004, "per_second": 1101.3305645990827}
|
| 38 |
+
{"event": "simulating", "finished": 2112000, "total": 2540748, "seconds": 1930.9721073730034, "per_second": 1093.749615510126}
|
| 39 |
+
{"event": "simulating", "finished": 2176000, "total": 2540748, "seconds": 2005.1599653080048, "per_second": 1085.200202301941}
|
| 40 |
+
{"event": "simulating", "finished": 2240000, "total": 2540748, "seconds": 2078.349586412005, "per_second": 1077.7782595598187}
|
| 41 |
+
{"event": "simulating", "finished": 2304000, "total": 2540748, "seconds": 2164.397603610996, "per_second": 1064.4994229138383}
|
| 42 |
+
{"event": "simulating", "finished": 2368000, "total": 2540748, "seconds": 2263.5635348249925, "per_second": 1046.1380754585632}
|
| 43 |
+
{"event": "simulating", "finished": 2432000, "total": 2540748, "seconds": 2378.516571646993, "per_second": 1022.4860440286833}
|
| 44 |
+
{"event": "simulating", "finished": 2496000, "total": 2540748, "seconds": 2509.6223233649944, "per_second": 994.5719627857275}
|
| 45 |
+
{"event": "simulated", "finished": 2540748, "total": 2540748, "failed": 0, "seconds": 2611.8383371969976}
|
| 46 |
+
{"event": "finished", "queries": 19429, "unscored": 0, "directly_scored": 19429, "scoring_seconds": 26.95632052900328, "total_seconds": 2709.5768285280064}
|
shared/package-files/b9/b9694748013b9646c614eb704e331f78559c87cce1b9ed50225c4135bcc38eb9/e74-term-union-hyb-both.log
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
released rule from saved branches: Hit@1 0.7783 pool-macro 0.8706 Hit@5 0.8754 Hit@20 0.9314 | twin pools 354 (macro 0.7655), others macro 0.8829
|
| 2 |
+
|
| 3 |
+
k=10 p=3.0 half=0.5 | m=10 tau=0.02 kernel=plain fps=morgan debias=fold control=none shuffle=None: alone Hit@1 0.4557 (domain 0.4201 / other 0.4915) macro 0.3783
|
| 4 |
+
lam 1.00/1.00: Hit@1 0.8029 (+0.0246 [+0.0086, +0.0460]) macro +0.0115 [+0.0053, +0.0177] pools +81 -42 | no top 20 +0.0186 cap30 +0.0186 [+0.0076, +0.0313] | Hit@5 +0.0239 macro@5 +0.0065 cap30@5 +0.0150
|
| 5 |
+
without consensus term: Hit@1 0.7783 (ref 0.7783; +0.0000 [+0.0000, +0.0000]) macro 0.8706 (+0.0000 [+0.0000, +0.0000]) pools +0 -0 cap30 +0.0000 | Hit@5 0.8754 (+0.0000) Hit@20 0.9314 (+0.0000)
|
| 6 |
+
macro Hit@5 0.9333 (+0.0000 [+0.0000, +0.0000]) pools +0 -0
|
| 7 |
+
macro Hit@20 0.9652 (+0.0000 [+0.0000, +0.0000]) pools +0 -0
|
| 8 |
+
domain 0.9374 (+0.0000) other 0.6185 (+0.0000) | Orbitrap no energy 0.5840 (+0.0000) | above 850 0.4653 (+0.0000) below 850 0.8495 (+0.0000)
|
| 9 |
+
full rule : Hit@1 0.8029 (ref 0.8173; -0.0145 [-0.0273, -0.0036]) macro 0.8822 (-0.0044 [-0.0074, -0.0015]) pools +5 -20 cap30 -0.0118 | Hit@5 0.8993 (+0.0255) Hit@20 0.9288 (+0.0243)
|
| 10 |
+
macro Hit@5 0.9398 (-0.0006 [-0.0030, +0.0015]) pools +7 -9
|
| 11 |
+
macro Hit@20 0.9628 (-0.0032 [-0.0059, -0.0009]) pools +4 -15
|
| 12 |
+
domain 0.9431 (-0.0022) other 0.6621 (-0.0268) | Orbitrap no energy 0.6314 (-0.0304) | above 850 0.5144 (-0.0411) below 850 0.8686 (-0.0084)
|
shared/package-files/b9/b98c577aafa80ccc1c381a527016ca758c6239da8627aba8bfb5a6bde98a3876/na_ion_types.py
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Which ion type explains the fragments of [M+Na]+ spectra? (train fold, labels of the TRAIN fold only)
|
| 2 |
+
|
| 3 |
+
For sampled train spectra: share of fragment intensity (m/z < precursor - 0.5; sqrt intensities
|
| 4 |
+
as in the inverse branch) that has a sub-formula of the label formula when the ion is taken as
|
| 5 |
+
sodiated (m/z - Na + e), as protonated (m/z - H + e), either, or neither. [M+H]+ spectra are a
|
| 6 |
+
reference (their 'sodiated' share measures chance matches).
|
| 7 |
+
"""
|
| 8 |
+
import json
|
| 9 |
+
import sys
|
| 10 |
+
from pathlib import Path
|
| 11 |
+
|
| 12 |
+
import numpy as np
|
| 13 |
+
|
| 14 |
+
sys.path.insert(0, '/workspace/research/allcond/pkg')
|
| 15 |
+
import inverse
|
| 16 |
+
|
| 17 |
+
rng = np.random.default_rng(0)
|
| 18 |
+
rows = {'[M+Na]+': [], '[M+H]+ no energy': [], '[M+H]+ energy': []}
|
| 19 |
+
with open('/workspace/data/train.jsonl') as stream:
|
| 20 |
+
for line in stream:
|
| 21 |
+
row = json.loads(line)
|
| 22 |
+
key = '[M+Na]+' if row['adduct'] == '[M+Na]+' else ('[M+H]+ energy' if row['collision_energy'] is not None else '[M+H]+ no energy')
|
| 23 |
+
rows[key].append(row)
|
| 24 |
+
for key, items in rows.items():
|
| 25 |
+
print(key, len(items), 'train spectra', len({r['target_inchikey'] for r in items}), 'molecules')
|
| 26 |
+
pick = rng.choice(len(items), size=min(4000, len(items)), replace=False)
|
| 27 |
+
shares = {'sodiated': [], 'protonated': [], 'either': [], 'both': [], 'peaks': [], 'top': {'sodiated': 0, 'protonated': 0, 'none': 0}}
|
| 28 |
+
for i in pick:
|
| 29 |
+
row = items[i]
|
| 30 |
+
root = inverse.parse_formula(row['target_formula'])
|
| 31 |
+
if root is None:
|
| 32 |
+
continue
|
| 33 |
+
table = inverse.SubformulaTable(root)
|
| 34 |
+
mz, inten = inverse.select_peaks(row['mzs'], row['intensities'])
|
| 35 |
+
keep = mz < row['precursor_mz'] - 0.5
|
| 36 |
+
mz, inten = mz[keep], inten[keep]
|
| 37 |
+
if len(mz) == 0:
|
| 38 |
+
continue
|
| 39 |
+
tol = inverse.tolerance_of(mz, 20, 0.004)
|
| 40 |
+
na, _, _ = table.assign(mz - inverse.ION_SHIFT['[M+Na]+'], tol)
|
| 41 |
+
h, _, _ = table.assign(mz - inverse.ION_SHIFT['[M+H]+'], tol)
|
| 42 |
+
total = inten.sum()
|
| 43 |
+
shares['sodiated'].append(inten[na].sum() / total)
|
| 44 |
+
shares['protonated'].append(inten[h].sum() / total)
|
| 45 |
+
shares['either'].append(inten[na | h].sum() / total)
|
| 46 |
+
shares['both'].append(inten[na & h].sum() / total)
|
| 47 |
+
shares['peaks'].append(len(mz))
|
| 48 |
+
shares['top']['sodiated' if na[0] else ('protonated' if h[0] else 'none')] += 1
|
| 49 |
+
n = len(shares['peaks'])
|
| 50 |
+
print(f' sampled {n}; fragment peaks per spectrum (top 50) mean {np.mean(shares["peaks"]):.1f}; '
|
| 51 |
+
f'intensity share sodiated {np.mean(shares["sodiated"]):.3f} protonated {np.mean(shares["protonated"]):.3f} '
|
| 52 |
+
f'either {np.mean(shares["either"]):.3f} both {np.mean(shares["both"]):.3f}; strongest fragment: {shares["top"]}', flush=True)
|
| 53 |
+
for lo, hi in ((1, 5), (5, 10), (10, 25), (25, 51)):
|
| 54 |
+
m = (np.array(shares['peaks']) >= lo) & (np.array(shares['peaks']) < hi)
|
| 55 |
+
if m.sum():
|
| 56 |
+
print(f' {lo}-{hi - 1} fragment peaks: n={int(m.sum())} sodiated {np.array(shares["sodiated"])[m].mean():.3f} protonated {np.array(shares["protonated"])[m].mean():.3f} either {np.array(shares["either"])[m].mean():.3f}')
|
shared/package-files/b9/b9f06e0872fa67848191be9925014bb305879bf9c389875d28f68a13f145a45a/recur-mof-5.log
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
DGL backend not selected or invalid. Assuming PyTorch for now.
|
| 2 |
+
Setting the default backend to "pytorch". You can change it in the ~/.dgl/config.json file or export the DGLBACKEND environment variable. Valid options are: pytorch, mxnet, tensorflow (all lowercase)
|
| 3 |
+
merged tol 5 mDa: 7962 of 19429 spectra in groups of >= 3; peaks 139302 -> 1015127; 0 s
|
| 4 |
+
wrote /workspace/research/inv/recur/mof-5.npz 169 s
|
shared/package-files/cb/cb1d041f6c7ed56984943cbd6808c4525c639a0326a92a31c24b585fe260ee53/eval-B10k-sub-hce10.log
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"event": "loaded", "queries": 502, "pools": 103, "members": 1, "workers": 8}
|
| 2 |
+
{"event": "canonicalized", "unique_candidates": 26064, "unsupported": 328, "seconds": 3.0041393630672246}
|
| 3 |
+
{"event": "planned", "queries": 502, "groups": 129, "molecules": 25736, "simulations": 32261, "seconds": 3.046831817016937}
|
| 4 |
+
/opt/glacier/lib/python3.11/site-packages/torch/nn/modules/transformer.py:508: UserWarning: The PyTorch API of nested tensors is in prototype stage and will change in the near future. We recommend specifying layout=torch.jagged when constructing a nested tensor, as this layout receives active development, has better operator coverage, and works with torch.compile. (Triggered internally at /pytorch/aten/src/ATen/NestedTensorImpl.cpp:178.)
|
| 5 |
+
output = torch._nested_tensor_from_mask(
|
| 6 |
+
{"event": "simulated", "finished": 32261, "total": 32261, "failed": 0, "seconds": 34.809406278072856}
|
| 7 |
+
{"event": "finished", "queries": 502, "unscored": 0, "directly_scored": 502, "scoring_seconds": 0.7901481019798666, "total_seconds": 50.95482438802719}
|
shared/package-files/e6/e614f3e10a43efafcb939209fd868bbdc2c1c38b8b8cb0ec8082fa0750438a87/eval-score-I9b+I13.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 2 members, 47.0 s
|
| 2 |
+
cos pool rule all=0.5852 dom=0.8266 non=0.3428 h5=0.6985 macro=0.6976
|
| 3 |
+
cen pool rule all=0.5716 dom=0.7976 non=0.3446 h5=0.6960 macro=0.6713
|
| 4 |
+
cos_pm pool rule all=0.5858 dom=0.8257 non=0.3449 h5=0.6989 macro=0.6973
|
| 5 |
+
dot pool rule all=0.5725 dom=0.7855 non=0.3587 h5=0.7065 macro=0.6825
|
| 6 |
+
geo pool rule all=0.5630 dom=0.8004 non=0.3247 h5=0.6818 macro=0.6804
|
| 7 |
+
idf05 pool rule all=0.5992 dom=0.8297 non=0.3677 h5=0.7050 macro=0.7026
|
| 8 |
+
idf1 pool rule all=0.5975 dom=0.8238 non=0.3703 h5=0.7113 macro=0.6994
|
| 9 |
+
lin pool rule all=0.5391 dom=0.7615 non=0.3158 h5=0.6561 macro=0.6435
|
| 10 |
+
log01 pool rule all=0.5847 dom=0.8154 non=0.3531 h5=0.7102 macro=0.6926
|
| 11 |
+
log05 pool rule all=0.5991 dom=0.8323 non=0.3648 h5=0.7168 macro=0.7082
|
| 12 |
+
log20 pool rule all=0.5998 dom=0.8300 non=0.3687 h5=0.7084 macro=0.7050
|
| 13 |
+
nll02 pool rule all=0.4247 dom=0.6731 non=0.1752 h5=0.5737 macro=0.5425
|
| 14 |
+
nll10 pool rule all=0.3830 dom=0.6158 non=0.1493 h5=0.5220 macro=0.4879
|
| 15 |
+
poolcen pool rule all=0.5665 dom=0.7832 non=0.3488 h5=0.6996 macro=0.6651
|
| 16 |
+
pow020 pool rule all=0.5475 dom=0.7712 non=0.3229 h5=0.7090 macro=0.6583
|
| 17 |
+
pow030 pool rule all=0.5691 dom=0.7880 non=0.3495 h5=0.7065 macro=0.6740
|
| 18 |
+
pow040 pool rule all=0.5828 dom=0.8059 non=0.3588 h5=0.7124 macro=0.6878
|
| 19 |
+
pow05 pool rule all=0.5956 dom=0.8244 non=0.3659 h5=0.7206 macro=0.6999
|
| 20 |
+
pow05idf025 pool rule all=0.5979 dom=0.8260 non=0.3688 h5=0.7229 macro=0.7044
|
| 21 |
+
pow05idf05 pool rule all=0.6011 dom=0.8242 non=0.3770 h5=0.7236 macro=0.7050
|
| 22 |
+
pow05m pool rule all=0.5958 dom=0.8254 non=0.3652 h5=0.7185 macro=0.7008
|
| 23 |
+
pow05s pool rule all=0.5897 dom=0.8237 non=0.3548 h5=0.7123 macro=0.6982
|
| 24 |
+
pow060 pool rule all=0.5929 dom=0.8295 non=0.3554 h5=0.7133 macro=0.7035
|
| 25 |
+
pow060idf025 pool rule all=0.5990 dom=0.8328 non=0.3643 h5=0.7181 macro=0.7094
|
| 26 |
+
pow060idf050 pool rule all=0.5957 dom=0.8323 non=0.3580 h5=0.7203 macro=0.7088
|
| 27 |
+
pow060m pool rule all=0.5910 dom=0.8300 non=0.3510 h5=0.7121 macro=0.7029
|
| 28 |
+
pow065 pool rule all=0.5953 dom=0.8314 non=0.3583 h5=0.7121 macro=0.7058
|
| 29 |
+
pow070 pool rule all=0.5931 dom=0.8314 non=0.3538 h5=0.7110 macro=0.7050
|
| 30 |
+
pow070idf025 pool rule all=0.5969 dom=0.8304 non=0.3625 h5=0.7147 macro=0.7053
|
| 31 |
+
pow070idf050 pool rule all=0.5984 dom=0.8319 non=0.3639 h5=0.7203 macro=0.7064
|
| 32 |
+
pow070m pool rule all=0.5949 dom=0.8324 non=0.3564 h5=0.7104 macro=0.7056
|
| 33 |
+
pow075 pool rule all=0.5939 dom=0.8299 non=0.3570 h5=0.7108 macro=0.7023
|
| 34 |
+
pow080 pool rule all=0.5914 dom=0.8292 non=0.3528 h5=0.7060 macro=0.7020
|
| 35 |
+
pow080m pool rule all=0.5918 dom=0.8311 non=0.3516 h5=0.7053 macro=0.7044
|
| 36 |
+
pow085 pool rule all=0.5930 dom=0.8296 non=0.3555 h5=0.7051 macro=0.7014
|
| 37 |
+
pow085idf025 pool rule all=0.5949 dom=0.8307 non=0.3581 h5=0.7071 macro=0.7050
|
| 38 |
+
pow085idf050 pool rule all=0.5996 dom=0.8302 non=0.3681 h5=0.7111 macro=0.7035
|
| 39 |
+
pow090 pool rule all=0.5916 dom=0.8296 non=0.3528 h5=0.7018 macro=0.7014
|
| 40 |
+
pow2 pool rule all=0.5439 dom=0.7692 non=0.3177 h5=0.6686 macro=0.6568
|
| 41 |
+
tani pool rule all=0.5531 dom=0.7859 non=0.3193 h5=0.6950 macro=0.6707
|
shared/package-files/e6/e648ff9e2e19f94d3b1ab306363508326ffb239560531b291ee3c5e1d6e65b62/train-I1.log
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{"args": {"store": "/workspace/research/inv", "out": "/workspace/research/runs/I1-ff512x6", "pools": "pools-validation-input.npz", "input": "/workspace/research/validation-input", "steps": 100000, "batch": 512, "real_frac": 0.2, "real_balance": 0.5, "no_synth": false, "lr": 0.0006, "weight_decay": 0.0001, "warmup": 2000, "ema": 0.999, "dim": 512, "layers": 6, "heads": 8, "dropout": 0.1, "peak_drop": 0.3, "truncate": 0.3, "min_keep": 4, "jitter": 0.15, "synth_energy_drop": 0.3, "synth_instrument_drop": 0.3, "validate_every": 5000, "retrieve_every": 10000, "retrieve_pools": 0, "seed": 1, "max_steps_this_run": 0}, "parameters": 24997832, "model": {"dim": 512, "layers": 6, "heads": 8, "dropout": 0.1, "pair_dim": 64, "fp_bits": 4096, "max_energy": 200.0}, "real_rows": 194119, "synth_rows": 2333477, "stores": {"pools-validation-input.manifest.json": "13490ff1249eca04dc3a23c94838008071da73002c497d5a614d236258301758", "real-train.manifest.json": "59912f8d472101e1f789f5f673f8ef2bdcb521e7973fcd9f4db96bc46d8e46c6", "real-validation.manifest.json": "ff9c1d5b46543ad3da990c1a3aeaa2e4f68939761224689af930a39671fdb597", "synth.manifest.json": "28d43b29c6334a14a568b8f8f412b260ad87934f687903ad927ac57a0f8e20cc"}, "gpu": "NVIDIA H100 80GB HBM3", "load_seconds": 10.601237821974792}
|
| 2 |
+
{"step": 5000, "elapsed": 186.13890091900248, "val_loss": 0.040747812007923885, "val_cos": 0.607664645954501, "val_loss_ema": 0.038519610207106245, "val_cos_ema": 0.6252824411358343}
|
| 3 |
+
{"step": 10000, "elapsed": 362.25227257201914, "val_loss": 0.03945653315487239, "val_cos": 0.6359164749295512, "val_loss_ema": 0.0381329625920117, "val_cos_ema": 0.6478792650282761, "ind_cos": 0.34844819599567656, "agg_cos": 0.37366822790673737, "ind_nll": 0.2355242163775799, "agg_nll": 0.22008338051366513, "retrieval_seconds": 37.391662998939864}
|
| 4 |
+
{"step": 15000, "elapsed": 580.5557692999719, "val_loss": 0.042058228550608145, "val_cos": 0.6346390561366868, "val_loss_ema": 0.039651410800196185, "val_cos_ema": 0.6541293982255906}
|
| 5 |
+
{"step": 20000, "elapsed": 768.8411250649951, "val_loss": 0.043526858921199264, "val_cos": 0.6386919928208156, "val_loss_ema": 0.04045961220871004, "val_cos_ema": 0.6593355409238445, "ind_cos": 0.3928148643779917, "agg_cos": 0.4162334654382624, "ind_nll": 0.2944567399248546, "agg_nll": 0.27572185907663804, "retrieval_seconds": 40.76780899090227}
|
| 6 |
+
{"step": 25000, "elapsed": 1026.3959472359857, "val_loss": 0.04438528773334159, "val_cos": 0.6429097172014933, "val_loss_ema": 0.04203060502970149, "val_cos_ema": 0.6585786283350598}
|
| 7 |
+
{"step": 30000, "elapsed": 1215.0871545899427, "val_loss": 0.045366839635107716, "val_cos": 0.6461526382919862, "val_loss_ema": 0.04303870764853159, "val_cos_ema": 0.660825981176656, "ind_cos": 0.40310875495393483, "agg_cos": 0.43069638169746255, "ind_nll": 0.31144165937516083, "agg_nll": 0.289309794636883, "retrieval_seconds": 49.146196437999606}
|
| 8 |
+
{"step": 35000, "elapsed": 1459.3268311870052, "val_loss": 0.04336966292182835, "val_cos": 0.6546922511230795, "val_loss_ema": 0.042460188359348866, "val_cos_ema": 0.6636769754518858}
|
| 9 |
+
{"step": 40000, "elapsed": 1622.9072967729298, "val_loss": 0.04611901335245276, "val_cos": 0.6464374920584243, "val_loss_ema": 0.043956673539815645, "val_cos_ema": 0.661682640961964, "ind_cos": 0.39749858459004583, "agg_cos": 0.4301816871686654, "ind_nll": 0.31205929280971745, "agg_nll": 0.2888980390138453, "retrieval_seconds": 18.959456807002425}
|
| 10 |
+
{"step": 45000, "elapsed": 1787.2611129719298, "val_loss": 0.04581547190853556, "val_cos": 0.6533226999990349, "val_loss_ema": 0.04388413401527175, "val_cos_ema": 0.6655436792697128}
|
| 11 |
+
{"step": 50000, "elapsed": 1942.9571517329896, "val_loss": 0.046504271270329425, "val_cos": 0.6506629946596422, "val_loss_ema": 0.04458398223567521, "val_cos_ema": 0.6630306731802331, "ind_cos": 0.40151320191466366, "agg_cos": 0.43676977713726906, "ind_nll": 0.31123578156364196, "agg_nll": 0.2834422770085954, "retrieval_seconds": 25.88446972204838}
|
| 12 |
+
{"step": 55000, "elapsed": 2100.881621839013, "val_loss": 0.04540461709516662, "val_cos": 0.6555062814848294, "val_loss_ema": 0.04555788825031806, "val_cos_ema": 0.6603534322887179}
|
| 13 |
+
{"step": 60000, "elapsed": 2259.801618231926, "val_loss": 0.04693030476588536, "val_cos": 0.6539168919628037, "val_loss_ema": 0.046336081780336415, "val_cos_ema": 0.658901367941447, "ind_cos": 0.3936383756240671, "agg_cos": 0.42210098306655003, "ind_nll": 0.30778732822070104, "agg_nll": 0.2840084409902723, "retrieval_seconds": 49.03888284205459}
|
| 14 |
+
{"step": 65000, "elapsed": 2478.1023216280155, "val_loss": 0.04754811765555034, "val_cos": 0.6530461082358362, "val_loss_ema": 0.04653202319784536, "val_cos_ema": 0.6593040133707988}
|
| 15 |
+
{"step": 70000, "elapsed": 2667.324969599955, "val_loss": 0.04719317626324836, "val_cos": 0.6555910125690012, "val_loss_ema": 0.04687043076664956, "val_cos_ema": 0.6569648611913087, "ind_cos": 0.38818261361881723, "agg_cos": 0.4099027227340573, "ind_nll": 0.3042359359720006, "agg_nll": 0.28241288795100106, "retrieval_seconds": 51.90488003694918}
|
| 16 |
+
{"step": 75000, "elapsed": 2874.183002720936, "val_loss": 0.04826307073415746, "val_cos": 0.6527934354432324, "val_loss_ema": 0.04762201781893569, "val_cos_ema": 0.6551878330938127}
|
| 17 |
+
{"step": 80000, "elapsed": 2990.818481713999, "val_loss": 0.04715615471365694, "val_cos": 0.6553639488449933, "val_loss_ema": 0.04705576155727967, "val_cos_ema": 0.656813556581415, "ind_cos": 0.3877193885428998, "agg_cos": 0.4161819959853827, "ind_nll": 0.30372124144320345, "agg_nll": 0.28040557928869214, "retrieval_seconds": 20.976532778004184}
|
shared/package-files/e6/e6a6e6659a649411fa75007439d647bdf23583d2c21903147bb73d17300d2669/model_manifest.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"schema": "massspecgym-retrieval-model/v1",
|
| 3 |
+
"checkpoint": {
|
| 4 |
+
"path": "model.pt",
|
| 5 |
+
"sha256": "5ad8c63711cebaebf946a95ac33f3edd7c57fd06af9184a7a6bc3324863a2e6f",
|
| 6 |
+
"format": "pytorch"
|
| 7 |
+
},
|
| 8 |
+
"model_config": "model_config.json",
|
| 9 |
+
"training_provenance": {
|
| 10 |
+
"data": "MassSpecGym v1.5 train fold",
|
| 11 |
+
"pretrained_assets": []
|
| 12 |
+
}
|
| 13 |
+
}
|
shared/package-files/ef/ef251257843f98236987449f06d2bcc25c03935762f8f88980d317dc4dfb85af/swap-recompare-N5-recur-hyb-s10-f5-p48-w0.75_0.1_0.5.log
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
without consensus term: Hit@1 0.7772 (ref 0.7685; +0.0087 [+0.0001, +0.0191]) macro 0.8698 (+0.0047 [+0.0015, +0.0083]) pools +27 -11 cap30 +0.0095 | Hit@5 0.8832 (+0.0039) Hit@20 0.9416 (+0.0058)
|
| 2 |
+
macro Hit@5 0.9365 (+0.0015 [-0.0012, +0.0041]) pools +12 -7
|
| 3 |
+
macro Hit@20 0.9675 (-0.0012 [-0.0035, +0.0015]) pools +7 -11
|
| 4 |
+
domain 0.9329 (+0.0028) other 0.6209 (+0.0147) | Orbitrap no energy 0.5867 (+0.0170) | above 850 0.4514 (+0.0297) below 850 0.8514 (+0.0040)
|
| 5 |
+
full rule : Hit@1 0.8093 (ref 0.8063; +0.0030 [-0.0084, +0.0129]) macro 0.8842 (+0.0030 [+0.0003, +0.0056]) pools +18 -8 cap30 +0.0046 | Hit@5 0.8821 (+0.0063) Hit@20 0.9086 (-0.0082)
|
| 6 |
+
macro Hit@5 0.9424 (+0.0012 [-0.0012, +0.0035]) pools +11 -7
|
| 7 |
+
macro Hit@20 0.9675 (-0.0021 [-0.0041, +0.0000]) pools +3 -10
|
| 8 |
+
domain 0.9442 (+0.0033) other 0.6737 (+0.0027) | Orbitrap no energy 0.6444 (+0.0020) | above 850 0.5286 (-0.0153) below 850 0.8732 (+0.0071)
|
shared/package-files/ef/efbf894e84d19de3b41b6f12aa3ad68b9e2229115175b9403d0f89821c7b034d/eval_blocks.py
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/usr/bin/env python3
|
| 2 |
+
"""Pooled inverse distances per fingerprint block for a multi-family target (lab, E56; labels: evaluation only).
|
| 3 |
+
|
| 4 |
+
eval_blocks.py CHECKPOINT POOLS.npz CAND_FPS.npy OUT.pkl [--block 2048]
|
| 5 |
+
|
| 6 |
+
For every pool the predicted bit probabilities of its spectra are averaged per candidate formula
|
| 7 |
+
(as in the released `pooled` inverse distance). Saved per query (candidate order):
|
| 8 |
+
all cosine distance over all bits
|
| 9 |
+
b0..bK cosine distance inside block k
|
| 10 |
+
mean mean of the block cosine distances
|
| 11 |
+
zmean mean of the block distances after standardizing each block over the pool's supported candidates
|
| 12 |
+
Prints the pool-rule Hit@1 of every variant alone.
|
| 13 |
+
"""
|
| 14 |
+
import argparse
|
| 15 |
+
import pickle
|
| 16 |
+
import sys
|
| 17 |
+
import time
|
| 18 |
+
from pathlib import Path
|
| 19 |
+
|
| 20 |
+
import numpy as np
|
| 21 |
+
import torch
|
| 22 |
+
|
| 23 |
+
HERE = Path(__file__).resolve().parent
|
| 24 |
+
sys.path.insert(0, str(HERE.parent / 'pkg'))
|
| 25 |
+
sys.path.insert(0, str(HERE.parent / 'analysis'))
|
| 26 |
+
import inverse
|
| 27 |
+
import invrun
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
def cosine(prob, bits):
|
| 31 |
+
dot = (prob * bits).sum(-1)
|
| 32 |
+
return 1 - dot / (prob.norm(dim=-1).clamp(min=1e-6) * bits.norm(dim=-1).clamp(min=1e-6))
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
def main():
|
| 36 |
+
p = argparse.ArgumentParser(description=__doc__)
|
| 37 |
+
p.add_argument('checkpoint', type=Path)
|
| 38 |
+
p.add_argument('pools', type=Path)
|
| 39 |
+
p.add_argument('cand_fps', type=Path)
|
| 40 |
+
p.add_argument('out', type=Path)
|
| 41 |
+
p.add_argument('--block', type=int, default=2048)
|
| 42 |
+
p.add_argument('--batch', type=int, default=2048)
|
| 43 |
+
args = p.parse_args()
|
| 44 |
+
device = torch.device('cuda')
|
| 45 |
+
model = invrun.load_model(args.checkpoint, device)
|
| 46 |
+
store = invrun.PoolStore(args.pools, device)
|
| 47 |
+
store.cand_fps = torch.from_numpy(np.load(args.cand_fps)).to(device)
|
| 48 |
+
bits_total = store.cand_fps.shape[1] * 8
|
| 49 |
+
blocks = [slice(start, start + args.block) for start in range(0, bits_total, args.block)]
|
| 50 |
+
names = ['all'] + [f'b{k}' for k in range(len(blocks))] + ['mean', 'zmean']
|
| 51 |
+
out = {name: [None] * store.queries for name in names}
|
| 52 |
+
tick = time.monotonic()
|
| 53 |
+
with torch.no_grad():
|
| 54 |
+
for group in store.groups(None, 6000):
|
| 55 |
+
low, high = int(store.pair_start[group[0]]), int(store.pair_start[group[-1] + 1])
|
| 56 |
+
logits = store.logits(model, low, high, batch=args.batch)
|
| 57 |
+
for s in group:
|
| 58 |
+
nq, nf = len(store.members[s]), int(store.formula_start[s + 1] - store.formula_start[s])
|
| 59 |
+
if nq == 0 or nf == 0:
|
| 60 |
+
continue
|
| 61 |
+
part = logits[int(store.pair_start[s]) - low:int(store.pair_start[s + 1]) - low].view(nq, nf, -1)
|
| 62 |
+
prob = torch.sigmoid(part).mean(0) # [F, bits]
|
| 63 |
+
cs = slice(int(store.cand_start[s]), int(store.cand_start[s + 1]))
|
| 64 |
+
which = store.cand_formula[cs]
|
| 65 |
+
supported = which >= 0
|
| 66 |
+
cand = inverse.unpack_bits(store.cand_fps[cs])
|
| 67 |
+
pred = prob[which.clamp(min=0)] # [C, bits]
|
| 68 |
+
result = {'all': cosine(pred, cand)}
|
| 69 |
+
per = []
|
| 70 |
+
for k, block in enumerate(blocks):
|
| 71 |
+
d = cosine(pred[:, block], cand[:, block])
|
| 72 |
+
result[f'b{k}'] = d
|
| 73 |
+
per.append(d)
|
| 74 |
+
per = torch.stack(per) # [K, C]
|
| 75 |
+
result['mean'] = per.mean(0)
|
| 76 |
+
if supported.sum() > 1:
|
| 77 |
+
sub = per[:, supported]
|
| 78 |
+
z = (per - sub.mean(1, keepdim=True)) / sub.std(1, keepdim=True).clamp(min=1e-6)
|
| 79 |
+
else:
|
| 80 |
+
z = per
|
| 81 |
+
result['zmean'] = z.mean(0)
|
| 82 |
+
for name, d in result.items():
|
| 83 |
+
worst = d[supported].max() + 1 if supported.any() else torch.tensor(1.0, device=device)
|
| 84 |
+
d = torch.where(supported, d, worst.expand_as(d)).cpu().numpy()
|
| 85 |
+
for qi in store.members[s]:
|
| 86 |
+
out[name][qi] = d
|
| 87 |
+
print(f'{store.queries} queries, {time.monotonic() - tick:.1f} s')
|
| 88 |
+
with args.out.open('wb') as stream:
|
| 89 |
+
pickle.dump(out, stream)
|
| 90 |
+
import scorelab
|
| 91 |
+
import infer
|
| 92 |
+
root = Path('/workspace/research/validation-input')
|
| 93 |
+
queries = list(infer.read_jsonl(root / 'queries.jsonl'))
|
| 94 |
+
pools = {r['candidate_pool_id']: r['candidates'] for r in infer.read_jsonl(root / 'candidate_pools.jsonl')}
|
| 95 |
+
ev = scorelab.Evaluator(queries, pools)
|
| 96 |
+
for name in names:
|
| 97 |
+
rank = ev.ranks(out[name], 1.0)
|
| 98 |
+
hit = rank == 0
|
| 99 |
+
first = np.array([m[0] for m in ev.by_pool.values()])
|
| 100 |
+
print(f'{name:6s} pool rule all={hit.mean():.4f} dom={hit[ev.domain].mean():.4f} non={hit[~ev.domain].mean():.4f} '
|
| 101 |
+
f'h5={np.mean(rank < 5):.4f} macro={hit[first].mean():.4f}', flush=True)
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
if __name__ == '__main__':
|
| 105 |
+
main()
|
shared/package-files/ef/efed6ca2099a4feb065029ab8f1e0c6676887395b891b8cfc8858597e71ca195/eval-score-I16.log
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
19429 queries, 1 members, 52.3 s
|
| 2 |
+
cos pool rule all=0.6007 dom=0.8360 non=0.3644 h5=0.7108 macro=0.7185
|
| 3 |
+
cen pool rule all=0.5839 dom=0.8146 non=0.3522 h5=0.7007 macro=0.6949
|
| 4 |
+
cos_pm pool rule all=0.6007 dom=0.8360 non=0.3644 h5=0.7108 macro=0.7185
|
| 5 |
+
dot pool rule all=0.5949 dom=0.8070 non=0.3819 h5=0.7083 macro=0.7070
|
| 6 |
+
geo pool rule all=0.5895 dom=0.8284 non=0.3497 h5=0.7005 macro=0.7123
|
| 7 |
+
idf05 pool rule all=0.6092 dom=0.8411 non=0.3765 h5=0.7216 macro=0.7242
|
| 8 |
+
idf1 pool rule all=0.6106 dom=0.8398 non=0.3804 h5=0.7285 macro=0.7209
|
| 9 |
+
lin pool rule all=0.5586 dom=0.7924 non=0.3240 h5=0.6765 macro=0.6810
|
| 10 |
+
log01 pool rule all=0.6051 dom=0.8307 non=0.3786 h5=0.7344 macro=0.7144
|
| 11 |
+
log05 pool rule all=0.6179 dom=0.8467 non=0.3882 h5=0.7306 macro=0.7277
|
| 12 |
+
log20 pool rule all=0.6132 dom=0.8446 non=0.3809 h5=0.7235 macro=0.7259
|
| 13 |
+
nll02 pool rule all=0.4443 dom=0.7104 non=0.1771 h5=0.5842 macro=0.5836
|
| 14 |
+
nll10 pool rule all=0.4087 dom=0.6546 non=0.1618 h5=0.5515 macro=0.5340
|
| 15 |
+
poolcen pool rule all=0.5770 dom=0.7945 non=0.3585 h5=0.7126 macro=0.6902
|
| 16 |
+
pow020 pool rule all=0.5642 dom=0.7923 non=0.3351 h5=0.7152 macro=0.6828
|
| 17 |
+
pow030 pool rule all=0.5885 dom=0.8126 non=0.3634 h5=0.7295 macro=0.6991
|
| 18 |
+
pow040 pool rule all=0.6005 dom=0.8261 non=0.3740 h5=0.7326 macro=0.7120
|
| 19 |
+
pow05 pool rule all=0.6047 dom=0.8346 non=0.3738 h5=0.7288 macro=0.7212
|
| 20 |
+
pow05idf025 pool rule all=0.6049 dom=0.8362 non=0.3727 h5=0.7351 macro=0.7215
|
| 21 |
+
pow05idf05 pool rule all=0.6063 dom=0.8406 non=0.3711 h5=0.7366 macro=0.7245
|
| 22 |
+
pow05m pool rule all=0.6047 dom=0.8346 non=0.3738 h5=0.7288 macro=0.7212
|
| 23 |
+
pow05s pool rule all=0.6046 dom=0.8407 non=0.3675 h5=0.7241 macro=0.7215
|
| 24 |
+
pow060 pool rule all=0.6123 dom=0.8425 non=0.3812 h5=0.7254 macro=0.7253
|
| 25 |
+
pow060idf025 pool rule all=0.6118 dom=0.8466 non=0.3761 h5=0.7277 macro=0.7283
|
| 26 |
+
pow060idf050 pool rule all=0.6162 dom=0.8475 non=0.3840 h5=0.7312 macro=0.7274
|
| 27 |
+
pow060m pool rule all=0.6123 dom=0.8425 non=0.3812 h5=0.7254 macro=0.7253
|
| 28 |
+
pow065 pool rule all=0.6121 dom=0.8444 non=0.3789 h5=0.7224 macro=0.7277
|
| 29 |
+
pow070 pool rule all=0.6140 dom=0.8454 non=0.3817 h5=0.7203 macro=0.7289
|
| 30 |
+
pow070idf025 pool rule all=0.6149 dom=0.8492 non=0.3796 h5=0.7236 macro=0.7307
|
| 31 |
+
pow070idf050 pool rule all=0.6124 dom=0.8486 non=0.3752 h5=0.7289 macro=0.7283
|
| 32 |
+
pow070m pool rule all=0.6140 dom=0.8454 non=0.3817 h5=0.7203 macro=0.7289
|
| 33 |
+
pow075 pool rule all=0.6132 dom=0.8448 non=0.3806 h5=0.7204 macro=0.7271
|
| 34 |
+
pow080 pool rule all=0.6121 dom=0.8446 non=0.3786 h5=0.7180 macro=0.7259
|
| 35 |
+
pow080m pool rule all=0.6121 dom=0.8446 non=0.3786 h5=0.7180 macro=0.7259
|
| 36 |
+
pow085 pool rule all=0.6095 dom=0.8414 non=0.3767 h5=0.7152 macro=0.7242
|
| 37 |
+
pow085idf025 pool rule all=0.6109 dom=0.8437 non=0.3771 h5=0.7241 macro=0.7262
|
| 38 |
+
pow085idf050 pool rule all=0.6111 dom=0.8437 non=0.3775 h5=0.7242 macro=0.7259
|
| 39 |
+
pow090 pool rule all=0.6091 dom=0.8404 non=0.3770 h5=0.7145 macro=0.7233
|
| 40 |
+
pow2 pool rule all=0.5739 dom=0.8078 non=0.3391 h5=0.6888 macro=0.6920
|
| 41 |
+
tani pool rule all=0.5812 dom=0.8111 non=0.3504 h5=0.7130 macro=0.7014
|