diff --git a/code/MANIFEST.json b/code/MANIFEST.json new file mode 100644 index 0000000000000000000000000000000000000000..bfcee42ac1c25fbc278be4d1d7aeb0702be88c36 --- /dev/null +++ b/code/MANIFEST.json @@ -0,0 +1,2330 @@ +{ + "files": { + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/EXECUTION.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/EXECUTION.md", + "bytes": 8566, + "sha256": "9ba354439cb520c77b1d5259bea3bbdb7773b4c7c2ed69291d502b21edaf5623" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/METHOD.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/METHOD.md", + "bytes": 17570, + "sha256": "e7cae5187c8c586e6b65b57000ec5bb22c0a459b96598d9924d1e6560b3a9f8b" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/ablation_matrix.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/ablation_matrix.json", + "bytes": 100522, + "sha256": "3d2150c29f8b8a96a23cab5467d6e7e5bd340655f33b9489cc7d0fcf04563d10" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/acceptance_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/acceptance_ceir.py", + "bytes": 7387, + "sha256": "f8a11ece73d5bc111de5b5f0bb3b9e94f269f5e2705def6e37cbc516e6ade39e" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/comparison_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/comparison_ceir.py", + "bytes": 6069, + "sha256": "6857c1cce026e03c9760bcd6f251c98773fee10368331e1908a60f66496e2499" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/data_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/data_ceir.py", + "bytes": 7852, + "sha256": "42138ae882a1a33587499e899188cd9ab4387e4efe3ad78fbdf18ceae26d3dd7" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/debug_parity_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/debug_parity_ceir.py", + "bytes": 2110, + "sha256": "1671b16a1bf8d522846f34530096f97a8996dd63c6c279a444da19e0a4a0fa2f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/evidence_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/evidence_ceir.py", + "bytes": 6322, + "sha256": "adf31e83a5e6b3d7fcc1e87cc4bb353a6fec0c491f05bd8c93806d1ed038258d" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/mces_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/mces_ceir.py", + "bytes": 5319, + "sha256": "4b7bc7603b1c38ebd6106aa6ecb11f0973b9a4516e54b9a4a791306931db525d" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/model_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/model_ceir.py", + "bytes": 10290, + "sha256": "bcb426f0c3fb0baef24d620a8ec12f1f8a2663ec9f0b7a04c540b92dd2927bce" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/objective_sanity_checks.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/objective_sanity_checks.py", + "bytes": 2974, + "sha256": "873cbcdf2aefe0ec634f808d5384eb6ee71a3f90abd866d5b7e88adf87c4c848" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/objective_sanity_validation.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/objective_sanity_validation.json", + "bytes": 645, + "sha256": "cf37abcf5484d3d14c145c45b3174f7178ce34474d3e44ac771631a0b49146b8" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/objectives_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/objectives_ceir.py", + "bytes": 10783, + "sha256": "ecef5716a1f61908607b3afc772fed1e505b60ba418888a7991a8c4e24f24617" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/pipeline_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/pipeline_ceir.py", + "bytes": 7926, + "sha256": "90bfe700724976dc35edea4ded1ff073d8274c8c6c149b599d421d3864052ff3" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/plan.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/plan.json", + "bytes": 10894, + "sha256": "f2f6c2a9a196271653151f9905b4a31a9b292a22c7238da04c216415a800f757" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/prepare-evidence.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/prepare-evidence.supervisor.conf", + "bytes": 1429, + "sha256": "f1b9c886a135374a3f0bba38ef9ca6ff2b9f4004dd3a36e8d449c08971c5a34b" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/prepare_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/prepare_ceir.py", + "bytes": 22948, + "sha256": "aaa990be25302a5e2c1d4ab81447620434dc202db20de9bcfdf7659b658f8476" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/reference/diagnosis.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/reference/diagnosis.json", + "bytes": 272928, + "sha256": "1a031037a7eda329034dc82343ddf22593eb6e09f64edfd5d1b406fb2eb06dcb" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/refresh_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/refresh_ceir.py", + "bytes": 866, + "sha256": "a706d167d38842e8c6b33baf963b5a04e0ae07b179a66088bda6260871d7f886" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/runtime_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/runtime_ceir.py", + "bytes": 6812, + "sha256": "e69ca5e8bf0558e946bda46c0f2eb576090ae58c3da4b12cf4778f64998bbbfb" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/sampling_ledger_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/sampling_ledger_ceir.py", + "bytes": 2700, + "sha256": "2d5284be81a9b6a0a63b4e8914ac3d360b677ae14a31f257a9aee206f172f09b" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/test_comparison_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/test_comparison_ceir.py", + "bytes": 2463, + "sha256": "a3273d222d1d1d2aadc3d5043d4ca48b7807fc9d6db01f691629ea75ebced9fd" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/test_evidence_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/test_evidence_ceir.py", + "bytes": 2198, + "sha256": "b7c8c06efd70123cc287629a901a8448ebce7a9f50f68b6edfbf00ea6444a0aa" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/test_sampling_ledger_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/test_sampling_ledger_ceir.py", + "bytes": 1864, + "sha256": "7a9fcda9f439aa696b586d281eadcd1f67a2237470ad6e388496d949737aeb73" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/train_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/train_ceir.py", + "bytes": 7956, + "sha256": "d030ba3ee2ef0159367ce4cada131faa1294725f9bd4a96d4447758cc0a595f6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/training.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/training.supervisor.conf", + "bytes": 3369, + "sha256": "76edc228a49482e96d4367671824a1ba270ba0aa57a9104a3bb6ae59257172e9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/validate_plan.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/validate_plan.py", + "bytes": 8998, + "sha256": "f39fdb5480475cf66b014299cde989a7bbc022788cfab6957ab32c9080b12322" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/validation.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/validation.json", + "bytes": 1789, + "sha256": "9336d7d08c8015c6f3c5f23071807c5651179f1776dfc50a9434a5980e0bf05f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_20261109/validation_ceir.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_20261109/validation_ceir.py", + "bytes": 9874, + "sha256": "6f7f24d6d54d24c7785a3c7b5ae37133214991b5a2283e00e8d752d6aac58657" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/config.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/config.json", + "bytes": 1287, + "sha256": "c38c3a609e923b27921c33c9d3882f4bc7ef4946f1948ef0589723a20672af5a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/evaluation_runtime.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/evaluation_runtime.py", + "bytes": 6934, + "sha256": "145d9bafbe983f070bf1b22abb1a34480be81479dcc436909388627ee67809e9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/infer.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/infer.py", + "bytes": 16427, + "sha256": "1ff90611ee3324b336dcb4030ef82570249fbdf9b45c6b85d2fe38b7b46ca6fb" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/mces.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/mces.py", + "bytes": 6305, + "sha256": "f112d66b998c6b539069e3797d38b3c6146a1bc2e774d848a539513e0f28add4" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/parallel-models.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/parallel-models.supervisor.conf", + "bytes": 3253, + "sha256": "7c2127f656ca68a3bf4eeb56765fc9a5133350b7482d7d15190f8ac389949589" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/prepare.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/prepare.py", + "bytes": 4281, + "sha256": "2adaaee67d290c69400998b7457e5670972946b3396d191803f224360f4a45d6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/supervisor.conf", + "bytes": 2824, + "sha256": "9d1f14b2cf2d7e066c79d272a8bedd0653ca77e9f42c72f686dd99ac57182938" + }, + "/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/test_logic.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r1_test_comparison_20261110/test_logic.py", + "bytes": 1974, + "sha256": "3abfcbb0b7426850fa71afb06d5475c0b2d0c084a44a6da38a184b6a6f116684" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/METHOD.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/METHOD.md", + "bytes": 7799, + "sha256": "12e59e6b0297849e79eb5dddbe4fb20f6c5b1943333a0a6573a6a1706deb4b8c" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/acceptance_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/acceptance_r2.py", + "bytes": 7643, + "sha256": "9f03b00c674f55108e31b3297906591712bd1ce80fac51d76f190d3eeface68f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/analyze_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/analyze_r2.py", + "bytes": 4535, + "sha256": "25bc99edda1cbf670c0dee81f187bdf96cd25ffd0ddb384859486a2c8a831feb" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/audit_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/audit_r2.py", + "bytes": 4908, + "sha256": "0f58f9f7cf4e6d5d2ebd0723cfb101863091db03ea210bd55b137412cc16be76" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/benchmark.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/benchmark.supervisor.conf", + "bytes": 581, + "sha256": "6d4adfb4bd845dd0a2a0b314690822507b31ae3252efc4b9eed35d6a3c0fbb93" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/benchmark_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/benchmark_r2.py", + "bytes": 1642, + "sha256": "2fc77d77ca5f691a052e5188e850ff1205368af5437002618612a4a665a421e9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/canonical_cache_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/canonical_cache_r2.py", + "bytes": 7497, + "sha256": "bb4e4a78876e64bf4db3ca58701a1267a93a88c38a29265325904abddc5da773" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/config.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/config.json", + "bytes": 1778, + "sha256": "09d126bcefd38d344bfb66fae1b6f788e46cc39c2d0d61bce651212945e1d149" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/data_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/data_r2.py", + "bytes": 3371, + "sha256": "46a24ff6a483fdd2bdf327e59608bd3501d5278a072ad427ca366d193c357e7f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/features_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/features_r2.py", + "bytes": 6542, + "sha256": "66e447320d3410eacbfa4e8d4bf9d2277f5c5e70a87ad96ec39d833c06df2956" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/mces_monitor_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/mces_monitor_r2.py", + "bytes": 585, + "sha256": "9edb0e432e5d0ec4b2e6a51260a538b9db0c2aa12922187e478c4af86037faaa" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/mces_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/mces_r2.py", + "bytes": 1308, + "sha256": "b38b31d5b454903fc78f2baeccd7aeb4adc7db3bcde8f1c32c24bf835ae2a19d" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/model_r2_new.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/model_r2_new.py", + "bytes": 11415, + "sha256": "54d8dc53c90f90c76ea4b4519412ce4238eb08cbf388b3081fe20bd2961ed608" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/objectives_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/objectives_r2.py", + "bytes": 9031, + "sha256": "acc97163073201ed6eba35eb9bc57e1fa9146044b0e3c23680bfceb149203515" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/pipeline.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/pipeline.supervisor.conf", + "bytes": 578, + "sha256": "61e5520a66effca13547f1d54cd45e4b589e9dab69e757269ecab1ddab20f81a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/pipeline_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/pipeline_r2.py", + "bytes": 5532, + "sha256": "dec0c2c203ff661d52453fb7dda84081fd175ac58e7fbd5b3b37bb1ff035ed1c" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/preflight.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/preflight.supervisor.conf", + "bytes": 547, + "sha256": "5bc3486542a16ccf716a5a726e94df48f8b64937df45c5009376991c2de4e8f3" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/preflight_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/preflight_r2.py", + "bytes": 433, + "sha256": "422a8a2f58fa1d15ec06b3af0c0a38c44fdb7827308e20cd320ed597316b8326" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/prepare.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/prepare.supervisor.conf", + "bytes": 524, + "sha256": "325e640034a0b7acefcacd3c77a3222c8e07544a3fd98610cabcd4feab341eff" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/prepare_probe_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/prepare_probe_r2.py", + "bytes": 1959, + "sha256": "10395f0e7f5b7df8170057cac6538c28e84712b0184189cd621166f16429b035" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/prepare_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/prepare_r2.py", + "bytes": 10094, + "sha256": "70db51bc543ec6ccb39cac8edf6c5736440a23af053b2f33269719feb01db307" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/prepare_test_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/prepare_test_r2.py", + "bytes": 3795, + "sha256": "9fb1f3759886f29c57389c3a124da6a09ad79c9a109a7381e77d27307750626a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/runtime_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/runtime_r2.py", + "bytes": 4884, + "sha256": "17632473cc2d29113dd727d492f2c00079b6edf486c6d05af7ab1b912644f9da" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/test_features_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/test_features_r2.py", + "bytes": 1664, + "sha256": "04289c935d20f3aa25cba1baca927e88327c7de07e1b4bc8273f20dcbe2be68a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/test_mces_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/test_mces_r2.py", + "bytes": 1356, + "sha256": "4605c99c8427f83e83335c2e3a587cc422396a0664c88b9aa375a45c3358b062" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/test_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/test_r2.py", + "bytes": 3979, + "sha256": "079b1eb8f192ab4b0d5229a838069d7e9b0da004692d45f71f2c8abddffdc0dc" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/train_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/train_r2.py", + "bytes": 6311, + "sha256": "cc78ff91dab8e1cc0a6b660755bc9d45aa8f1062a911cd4d4c51be7d9b461f71" + }, + "/root/xj/SpecPartition-MS/code/ceir_r2_20261110/validate_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r2_20261110/validate_r2.py", + "bytes": 8237, + "sha256": "9e60ba44174399c7df27bfb2db02787ad5100689fb470252b7caf27d7cbd58e0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/METHOD.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/METHOD.md", + "bytes": 8468, + "sha256": "a92f63c46de954d9028e89355cc2fdfb57ce2364f04fda21a0605615e49de225" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/acceptance_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/acceptance_r3.py", + "bytes": 5350, + "sha256": "a06d39ba15f88bf391d3aad02678e31edecc78a2f348ad5281e5afd0d6d9bc38" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/analyze_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/analyze_r3.py", + "bytes": 3647, + "sha256": "0f5f519c1eb301873901d74bf60c4d94cfcc9c86298b92941ce4448a10fce7bd" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/audit_primitives.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/audit_primitives.py", + "bytes": 16711, + "sha256": "35978493195891ffddadf5917a7fdbf1861a74350e92830f36cb85d095e04e13" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/audit_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/audit_r3.py", + "bytes": 1980, + "sha256": "75c074d229f9a786ee8afbee79ba447c10b264ac9aa13bb71022fb4706ac607b" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/compact.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/compact.supervisor.conf", + "bytes": 613, + "sha256": "3dd4b55abcfac351395ba9f4df1b50f41ea4a36fce5798effe165faee08bda16" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/compact_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/compact_r3.py", + "bytes": 4517, + "sha256": "1b4403fa7afb8e3ca00a8aaf8e5dfddfd2d6bf66e9df5de6a9020fb9b5f84593" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/config.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/config.json", + "bytes": 1969, + "sha256": "20bb75164505a6998310c72df852f424143a54849e7dc1db96fbdda06601cfd0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/data_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/data_r2.py", + "bytes": 3334, + "sha256": "cb15b3371c72e64469286e8d4049193a1edc57e680a036767d8482229cfbd4ef" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/features_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/features_r2.py", + "bytes": 9389, + "sha256": "6d8477f07c0b86c2b4edacb12550ac653fa8e5b7ff4042b857e5a3dc3af47016" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/final_audit_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/final_audit_r3.py", + "bytes": 2115, + "sha256": "a88d13d9865c1c3c76be18c695f5bcdc3c5c9687b5f52c3deb01097c17d895e6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/heads_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/heads_r3.py", + "bytes": 6476, + "sha256": "f67fe3da8277976b98c67416e6d207f5d4e8a8a2d6a7d9adc51e967371823366" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/mces_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/mces_r2.py", + "bytes": 1282, + "sha256": "3e1ccebf643f4eb2f631429a690430e20a5a9de01fd830c8e8f17a9497be99a4" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/model_r2_new.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/model_r2_new.py", + "bytes": 13061, + "sha256": "3ebdba5dd78fd31b0236df957f6841f36cebcb35de2c738c6e3741468b378d8a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/objectives_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/objectives_r2.py", + "bytes": 9645, + "sha256": "30eeb134e26412deeab2e507a174b9674bebdcc4ac0d9b8376c046b5ce47a6ec" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/pipeline.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/pipeline.supervisor.conf", + "bytes": 578, + "sha256": "e53e8cb9ca2920e840e30e4061f00860798739392e7efdae43198a0744e1aed1" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/pipeline_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/pipeline_r3.py", + "bytes": 4121, + "sha256": "929918846dc64bd4c31ccf8a027c808c695e47470da3395ce13283c748807741" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/prepare.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/prepare.supervisor.conf", + "bytes": 541, + "sha256": "18734cd0c8e519633573e171ac9b6a2ee83034804674b2c20c85c5bb58a5aabb" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/prepare_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/prepare_r3.py", + "bytes": 9289, + "sha256": "a8561ac4f87971c4c2f0e9e3c1c29c3269ffcce103defdcde5982f294876868f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/probe_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/probe_r3.py", + "bytes": 1253, + "sha256": "9d287552a52513b6cdf5885ba43b1c80e5562cc23a86ef36f3959a23ea275565" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/runtime_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/runtime_r2.py", + "bytes": 5572, + "sha256": "9b2963d3e49740f869146c68389acc869b089dd964822e32f6fc6480d56166f7" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/test_mces_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/test_mces_r2.py", + "bytes": 1305, + "sha256": "3370d28a538a854657eda0ce13bbd2f82aa35a3a7dfb95010288cfe1adad114f" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/test_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/test_r3.py", + "bytes": 3385, + "sha256": "fe125f940f0ed130fbaedc318c5d1e9556079f733076fec08260de61ead6c382" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/tests_r3.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/tests_r3.py", + "bytes": 3213, + "sha256": "c0a1723db5b46aa1114b2a2be1821bcf21c04c3431b5a6ef73f79fe139dc41b5" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/train_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/train_r2.py", + "bytes": 7692, + "sha256": "076b47990c2d45713f02fbd9407374b39c4298ad3edd9dca73ace42d480dbb41" + }, + "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/validate_r2.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r3_20261110/validate_r2.py", + "bytes": 8211, + "sha256": "e14d5a45483581785d76560bd8a7acc597ce3acfed648d620c0c344056fc2283" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/README.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/README.md", + "bytes": 4581, + "sha256": "df0d3cc4be4463188acaeaa4f187b3b3e3ea33fdae19e0d4a9df8cb73d5183b8" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/accept4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/accept4.py", + "bytes": 4916, + "sha256": "63d4afd02bd53289415050d73c2642f0e113c4a729cc1810e9f39f58048197af" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/common4.py", + "bytes": 2570, + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/config.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/config.json", + "bytes": 1654, + "sha256": "69e48af6f6d75bf8662c744e4b1be5575b1d7518619fed003d0b422de0e08881" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/data4.py", + "bytes": 4078, + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/duel4.py", + "bytes": 4830, + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/eval4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/eval4.py", + "bytes": 12826, + "sha256": "1ec0cc831a23a67ef76afcbecaeec48f5fb2578d72883f687b5a39e297561fb2" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/mces4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/mces4.py", + "bytes": 1868, + "sha256": "e5ee43fe8b29858836cfa0aa7a4e56aa660eaa075324b22bfe9b4e276925366e" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/model4.py", + "bytes": 7267, + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/objectives4.py", + "bytes": 11378, + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/pipeline.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/pipeline.supervisor.conf", + "bytes": 569, + "sha256": "d964dbd20c0c8f27aff76468e0fd742701c9ac0b14f5d1b468a39f8671ee8de8" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/pipeline4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/pipeline4.py", + "bytes": 4412, + "sha256": "21fa840d52030faf831716838f33cce8d79509dad56c259a426346bc48760e21" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/prep.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/prep.supervisor.conf", + "bytes": 535, + "sha256": "9619609bf3ae7d869dc668de8d34213554f32b03777d430244eaa23e400a71da" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/prepare4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/prepare4.py", + "bytes": 9619, + "sha256": "77c9426225430bcebbec03cabae89b960495453c3e5dd0dd146445ed965c6b41" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/report4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/report4.py", + "bytes": 3865, + "sha256": "07b7d7511762f5083fdae3870e7e7e1e3c1ff1afb92374a401e93bad8e9472f9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/run4.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r4_9000_20261112/run4.py", + "bytes": 8818, + "sha256": "c1badd7d328265946ef0c7cb6bc02be3ef8b418d1a075b4afc93b12687f1be27" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/README.md": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/README.md", + "bytes": 5841, + "sha256": "623bbaaf263144420d71953b2705329e59aa6a5a912f5d740d6140c66ddd54a0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/accept5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/accept5.py", + "bytes": 7472, + "sha256": "763de2a04798fe9a60f07cfc030a00c95fd5c46e874263f704efae7ef3da59e4" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/addendum.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/addendum.supervisor.conf", + "bytes": 566, + "sha256": "6873175b9de192ee47ee5219e3d10d2cce4c41eecbca2ef8b0dbb7aef7b271ec" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/addendum5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/addendum5.py", + "bytes": 2536, + "sha256": "62a5be906b859215702cbde641b7290372197ce3615b0c01c18115b88d4fe5b6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "bytes": 6058, + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "bytes": 2952, + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "bytes": 5624, + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "bytes": 4953, + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/data.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/data.supervisor.conf", + "bytes": 585, + "sha256": "b0c96b9650174f8873398da123270fc707330882fd18b093ca3b9dcbeb2b843b" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/data_pipeline.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/data_pipeline.py", + "bytes": 657, + "sha256": "def170d9efe270edf4cdc151b5667207ca3713395f83ef115889d60b02621fcf" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/eval5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/eval5.py", + "bytes": 6619, + "sha256": "f5c467a1d1e0ea3b906761ce4b0c5c476784398115355a6259207c8dacf73e17" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/format_report5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/format_report5.py", + "bytes": 5361, + "sha256": "b9423501acc57444dae1b8cbab5d0af4e93d63343859fbd0871cc30ce38d1dd9" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "bytes": 5563, + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "bytes": 2783, + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/ledger.supervisor.conf", + "bytes": 583, + "sha256": "be0d6afeed8995ea7478a38a6c2b7662196958b9bc23be80a2aa49b55170c2ea" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "bytes": 4799, + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/mces5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/mces5.py", + "bytes": 1876, + "sha256": "6f2ce0203c468246eee3331972486c0c5e6b6f93de15afcc1371c56f16be7c16" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "bytes": 6092, + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "bytes": 13732, + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "bytes": 1346, + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/pipeline.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/pipeline.supervisor.conf", + "bytes": 615, + "sha256": "a4df917fa039549260ba6012b9405d0c19dad092fee4d2b419d57e3c999a8eb0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/pipeline5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/pipeline5.py", + "bytes": 4253, + "sha256": "a35864021a8a361475000582e10c8b0f4b558f846df50d1ecfcd97ed85a24e3a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "bytes": 2048, + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/recover_data5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/recover_data5.py", + "bytes": 914, + "sha256": "1e1c0a172f0230602af853945833f54cab7c28be153afa11f43d1c28798ed488" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/recovery.supervisor.conf": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/recovery.supervisor.conf", + "bytes": 593, + "sha256": "25c6084c48b564472351869e0c3a753ed08183b3bfbeb14d1e4f294ab303b2b7" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "bytes": 4429, + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/report5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/report5.py", + "bytes": 6061, + "sha256": "957f331ea8e4c503f9cfebde0fde5a724f5d3ddacff20c2c82dba0ba881f3a4a" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "bytes": 5384, + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/status5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/status5.py", + "bytes": 2339, + "sha256": "55bb80c5d0ef2ddd16e0ee9b5458ec048a504655f5b7b7a3a05f07c5d1c25a79" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "bytes": 4004, + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "bytes": 10195, + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/verify_live_lineage.py": { + "path_in_repo": "code/snapshot/root/code/ceir_r5_from_r4d_12000_20261112/verify_live_lineage.py", + "bytes": 2723, + "sha256": "cc15d2d79b1ec12805933d0ec11a73d8f27612adcd1de57af56abf25aa97761c" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/confirm.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/confirm.py", + "bytes": 4867, + "sha256": "4444b8fc660409db8a71c26fb5f3f8a3c1edac0c310c9b4805542e337984dbb3" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/confirmation_protocol.json": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/confirmation_protocol.json", + "bytes": 1523, + "sha256": "0ae5510eb66c6b0dd7fd0e665b9a904b9407c89ba61a5a0ef6306d0f06a010f9" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/evidence.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/evidence.py", + "bytes": 4816, + "sha256": "f73cadf111378a3180e4ea661cb9b19e75d3c493b16128831ce4c62c8cca0a10" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/guard.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/guard.py", + "bytes": 4281, + "sha256": "e75427871bb9e73093aaf7307c7bc6c4a46043db0944a426f1ef55fbb09f4f2c" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/ions.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/ions.py", + "bytes": 5862, + "sha256": "2ae96e1c732da0c5dfb5f069a21a558aa4d34ffbb7f933ff160ab09ce03ca25b" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/pilot.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/pilot.py", + "bytes": 6909, + "sha256": "7f8e842f63d7ec1b9da653315ae4a34719f870b5a1a38a3c20b516d736aca8af" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/pilot_protocol.json": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/pilot_protocol.json", + "bytes": 998, + "sha256": "164689e23e5f057ba38074cd7b993a7b1472fce9178be64199fd1529bce1294a" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/test_evidence.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/test_evidence.py", + "bytes": 3502, + "sha256": "6a349ed7b7cc9aded7561c39ce4e106a69cc5d0c5288fff13009339c53d08a5e" + }, + "/root/xj/SpecPartition-MS/code/r5_evidence_pilot_20261112/test_guard.py": { + "path_in_repo": "code/snapshot/root/code/r5_evidence_pilot_20261112/test_guard.py", + "bytes": 2482, + "sha256": "b7c3198ae26050cae0241cb677145613b631765b2bb726df3ca305cf841625d2" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/assets.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/assets.supervisor.conf", + "bytes": 576, + "sha256": "80098a82d056d6e47f4436acb1e65c2041ca2d56c38cb77aeb5bceccc4cb3e34" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/batch_pilot.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/batch_pilot.supervisor.conf", + "bytes": 596, + "sha256": "85aa1ab12967f3e003a6765bee1f4c0f7c03d25f5d6c1452273fe248ab1910ed" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/candidate_pilot.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/candidate_pilot.py", + "bytes": 1709, + "sha256": "af00f5ba084a5f4ba10a94d64c38ac2d9234dc262d3f692d9675e7ac610802ba" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/common.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/common.py", + "bytes": 6460, + "sha256": "c94a601b889fdfbf06ed77b164506401985ba57f7cc2b4cfcce830db6b6f8027" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/compact_candidates.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/compact_candidates.py", + "bytes": 6367, + "sha256": "cd6c2d13bfab7de4e22436f095f49a98ed10b33deba610e4f10f84557903044c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/config.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/config.json", + "bytes": 1590, + "sha256": "2fdae76a84e7187bfc24f1d4d864e30173c94ea7dab9a48ee2329fb6b3c6f5ed" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/formula_queue.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/formula_queue.supervisor.conf", + "bytes": 586, + "sha256": "d8d3cd6b3d911937ba9123fa5d18c9a1e4aee654ce36c959820fdd066aaccb8a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/formula_recovery.before_timeout_fix_20261101.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/formula_recovery.before_timeout_fix_20261101.py", + "bytes": 4099, + "sha256": "a0d87485d924b900877435e165d3f5851d00129e58da3a64ad31fcd789bb3cb5" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/formula_recovery.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/formula_recovery.py", + "bytes": 6785, + "sha256": "fb95a376622ab2fb7c32ac0d2cde4bde6b937030e0bb1c37ba4412af806717a6" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/import_verified_pilots.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/import_verified_pilots.py", + "bytes": 2015, + "sha256": "8f681eb1446aad8883a6ce244d95e74f89fb598e3b319ffca699874b82381238" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/index.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/index.supervisor.conf", + "bytes": 583, + "sha256": "3f23d562ee77ccd1f6d259f8dfe2c8d7d573d9e674d765ac57cab60f0e2938fc" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/key14_assets.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/key14_assets.py", + "bytes": 7138, + "sha256": "d1812b634852ad7f4895af8a19577d3f004a6849be332e3dd470d2235d674195" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/losses_r04.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/losses_r04.py", + "bytes": 2699, + "sha256": "82b47e0d3a966259afa1d85151b4d2922387ffe836e268acb8cf75b7c35e9ea8" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/negative_release.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/negative_release.py", + "bytes": 14030, + "sha256": "5448971ac074d11a7b3dc76b1b6419bfeb477305df07b999b37477df54bc01a7" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/negative_release.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/negative_release.supervisor.conf", + "bytes": 586, + "sha256": "3b458091de3d50f642851e3a670a834d8f2a974abe2b5fca368793756e0d32d4" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/negative_safety.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/negative_safety.supervisor.conf", + "bytes": 584, + "sha256": "3276d84590e0df95ae80176504f8c86ec3365e25b91fd68395622f2a3046b35a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/pilot.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/pilot.supervisor.conf", + "bytes": 578, + "sha256": "a940730d7e28368664095a46d9f67d062cd96cc8eb6a697b42340f11fee11e6f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/prepare_index.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/prepare_index.py", + "bytes": 5658, + "sha256": "ae22a8ed3f8e0bde3ac6b2983bc0e2482487e6e33f7ae11cff09cb4de36daf89" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/pubchem_pilot.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/pubchem_pilot.supervisor.conf", + "bytes": 576, + "sha256": "f3d8761700866df2d42c6d708843311d008a39f0f81591f378c9a0cf1e392f76" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/pubchem_queue.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/pubchem_queue.py", + "bytes": 3037, + "sha256": "1a5e5bcfb67def6f7857b3070a280fa9e7158acf94efdffbe845b64fc1af130e" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/pubchem_queue.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/pubchem_queue.supervisor.conf", + "bytes": 574, + "sha256": "ab23f86b1993071325110df59ae35a5a3a3e77384613680d9cc9e047b02b0778" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/pubchem_stage.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/pubchem_stage.py", + "bytes": 9782, + "sha256": "7d7c93b01f0635890a257fbf1d6e4a8eb4827ef776a473b864ec7a156e4be511" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/queue_common.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/queue_common.py", + "bytes": 3189, + "sha256": "4480a0ef6ef1c2d7c81574cf5e6a560b1d5b2cd218345e1a473a4dad3847f35c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/readiness.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/readiness.py", + "bytes": 2460, + "sha256": "dc86910d19a4fdeaee46ae27a224971432f29c137e922ce9324f396fb58838eb" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/reconcile_auth_incident.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/reconcile_auth_incident.py", + "bytes": 4489, + "sha256": "bfe98538670441390880b5071d8ec84b6dbbd4ba1d6badd1451e01bc5dece918" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/recovery.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/recovery.supervisor.conf", + "bytes": 586, + "sha256": "3e43745e92e8ca79637091ece6d2cd83e2e327fd2bde3ff3f789a747187bd68a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/sirius_batch.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/sirius_batch.py", + "bytes": 11083, + "sha256": "45580ca763e4abce6eaa051aac1ce9e8265ad590e50b47906c401bb7b0f2ed50" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/sirius_stage.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/sirius_stage.py", + "bytes": 6367, + "sha256": "e342704a1b029aff15898869761f3a7a57f5f2c8e7de267b49b55eab12e43c1f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/structure_assets.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/structure_assets.py", + "bytes": 8233, + "sha256": "d326a20afce94759688b1c637ea9f9dfa1abac2b9d42b9a4e50c4bd026ac7470" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/structure_safety.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/structure_safety.py", + "bytes": 5565, + "sha256": "6b05056c273fc55a23356dad3c7d368e9e5f447684329900a62520b8da9152de" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_assets.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_assets.py", + "bytes": 835, + "sha256": "010ca23c330380f4caca0f3b0d9bcea4907d30e456386c32e691ce10ecb1c912" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_candidates.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_candidates.py", + "bytes": 2297, + "sha256": "4e76b95e1e77514fad11b4011ca00d0cd64f67ef12b321aee3bd837901e7f1c1" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_formula_recovery.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_formula_recovery.py", + "bytes": 3041, + "sha256": "667f4c23cd3ba8e56943a617bf6c32e47a5fee55d8d21b82fb952e53fc1c913c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_key14.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_key14.py", + "bytes": 3798, + "sha256": "1cc89f5c4984e9504295e7fc28fea18aaf2d43cd697dbea7ea966034ff50da46" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_losses.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_losses.py", + "bytes": 1773, + "sha256": "2bbd453de2470bd0c98b1a4ad491c7db878045b940fb09e04eaf529dee37b983" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_negative_release.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_negative_release.py", + "bytes": 9481, + "sha256": "6076fb10207cd19431c7e67506e69e973dcdf0a15f1ba42a1d881aff4da2fe09" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_protocol.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_protocol.py", + "bytes": 1974, + "sha256": "738cd4eac1c6a688933dcacbba021bd27e26a5b63392114c397c5585b25a6cdb" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/test_workflow_guard.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/test_workflow_guard.py", + "bytes": 968, + "sha256": "ce71fbb6a3084d83e8a9520732b014824694db3c18da0998567856389d97cfe3" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/verify_auth_recovery.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/verify_auth_recovery.py", + "bytes": 1409, + "sha256": "aab76c0601339c3c016f0d915521b5332c8da85de6f4d344daa1f4d35b3fab0a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/verify_feature_pilot.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/verify_feature_pilot.py", + "bytes": 1782, + "sha256": "9b90637265e1949936f24b28fe2c6fd5f0b6f7e4bb5975926239fdf1d3416d09" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r04/workflow_guard.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r04/workflow_guard.py", + "bytes": 543, + "sha256": "aa93b9f46ca5e77d9fda90de27ff383adf580c2e1f6ed2b3b19bcdeea2b71d71" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/PARALLEL_ACCELERATION.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/PARALLEL_ACCELERATION.json", + "bytes": 2194, + "sha256": "5a27c6efed59985441ab0a949729f1addf88443434b428e9689ea9fcfc2b0c2f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/PROTOCOL_CHANGE.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/PROTOCOL_CHANGE.json", + "bytes": 3762, + "sha256": "c4551b04c5d4f594d607fe94babac99ac29ecb55b543a7283c7512f197a76a82" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/acceptance08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/acceptance08.py", + "bytes": 3917, + "sha256": "c89b30928255e2014e1063402d53aa01a0bb4e98e5c9a1e072b684979952187a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/assets08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/assets08.py", + "bytes": 5247, + "sha256": "4889e6b608d9794b112be3c8b0a309f191832a437fb67eaedfcdb0acd19cb27e" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/common08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/common08.py", + "bytes": 2875, + "sha256": "779b51e017b1115c98399d94d4893950a38a2f6e7b00d5b11e726f0fc4677afa" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/config.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/config.json", + "bytes": 1516, + "sha256": "53a365647ed8c54e216ff2cd25c011ed7f7d47a920f54c0136eea0c8dabade65" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/download08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/download08.py", + "bytes": 4274, + "sha256": "54d8e3ce5daf68e83461471da652e394c9b267a8138bdecdcde6b3d3dacf5526" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/download_parallel08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/download_parallel08.py", + "bytes": 9789, + "sha256": "d8be60c9a1315feab4da16f8c5455252b24532e03dd990297e16bb30bc21b851" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/features08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/features08.py", + "bytes": 5503, + "sha256": "f379968bb467dd3aebdc1f826f8c74bd0f8808d69da7e38d862796406a6caf91" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/http08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/http08.py", + "bytes": 9581, + "sha256": "2b7516fb09ead81d1f19c29f595cdd403a32761d21e9d60ef149fb2c96761865" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/index08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/index08.py", + "bytes": 3105, + "sha256": "1261eb7f706a54f8c6c9b4f59cc78dbd2ae7dd0ff9a629579499ee85896ce0a2" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/parallel_audit08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/parallel_audit08.py", + "bytes": 3867, + "sha256": "158d6785502da1ad4da75d85f7ec84795c38ad7268cccbcb31211ff932233fe7" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/project08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/project08.py", + "bytes": 3806, + "sha256": "f80e2a469808b60e7eed56f8f18797f5be8f77f68d17acc21d0453af40c5d79c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/protocol08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/protocol08.py", + "bytes": 8205, + "sha256": "c0298a3e4a5c0563cfb75912288980f752b1253e2282709da6e0361268356905" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/r08.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/r08.supervisor.conf", + "bytes": 2459, + "sha256": "fde33ffac95e04471164b70d38a0f093eb819f830007f71910a8d367480df33e" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/reader08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/reader08.py", + "bytes": 3681, + "sha256": "c4e28d81603039c1337438a72dd79b27481896322c37d385abdc907d2d239313" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/readiness08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/readiness08.py", + "bytes": 2514, + "sha256": "00ae8ad9b79b42c07f1667ee21c4bc265d36d954309be72241a9cd19a64af188" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/runtime_http.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/runtime_http.json", + "bytes": 405, + "sha256": "07ae76c8f8d5bab081db8b9834718dbd4ae80313f1b89adc32dea31022290e8b" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/runtime_http_parallel.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/runtime_http_parallel.json", + "bytes": 405, + "sha256": "07ae76c8f8d5bab081db8b9834718dbd4ae80313f1b89adc32dea31022290e8b" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/switch08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/switch08.py", + "bytes": 4419, + "sha256": "f650bee1c16d13244562778d8c8b05905122f70c3e12963954f609441cc1c52b" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r08/test_r08.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r08/test_r08.py", + "bytes": 13444, + "sha256": "5b7e74c45c9c00b7e698dacf8040a713bda4c08e916d3b6c00bcbe65d367c34a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/README.md": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/README.md", + "bytes": 9309, + "sha256": "cfdaa9a612f5fb03b2ece397c30173dd7e683c5443eff768e96b9d9c387acd3c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/acceptance09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/acceptance09.py", + "bytes": 4588, + "sha256": "b88ca45218a04f5740ddf8639480a5928cde235b09198788cf0545002463ce5c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/config.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/config.json", + "bytes": 2025, + "sha256": "5f8f8635c60e37a194660b73f0fae69571a3f97a045f1d5c2f0e5fbf76e450d0" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/data09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/data09.py", + "bytes": 10158, + "sha256": "2a062908633f3f7ed7414248c3af0fca1d2a55f0463b12f3e188d193d87cdbd6" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/objectives09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/objectives09.py", + "bytes": 6869, + "sha256": "a831e6b201018bad077468e216959af4797130a447babee8c0d99e3cfe23ae1c" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/pipeline09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/pipeline09.py", + "bytes": 2280, + "sha256": "41626197aba28ffd497d477702e0a1e9acda179ca2358ad946ae5ad0aa305ac1" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/prepare09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/prepare09.py", + "bytes": 61, + "sha256": "5d88153dbd5e0f10f103e780fc611413276b328f827e3c1a0d956e1c57ec04fd" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/prepare_validation09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/prepare_validation09.py", + "bytes": 89, + "sha256": "c4ab614b4b6987e763a4f54cdf5219acb8fac192726b02fe9ecd94ad0a7c2ad8" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/r09.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/r09.supervisor.conf", + "bytes": 1058, + "sha256": "eea6b115c0e3c3a70b9f4c8fd66d93b9ae8f51d07d6263cc6c6d939097123201" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/runtime09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/runtime09.py", + "bytes": 3196, + "sha256": "8454393c4d2bbb699d72e9e4844040015585652fcb5cc85e046f02beb0780a28" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/test09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/test09.py", + "bytes": 2924, + "sha256": "8a1b9d20d907795afc8e2de643ba0d909c91fce5d4b90bbc68fb53d017558e18" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/train09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/train09.py", + "bytes": 6852, + "sha256": "2802a06da1a43f35cd1221e19b33446e089460fd2b3d1b2e300a2cecfe70b755" + }, + "/workspace/xj/SpecPartition-MS/rebuild/training_r09/validation09.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/training_r09/validation09.py", + "bytes": 11965, + "sha256": "ebf5aa507c276b3c1b3ad63033167f96de2310d6c34754033b880b59d7a411b2" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/README.md": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/README.md", + "bytes": 5448, + "sha256": "86cee134eb2092159bdcdd5c8d2672bd630185d76b80b89eb3bc500625a647d6" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/acceptance.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/acceptance.py", + "bytes": 4661, + "sha256": "8b4dd28ae7151b672d5427597a8ac4c2b0311fd92b2fba66b5a732cd0068fb9f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/check_all.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/check_all.py", + "bytes": 1311, + "sha256": "fd2b9e0b5b1ce7aa30e1ae1c42ed3fe1e56586fbf867dee3c21787feae8db1c5" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/hierarchy.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/hierarchy.supervisor.conf", + "bytes": 2793, + "sha256": "f39d18bbc8db165f3d2d39a5ce4bcdf359e3615ba902e9a1bd6e93cd7a2f5eca" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/kernels.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/kernels.py", + "bytes": 3839, + "sha256": "33bdda65e094fdf39262a9a29f6679ee985ee49e848b8f6472e275b166ae67f7" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/launch_record.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/launch_record.json", + "bytes": 3633, + "sha256": "0bf4ba2c9cfda740bbc6bec1d0c8ff435c078449c509cada955e77f0ff754297" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/managed.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/managed.py", + "bytes": 1496, + "sha256": "9979223957390ba7191bf1bed22a67c658108b0b07532934cbe3373af213c62d" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/objectives.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/objectives.py", + "bytes": 9125, + "sha256": "0ccc89567217d8f580402e9183c800f475630e6b321f1482f2b5798c64e66584" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/runtime_hier.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/runtime_hier.py", + "bytes": 4162, + "sha256": "609c5884f0cccd0c4df779d58470b4514c96df92db55cb89a94af52c44261a04" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/sampling.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/sampling.py", + "bytes": 3718, + "sha256": "5b50875a92f019b33bf3f5f35637c0bdd7931739f59e8d9bf8c5ce50d9da3432" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/test_runtime.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/test_runtime.py", + "bytes": 2458, + "sha256": "2c29ecc0bef07777d8584708d89538ee189a94423df3b1b9cf611c6d9fe2cb8a" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/train.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/train.py", + "bytes": 7183, + "sha256": "e86c350c9152976ce73828181da114dcd5c0f26faef71577ceeda83e96cdd2a0" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_training_20261103/validation.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_training_20261103/validation.py", + "bytes": 12185, + "sha256": "7319ddf7390f865c781fd2f089e11626679a61e2b28647ee1e90e6ddeca48d85" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/README.md": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/README.md", + "bytes": 14175, + "sha256": "797841a785554acb3a254f43b5ceae26411445c32cde2f2404ca0794b11ec520" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/base.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/base.json", + "bytes": 7866, + "sha256": "c83c3192a0b7ab6353ed17d2eba0ab138bfd3672f3285c0ced8496b880c405d3" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/coarse_losses.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/coarse_losses.py", + "bytes": 6760, + "sha256": "9e9980b2eff391e0fb1b065b2eb4a41c212192e12e0852efb44e1da741146904" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C00_sampler_control.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C00_sampler_control.json", + "bytes": 8849, + "sha256": "f2ab69f60109ba1e37326c8b095a7cbcb979eaf3e904c79219647374a6403062" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C01_ms_fine.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C01_ms_fine.json", + "bytes": 8839, + "sha256": "b8b15b61e8b6061ac8e23db6e2fde16925401ea561379418e8763960f45ac8c7" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C02_mol_fine.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C02_mol_fine.json", + "bytes": 8863, + "sha256": "756068818e7672dbe812037cad980aa1ddd4be794865fb661aba85af62bdd51f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C03_both_fine.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C03_both_fine.json", + "bytes": 8851, + "sha256": "1999d280924b950900b8509194413c34bc7f8dd9a691a82daf8ce557f8e6e959" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C04_formula_coarse.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C04_formula_coarse.json", + "bytes": 8895, + "sha256": "c303010e517b4fabc60f9940bbf3a15c9504c2886e1fbcaa6f34f4aac67a5ccc" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C05_mass_coarse.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C05_mass_coarse.json", + "bytes": 8897, + "sha256": "1ae1118cad164180dcc0b7cfc994c9f0a5ca385efb28acceb06986fc0e19072f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C06_fine_formula.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C06_fine_formula.json", + "bytes": 8920, + "sha256": "d40629d6b03662a3eedb92ea33604fe33ab3877b3c66c2ad4242bbb2cfc7c813" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C07_fine_mass.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C07_fine_mass.json", + "bytes": 8914, + "sha256": "72ae9009ba2d45f864ae18a140075c1f45ea78b58cfe4d92abce0970ac0f1980" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C08_full_separate.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C08_full_separate.json", + "bytes": 8971, + "sha256": "4436623c51d97e11bd041213275e629266b88d9c34fd12a9ef2ee48e1079a682" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C09_shared_head_control.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C09_shared_head_control.json", + "bytes": 8992, + "sha256": "f51f65041ebb14be950def6890cc217611aca6e451c9e8a60f4c349dc985c512" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C10_random_sampler_control.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C10_random_sampler_control.json", + "bytes": 8984, + "sha256": "21b0602287af9a3eea41e4f2cedffdf3e1e3b8e99523ab291a87c60cb8209fc4" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C11_hard_mass_bins.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C11_hard_mass_bins.json", + "bytes": 8975, + "sha256": "2358ddab6dca0433deddbbe6e84ef2839cd59e98442af109077912308ca6338d" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C12_no_reverse_crossmodal.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C12_no_reverse_crossmodal.json", + "bytes": 9014, + "sha256": "d7984ab5700619252d32cd1402667bd7de5ec52a2840342165048126575191e4" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C13_fine_budget_matched.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C13_fine_budget_matched.json", + "bytes": 8907, + "sha256": "7e4fc8bf8e9ae2e64bf744c57162cb4a635d32b7869c8fb2044cf9a32208b0b5" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C14_fine_formula_budget_matched.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C14_fine_formula_budget_matched.json", + "bytes": 8970, + "sha256": "a837ba7c2464baf3226b13eb905ab462f962b45bb550811d752565e3063b9dc9" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C15_fine_mass_budget_matched.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C15_fine_mass_budget_matched.json", + "bytes": 8960, + "sha256": "1a6e8c7a9ca336f1e560fa1ed9fc4b932a2d51fefb895563cbfb7fe0583e7194" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C16_include_identity_coarse.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C16_include_identity_coarse.json", + "bytes": 9007, + "sha256": "95f4ea6fbcc38c119b7f3f60becd028e40c19ffc275535141cb9588f96b02687" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs/C17_mass_metadata_shortcut.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs/C17_mass_metadata_shortcut.json", + "bytes": 9027, + "sha256": "dbfdb2834a1dc1afefe4d45fa3b8e8d561a6def89da21b7ab3579fb218cd47ca" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/configs.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/configs.py", + "bytes": 12272, + "sha256": "cc31f3d1127415e28da9ac101bbe6df085b0f0c83e50117a8169c90b4e0a8b5e" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/suite_manifest.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/suite_manifest.json", + "bytes": 2384, + "sha256": "6293b691cff85f077f3d3adec61676f4bfc109e304eb3062f2029801fd975ca6" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/test_coarse.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/test_coarse.py", + "bytes": 5991, + "sha256": "b4429263876704ff76bae4abf9001f4b12eac23baa831aeaccdd0c1d40b0bf20" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/test_configs.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/test_configs.py", + "bytes": 3297, + "sha256": "703e9ae2e0544ebf63e66dd10caf18578ddafd7240e8ee7168a6537dc8b3ea7d" + }, + "/workspace/xj/SpecPartition-MS/rebuild/hierarchical_ablation_20261103/validation_record.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/hierarchical_ablation_20261103/validation_record.json", + "bytes": 4672, + "sha256": "1bea243c19e07eda9ec6ee4843bc986b6a1419873272238409a305a9c6218937" + }, + "/workspace/xj/SpecPartition-MS/rebuild/intra_modal_extension/losses.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/intra_modal_extension/losses.py", + "bytes": 7010, + "sha256": "b4a0b57e46417822e946b6b4f39566a191ce4d2ffdeee47e6eff776ae6fae18f" + }, + "/workspace/xj/SpecPartition-MS/rebuild/intra_modal_extension/test_losses.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/intra_modal_extension/test_losses.py", + "bytes": 4899, + "sha256": "553dd4389fc5b59f50a807560257bae01e4550096940f9218a2970e732d4a3f3" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/acceptance.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/acceptance.py", + "bytes": 3869, + "sha256": "94c120f415c8fe3d07bd94e1b47614e97ef8ff7ccf182c12472761a7afd22cae" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/eval_runtime.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/eval_runtime.py", + "bytes": 4436, + "sha256": "045961bb5a7c84142f821b81db25f6e57cebb6bca006da79fa9ae7f5574dab57" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/evaluate.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/evaluate.py", + "bytes": 15254, + "sha256": "a210f4839ee920b93ab1c44d70d1fd4a93b4f0c233c095a7b66519bc781dafc1" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/evaluation.supervisor.conf": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/evaluation.supervisor.conf", + "bytes": 658, + "sha256": "631c625214121346a6f19191fcbbb79715af61bc70d67a2028adb313bd858028" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/launch_record.json": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/launch_record.json", + "bytes": 2439, + "sha256": "6d2a77b6911d600a16c184d944865d17a159c7cf5c6868b9ed34734e55b3e04d" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/managed.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/managed.py", + "bytes": 5191, + "sha256": "51112e1028e31417271fc5ee1b7ddd479ca3479bf889975f1dea6dc270db9206" + }, + "/workspace/xj/SpecPartition-MS/rebuild/post_training_evaluation_20261103/prepare.py": { + "path_in_repo": "code/snapshot/workspace/rebuild/post_training_evaluation_20261103/prepare.py", + "bytes": 9935, + "sha256": "783f12735057cb0344dbbb804ec06d3b53dd48a467c4a93f40395a7bb414ac53" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/__init__.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/__init__.py", + "bytes": 98, + "sha256": "ca18b96939b27201edeed380f1500631e1360c59aa1cb7b70c1898abb2f0bcdd" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/benchmark_epoch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/benchmark_epoch.py", + "bytes": 7353, + "sha256": "9de646f4a1931123f37969a2d28637b3496580f630d912534ddfd5fdeb3ff301" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/chemistry.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/chemistry.py", + "bytes": 10559, + "sha256": "c274e05a111ee8b7b2bff82a3ab61d9251dc4882b8caa4e3c53175982f92ebea" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/cli.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/cli.py", + "bytes": 6561, + "sha256": "c78243f463dd410da037e346889b25eaf5fa3471fe9853a1b77df42c4c69cba6" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/config.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/config.py", + "bytes": 3919, + "sha256": "f970878e5c90d02a7b82a762ec60b9199cf295f45de9cbf2d480bed19c6f8aff" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/data_v03.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/data_v03.py", + "bytes": 11195, + "sha256": "4533daf5bf5ffae2154540155fb8501588f501f7ebf49fdd6acd622ef8f6227e" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/engine.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/engine.py", + "bytes": 15594, + "sha256": "e075cc6d52beb2bc2a2613efc4f689c0753abb4d62831563957f3fd8ebec64fb" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/epoch_data.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/epoch_data.py", + "bytes": 12369, + "sha256": "dac742966ac60edee933f9e5197fdae4b5df73c162ffe90b4e86b723a2551c45" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/epoch_features.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/epoch_features.py", + "bytes": 2785, + "sha256": "b284064b8975c3c913a839670d660d4eefb9afd694cd5387bb34c856305691d0" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/evaluate.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/evaluate.py", + "bytes": 2644, + "sha256": "4ea9ce51dd3f01e8f46f3c6b32eadadb003d9d43fdae3c590186c511606f651e" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/feature_store.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/feature_store.py", + "bytes": 3464, + "sha256": "c91758cd6eb27c84e4f1daf938eb5c94e61bb4cec3aba501d8b17d799cb08837" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/forest.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/forest.py", + "bytes": 6789, + "sha256": "381282cc53f18aa812ac6463cc21052f06977641902a8f5a7dbc6d6607b29771" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/formula_v07.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/formula_v07.py", + "bytes": 9621, + "sha256": "9741dbcc6595b9d3987a729bc7c08aa4cd796e066b442a63ef6d78a800929f7a" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/inbatch_data.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/inbatch_data.py", + "bytes": 3946, + "sha256": "4736eddb1dbb79936979cde04d7b567b3380cf9effbe38b755da2ed56993794a" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/joint_losses_v08.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/joint_losses_v08.py", + "bytes": 13053, + "sha256": "37a75ecfeb25da4e7eac8e7aacfc867573152ca9d151239d0d8834e0f31a1baf" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/joint_model_v08.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/joint_model_v08.py", + "bytes": 4840, + "sha256": "d8ac205d69f512053446200f3228cdeb477b13aea654285751ad854f07980a17" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/losses.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/losses.py", + "bytes": 4691, + "sha256": "afa0ff47ca18349d06b8ed1826dc858bd8bf5cc2df852212fa300f179b0427b4" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/model.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/model.py", + "bytes": 13639, + "sha256": "fcd5067fab59769e77e0fe28434da91686ee53b5d9606f035044acc16cda1fab" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/model_v03.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/model_v03.py", + "bytes": 10566, + "sha256": "3190e02255bee6e1f6176406e6fade1155760d34a8ac578804f4ad564d13c014" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_data.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_data.py", + "bytes": 14788, + "sha256": "cbbd5fe08f219dd1510df70426429845a082f2d18e699a88afb4648a6b145566" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_pools.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_pools.py", + "bytes": 9700, + "sha256": "0596e45b4f04dae4fe4a090c3888dc4a3f54bbd84454d870f683d6dd2bab40ed" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_train.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/multiview_train.py", + "bytes": 17609, + "sha256": "77983000115197b0b0af0150a9c50f9c358e61d71b2b69a7310fc6b534c91465" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/negatives.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/negatives.py", + "bytes": 9699, + "sha256": "12de5da0651e5871ee4a69064627078adfa25c9d91878a8a97330cc9f186ace6" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/offline_data.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/offline_data.py", + "bytes": 22609, + "sha256": "fff6d2ec6d54487e221ed5b6549ea0b1965c5c794dfd5a80c913c725f40b6785" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/parallel_download.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/parallel_download.py", + "bytes": 14986, + "sha256": "fa21a2d48a7c3a03ac4f1885de07252802fb6039be8bdc5ade81af66189ef964" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/pipeline_epoch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/pipeline_epoch.py", + "bytes": 5441, + "sha256": "5dcd50493c719333f2950c9353c69a9c6500bce6eee0ac4f24a6ea64c2234157" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/prefetch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/prefetch.py", + "bytes": 3422, + "sha256": "8f27df76e71a19c1d393218e6f4616487d05ccd6d1edf0e770ccc6932f70e5c7" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/prepare_epoch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/prepare_epoch.py", + "bytes": 15322, + "sha256": "92fa6d7217c02029be77d771707f4ef5f3cd5dd3d4509c982681e718e9d69be5" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/resource_guard_v09.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/resource_guard_v09.py", + "bytes": 704, + "sha256": "6c2035037899d7590b2dda4de8a1c7442ed46fa02f6441e2b1235ba3da24d54e" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/retrieval.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/retrieval.py", + "bytes": 8996, + "sha256": "66c415b0580e95f4208ca5de5b5633811e630a28c30b8f091403277e175284a8" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/schema.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/schema.py", + "bytes": 5833, + "sha256": "20a8ef0629a4532f7aea516169ae2ab34d90cb8a78e9a8412605aa12df31ea3f" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/supervise_inbatch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/supervise_inbatch.py", + "bytes": 3155, + "sha256": "d7146929af6d1b8f870f3132a7b9e092c484fa75d17c24acf647cf43597494a0" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/supervise_v03.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/supervise_v03.py", + "bytes": 5282, + "sha256": "40b169996d3cedbb62d4226382089e2bb6857254af23a303ce463f1edee49263" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/synthetic.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/synthetic.py", + "bytes": 1347, + "sha256": "cf5f4ddc615f2e4859bbab2e49b0e297d4d6078937289ed76071b9e819fa8629" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_epoch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_epoch.py", + "bytes": 30729, + "sha256": "7b5595777080641dc2eaaa3056a12c4686d42bc2d809dc134931ce5b14d6e3a6" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_inbatch.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_inbatch.py", + "bytes": 15669, + "sha256": "2ea8a9b92993ede4c265c7685d110ce3bd2a5640cdfa29b3590ba2459c2bd5f9" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_v03.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/train_v03.py", + "bytes": 19093, + "sha256": "4e495fb2da3268799e181de3b088239afceb322b7758a7341870aa9911263b44" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/validation_training.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/src/specpartition_ms/validation_training.py", + "bytes": 11853, + "sha256": "9a8d261b4641de3b1569b9c565edc3ff34d4aac3b859f3548a1cdd7eeed04a43" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/capacity_server_v03.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/capacity_server_v03.json", + "bytes": 1271, + "sha256": "77bda162a1303b84df03c4489987a98de231e49bb63619d413932d8843dd8ed4" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/download_parallel_v041.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/download_parallel_v041.json", + "bytes": 417, + "sha256": "6bdbfddffa6c69246e8f2e1b080bbb29a187fc56f9ea33ad781b960d25482b97" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/epoch_server_v06.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/epoch_server_v06.json", + "bytes": 1934, + "sha256": "328f64c827095b166f04f5d47eed9f97049c70a59f962331d6ae399b77bbc4c2" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/inbatch_server_v05.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/inbatch_server_v05.json", + "bytes": 1326, + "sha256": "e72f2bbccb2c2fe60d7c5a0775d2b399f1af3f1853693fb36a82de88cf4c9cfe" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/joint_server_v08.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/joint_server_v08.json", + "bytes": 2199, + "sha256": "663a50b3b13daf5d410bbcc1d7f360b244bb3457571b2490c2a96e5bca71f8a6" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/multiview_server_v02.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/multiview_server_v02.json", + "bytes": 2355, + "sha256": "df662c5c115bb2f70cc2cb2edaa45b8576ef27fdd83516e9a131978ee0054e0e" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/offline_server_v04.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/offline_server_v04.json", + "bytes": 1793, + "sha256": "63fcbd9ed2e0171e802ee3c8a26141361be5957d007a361deccb1e90b79e7920" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/scratch_server_v09.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/scratch_server_v09.json", + "bytes": 2547, + "sha256": "fed4d431d399d707aad5be23194a085f12430d6b77c5059e5810cb255b90794e" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/validation_suite_v071.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-scratch-v09/configs/validation_suite_v071.json", + "bytes": 2334, + "sha256": "76de492fbbcf005794135aad49d46082ecb0d61bdb317206bf8359664a1eb2ff" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/batching_v122.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/batching_v122.py", + "bytes": 1092, + "sha256": "8870926e5e44cdf957de6c1cd5e790807163a76d938d9d4c3efce144ecb5c185" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/contrastive_v122.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/contrastive_v122.py", + "bytes": 2904, + "sha256": "4a06beaccdd74b83991c6fd4f10e634c477c16fb1eeae847af5c7b18f283ae18" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/data_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/data_r2.py", + "bytes": 13041, + "sha256": "da7167b202f86dcbf2df13d1c7fa1f7c9e1702faf6bb9ee39ec7b90db0a78f63" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/fast_formula_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/fast_formula_r2.py", + "bytes": 7037, + "sha256": "a0e468db899745a78349cae33b6fafec68f0562dd9fc05084f6ae6778b9f8162" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/formula_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/formula_r2.py", + "bytes": 5913, + "sha256": "e0de60477b599c4b80a8fe0af29bfa0b9d0ea00f82713387abbf4f0f36304ca0" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/loss_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/loss_r2.py", + "bytes": 8688, + "sha256": "998ed8951e6805c859be0783d0cd62a0ff0d59cd46ac43a3dc63f576e632aba0" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/model_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/model_r2.py", + "bytes": 2470, + "sha256": "b2ee4bfb6bc3b6c077baed132910f622acd0195b4441fc1c769fad740b495adc" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/model_v122.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/model_v122.py", + "bytes": 1283, + "sha256": "bdb2033ca6a265ea04bafae821a3f503bec747b34e2f158bebda02c34409d750" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/probe_v122.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/probe_v122.py", + "bytes": 1808, + "sha256": "7de6ff45353c76fe3c7eb6b81ec226cd8349c1daa57f2cffec1720e9c875cbb4" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/process_prefetch_r2.py": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/src/specpartition_ms/process_prefetch_r2.py", + "bytes": 2616, + "sha256": "a68c7d4b7a835d1ccb58e08df1340d4394bdee6fa1349a80f99ebaf44d67b164" + }, + "/workspace/xj/SpecPartition-MS/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/configs/train_r2_v10.json": { + "path_in_repo": "code/snapshot/workspace/archives/source_91bf888/historical/projects/specpartition-ms-v122-bidirectional/configs/train_r2_v10.json", + "bytes": 3657, + "sha256": "561764da948a1c1b784d77eea2cea4d632a4d700f5cb4422f0665f6b0e34aae5" + } + }, + "count": 329, + "python_files_syntax_checked": 235, + "checkpoint_binding_checks": [ + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/accept4.py", + "sha256": "63d4afd02bd53289415050d73c2642f0e113c4a729cc1810e9f39f58048197af" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/eval4.py", + "sha256": "1ec0cc831a23a67ef76afcbecaeec48f5fb2578d72883f687b5a39e297561fb2" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/mces4.py", + "sha256": "e5ee43fe8b29858836cfa0aa7a4e56aa660eaa075324b22bfe9b4e276925366e" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/pipeline4.py", + "sha256": "21fa840d52030faf831716838f33cce8d79509dad56c259a426346bc48760e21" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/prepare4.py", + "sha256": "77c9426225430bcebbec03cabae89b960495453c3e5dd0dd146445ed965c6b41" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/report4.py", + "sha256": "07b7d7511762f5083fdae3870e7e7e1e3c1ff1afb92374a401e93bad8e9472f9" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/run4.py", + "sha256": "c1badd7d328265946ef0c7cb6bc02be3ef8b418d1a075b4afc93b12687f1be27" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/acceptance_r3.py", + "sha256": "a06d39ba15f88bf391d3aad02678e31edecc78a2f348ad5281e5afd0d6d9bc38" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/analyze_r3.py", + "sha256": "0f5f519c1eb301873901d74bf60c4d94cfcc9c86298b92941ce4448a10fce7bd" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/audit_primitives.py", + "sha256": "35978493195891ffddadf5917a7fdbf1861a74350e92830f36cb85d095e04e13" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/audit_r3.py", + "sha256": "75c074d229f9a786ee8afbee79ba447c10b264ac9aa13bb71022fb4706ac607b" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/compact_r3.py", + "sha256": "1b4403fa7afb8e3ca00a8aaf8e5dfddfd2d6bf66e9df5de6a9020fb9b5f84593" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/config.json", + "sha256": "20bb75164505a6998310c72df852f424143a54849e7dc1db96fbdda06601cfd0" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/data_r2.py", + "sha256": "cb15b3371c72e64469286e8d4049193a1edc57e680a036767d8482229cfbd4ef" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/features_r2.py", + "sha256": "6d8477f07c0b86c2b4edacb12550ac653fa8e5b7ff4042b857e5a3dc3af47016" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/final_audit_r3.py", + "sha256": "a88d13d9865c1c3c76be18c695f5bcdc3c5c9687b5f52c3deb01097c17d895e6" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/heads_r3.py", + "sha256": "f67fe3da8277976b98c67416e6d207f5d4e8a8a2d6a7d9adc51e967371823366" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/mces_r2.py", + "sha256": "3e1ccebf643f4eb2f631429a690430e20a5a9de01fd830c8e8f17a9497be99a4" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/model_r2_new.py", + "sha256": "3ebdba5dd78fd31b0236df957f6841f36cebcb35de2c738c6e3741468b378d8a" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/objectives_r2.py", + "sha256": "30eeb134e26412deeab2e507a174b9674bebdcc4ac0d9b8376c046b5ce47a6ec" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/pipeline_r3.py", + "sha256": "929918846dc64bd4c31ccf8a027c808c695e47470da3395ce13283c748807741" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/prepare_r3.py", + "sha256": "a8561ac4f87971c4c2f0e9e3c1c29c3269ffcce103defdcde5982f294876868f" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/probe_r3.py", + "sha256": "9d287552a52513b6cdf5885ba43b1c80e5562cc23a86ef36f3959a23ea275565" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/runtime_r2.py", + "sha256": "9b2963d3e49740f869146c68389acc869b089dd964822e32f6fc6480d56166f7" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/test_mces_r2.py", + "sha256": "3370d28a538a854657eda0ce13bbd2f82aa35a3a7dfb95010288cfe1adad114f" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/test_r3.py", + "sha256": "fe125f940f0ed130fbaedc318c5d1e9556079f733076fec08260de61ead6c382" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/tests_r3.py", + "sha256": "c0a1723db5b46aa1114b2a2be1821bcf21c04c3431b5a6ef73f79fe139dc41b5" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/train_r2.py", + "sha256": "076b47990c2d45713f02fbd9407374b39c4298ad3edd9dca73ace42d480dbb41" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r3_20261110/validate_r2.py", + "sha256": "e14d5a45483581785d76560bd8a7acc597ce3acfed648d620c0c344056fc2283" + }, + { + "model": "R4-D_9000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/config.json", + "sha256": "69e48af6f6d75bf8662c744e4b1be5575b1d7518619fed003d0b422de0e08881" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R5-A_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R5-B_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R5-C_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R5-D_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/protocol.json", + "sha256": "26fdbc2754445cd7ad776b561dbea5c162958f59ebddc10605a3c78d32090839" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/interventions.json", + "sha256": "0ad60b404d36707fec858e5e4653e7a576a41f9190265e19aa0dd0706d0eea14" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/paths5.py", + "sha256": "65678b172bbb6096ac2ed3b26ec5f9d347dff43cb89ce64bc76b35ce82fa302d" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/batch5.py", + "sha256": "51c8c25f958ce133f21e17223d243e7cbc59909526575768ec70c4be3da46529" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/forward5.py", + "sha256": "ed9735452ff8b27b329f39f73210e2d58b0184980bc83aa55500830e8096f5c1" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/model5.py", + "sha256": "6dd2c8185cc719bac8f5743d9a5f67a1f864dc8d72877551006c94b2385f0836" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/teacher5.py", + "sha256": "6dd4f5d2123f5b60fb2a3db32d2f0d9c2226feb121267b6576f302325776cd19" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/objectives5.py", + "sha256": "c4357b3db9cc20fa5a293e77c19d212676322475d69a3ad8a67e561f76b03332" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/train5.py", + "sha256": "a632f6beac350f19146c57c1d738f5101f21043e06c31f9775121d8546d4ddc0" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/ledger5.py", + "sha256": "d580400fb24a01327816afc4805caea1978e113d357ac52d695a3f90ca1aa711" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/augment5.py", + "sha256": "7feee3fc27de111dad0974a1d455ad0dafa782e8a9c05786429b0b2afd57ede6" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/assets5.py", + "sha256": "13f0a46c3aacab3ffed6a8c9710133f7fe2f34cb5f9e4869803c21f185e3d6a7" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/audit_identity5.py", + "sha256": "f587cbf218299880351e43ad63eead1557050ddb593fe7b1ae128180e9d78ac7" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/repair_keys5.py", + "sha256": "dac06d5b2f9377cd058989cb51b26463c7fa802e89b7d474641cf4ed50d46e98" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r5_from_r4d_12000_20261112/resume_assets5.py", + "sha256": "6537f31239b1ead1dcc113f9c3f68717f257e73a94ccd124f0f2bb9458f43692" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/common4.py", + "sha256": "269b0e97e16dcbf9c7c54b28e13fb0fb408e1c8722b2cc81bde7460b2a773de0" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/model4.py", + "sha256": "56ab6b83864ef0ac50058461f96a0d52115057281dc577c7dbae5a3b484728ec" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/data4.py", + "sha256": "042e40dc14a990f72ac03713b22014ddab4ef47a2a19d2e27f33838d2d7cf718" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/duel4.py", + "sha256": "7d18c55a82fce8990ce296d6598e80fac2fe5935902c1423358a4bdafbb2e1b6" + }, + { + "model": "R5-E_12000", + "source": "/root/xj/SpecPartition-MS/code/ceir_r4_9000_20261112/objectives4.py", + "sha256": "877d3f97a018dbb23e0acc645a1879c40dcd29587ad57d6e731959ca36697ef9" + } + ], + "source_bytes_preserved": true, + "credential_scan_passed": true +} diff --git a/code/environment_versions.json b/code/environment_versions.json new file mode 100644 index 0000000000000000000000000000000000000000..e386a168870024c0a80e5938331baa7ccedb0324 --- /dev/null +++ b/code/environment_versions.json @@ -0,0 +1,15 @@ +{ + "python": "3.12.15 (main, Oct 13 2026, 16:52:04) [GCC 15.3.0]", + "packages": { + "torch": "2.6.0+cu124", + "numpy": "1.26.4", + "scipy": "1.15.3", + "rdkit": "2025.9.3", + "networkx": "3.7", + "PyYAML": "6.0.2", + "pandas": "2.3.0", + "myopic-mces": null, + "PuLP": null + }, + "scope": "Observed training environment package metadata; no environment or credentials uploaded" +} diff --git a/code/snapshot/root/code/ceir_r1_20261109/EXECUTION.md b/code/snapshot/root/code/ceir_r1_20261109/EXECUTION.md new file mode 100644 index 0000000000000000000000000000000000000000..0b7464543ddac2aa8708b0a2e46a14e3bf743220 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/EXECUTION.md @@ -0,0 +1,78 @@ +# CEIR R1 服务器执行记录 + +本次授权只运行主方案和匹配对照,两臂均由指定C03 2,000步权重继续到4,000步,即各新增2,000步。不会自动追加到6,000步,也不启动其余消融或R2。 + +## 最新启动核验:已实际并行续训 + +2026-11-09 的启动快照已保存于`server_receipts/STARTUP_RECEIPT.json`。这是一份带时间戳的启动事实记录,不是训练完成报告,运行中计数会继续增长。 + +- 17,397个共享池、139,347个教师查询全部完成;其中139,251个有效竞争视图,96个原池不具备有效竞争,按规则mask,不补真值。 +- Train的252,672条实际记录与完整Validation的19,429条记录已完成离线峰组成证据准备。 +- 13项CPU单测、6项数学校验及27项静态方案检查通过;后两类不能冒充GPU训练验收。 +- 最终两臂288条真实Train GPU验收、断点恢复及官方Validation入口检查通过,初始分数与恢复Loss绝对差均为0。 +- 启动快照时主方案累计2016步(新增16步),对照累计2027步(新增27步),两者均有真实SGD日志,非等待或排队。 +- 两者启动时的首个可恢复checkpoint均已保存到累计2001步;之后每100步自动保存,不把checkpoint之后尚未落盘的日志步数冒充已保存进度。 +- 主管服务、两臂训练及独立MCES/教师刷新服务已注册;原C03队列和MSG-only服务保持原PID运行,未停止或重启。 +- 本地与服务器23个冻结代码/配置文件哈希一致。正式全量Validation在累计3000、4000步触发,当前尚无本轮完整效果结论。 + +## 路径与事实来源 + +- 本地代码和设计:本目录。 +- 服务器代码:`/root/xj/SpecPartition-MS/code/ceir_r1_20261109`。 +- 服务器结果:`/root/xj/SpecPartition-MS/runs/ceir_r1_20261109`。 +- `plan.json`、`validation.json`是原方案及静态配置检查,不是运行就绪或训练完成声明。 +- 实际就绪看结果目录`READY.json`、两臂`acceptance.json`;训练看各自`status.json`、`loss.jsonl`、checkpoint和`COMPLETE.json`。 + +## 已核对的源状态 + +父权重SHA256为`8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6`。保存进度为`update=2000, epoch=0, next_step=2000`。 + +父优化器有301个注册参数,其中264个已有Adam状态。这是两个不同口径,不能以其中一个代替另一个。新入口保留旧参数顺序和既有Adam状态,新模块放入独立参数组。 + +两臂模型均注册18,568,595个参数;对照关闭新增模块的评分及辅助目标,不代表每步更新全部注册参数。父模型注册17,001,870个参数。 + +临时实批GPU探针已测试288条真实Train记录,包括新增分支梯度和断点恢复;临时更新不计正式训练。初始分数和恢复Loss的绝对差均为0。实测峰值allocated显存:对照约706MiB,主方案约833MiB;不是整卡占用或未来所有批次峰值上限。完整准备之后还会重新进行绑定最终代码和数据的GPU验收。 + +## 数据准备范围 + +完全沿用父模型采样日程,从原数据游标2000继续至4000。工作清单SHA256为`b013c5b461d032b25a9d5d26e1b9058e1ade4455f9a87811144d1fd0594130bd`。 + +本次2,000更新涉及252,672条不同训练记录:64,000条MSG、188,672条外部谱库。每步并非都恰好有256条外部谱图;这是原日程的分配方式,不能为了填满batch重复物理谱图。真实288条大批次用于完整GPU验收。两臂的MS顺序、数据暴露量和负例抽样预算相同。 + +待制作的教师查询索引为139,347个谱图候选视图,共17,397个共享池任务。合法缺正例/缺不同身份负例的池单独mask,不注入真值、不伪造负例。原始候选及其多重条目保持不变。 + +外部谱库原有公式集合是`label_conditioned_training_competition`,不是盲预测结果;这一训练监督来源保持披露。MSG与后续评估使用实际官方候选公式,不能把训练标签条件集合当作开放式公式预测。 + +教师对完整可用原池评分,不使用只看全局向量的替代分数。数值路线为BF16 GNN及FP32局部匹配;分块局部结果与逐查询参考通过严格一致性检查。冻结教师可使用有界CPU原子表示缓存以减少重复编码,绑定该教师checkpoint;学生不复用过期可训练embedding。 + +## 新入口的关键修复 + +PubChem记录同时保留原始与规范化SMILES。新适配器必须按与原data09一致的`canonical_smiles`查结构缓存,而不是优先取原始SMILES。没有为此修改原候选或原缓存。 + +零初始化反向局部残差必须在父模型完成BF16局部分数乘权重之后加入。若先加FP32的零再乘权重,会改变父路径的舍入,产生约1e-3差异;当前修复后严格恢复父分数。 + +有放回抽样不等于独立身份数。主方案保留原记录,显式进行身份损失计权;官方Validation排名仍让原始别名占用原名次。训练日志记录负例次数、不同key14数、来源及教师版本。 + +## 运行与恢复 + +准备服务分别负责化学证据与全池教师索引。门控服务只在代码冻结、完整缓存核验、两臂真实GPU及Validation入口验收完成后放行。 + +主方案和对照使用独立进程、优化器、随机数状态、锁、日志及输出。每100步保存可恢复last,每500步保存里程碑;新增1,000与2,000步即累计3,000、4,000时做全量官方Validation。 + +首个正式新更新也立即保存last。每次恢复记录独立attempt ID;日志不删除,若有checkpoint之后回滚重放的步数,分析时按同一update最后一次记录取值,不把重放算作额外新更新。累计暴露计数从checkpoint恢复。 + +异步教师刷新在主方案累计3,000步时请求,绑定该checkpoint,只处理剩余Train工作;原索引最大年龄不超过本次2,000更新。若刷新未及完成,继续使用尚未超过年龄上限的审计索引并记录版本。到批准的4,000步端点后不再为无后续训练的任务继续刷新。 + +主方案的`sampling_decisions.sqlite`逐查询/视图/采样种子固定教师版本与该行哈希,包括DataLoader提前准备的batch。已有记录在重放时不会改选后来出现的新教师;丢失已固定的行或账本将拒绝恢复,避免同一个更新因重启而悄悄换负例。账本只保存取样追踪,不重新处理结构或联网。 + +Validation和MCES输出独立保存,MCES固定myopic-mces1.0.0、PuLP2.9.0、threshold15、单solver线程、5秒限时,保留近似/缺失;只作评估,不用于训练隔离筛选。 + +每个完整Validation输出两种视图的结构Top1/3/5/10/20/50/100/200、池内分子式Top1至10及20/50/100/200、覆盖率、宏平均,以及adduct、极性、峰数、候选量、同公式候选量、仪器和CE缺失分层。主指标是key14;完整InChIKey和canonical-isomeric-SMILES次指标本轮未实现,不冒充已经计算。配对比较使用相同checkpoint阶段、相同谱图分母,MCES限制在共同有效样本;预设guardrail只生成建议,不自动追加训练或发布模型。 + +`EXECUTION_CONFIG.json`记录接入后的真实运行配置,`MATCHED_VALIDATION_COMPARISON.json/.md`在完整验证和MCES陆续完成后自动更新。源目录的`plan.json`保留历史设计状态,不覆盖原记录或拿静态readiness字段冒充当前运行状态。 + +整卡只有一张4090且有其他活跃任务。新任务CPU nice19、单线程、小块计算、每进程11% allocator上限及显存等待;未停止、重启或修改旧任务。共享GPU可能竞争计算时间,不承诺零速度影响。 + +本轮优先保持严格损失分母和低峰值显存。批内对比用确定性gradient-cache回放;显式候选池逐视图反向,仍会在不同候选视图重复编码相同学生分子,不声称已经做到整步全池GNN只编码一次。长久缓存只用于冻结教师。当前记录共享主干与两个新头的总梯度范数,不把它们冒充每项Loss之间的完整梯度冲突审计;后者尚未实现。未来吞吐优化必须另做数值等价检查,不在本次运行中静默替换任务。 + +代码、配置和父依赖哈希保存在结果目录`SOURCE_MANIFEST.json`与`source_snapshot/`,完整数据资产哈希由`prepared/ASSET_MANIFEST.json`记录。容器重建可能丢失非卷目录,应保留本地代码快照并在后续备份checkpoint;不能将目录存在当作跨recycle持久化保证。 diff --git a/code/snapshot/root/code/ceir_r1_20261109/METHOD.md b/code/snapshot/root/code/ceir_r1_20261109/METHOD.md new file mode 100644 index 0000000000000000000000000000000000000000..1d73d4eda2af4e41abcd2253c62bf864caf23c5e --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/METHOD.md @@ -0,0 +1,182 @@ +# SpecPartition MS CEIR 同分异构体精排方案 + +更新日期:2026年11月9日。CEIR 表示 Chemical Evidence for Isomer Ranking。本方案合并C03诊断与MIST、MIST-CF、FLARE、ICEBERG、GLACIER的机制分析,给出下一轮主推方案和训练协议。它是待验证的研究方案,不是已证实最强模型。 + +## 1 决策与边界 + +以C03 `step_002000.pt`继续训练,不替换成C03 12k,不从随机初始化开始。C03主干、原始MS通道、有效batch和原候选协议保留。主攻正确分子式下的结构排序,并约束Mass检索和分子式任务不退化。 + +当前证据:MSG Formula 17,556条中有14,685条属于池内同公式结构误排;CASMI 500条中404条属于这一类。CASMI33条真值缺失属于候选覆盖,不计为可由排序修复的问题。相关统计是诊断,不是模型增益预测。 + +Test与CASMI已经被查看,必须如实记录开发过程;它们不参与接下来的负例挖掘、超参数选择或停止决策。现有额外训练源只核验key14隔离,不宣称已满足官方MCES结构距离隔离。 + +## 2 完整模型与首轮范围 + +R1主推模型联合使用五项改动:混合难负例、同公式精排约束、反向局部残差、谱图指纹监督、候选条件化子分子式证据。它们在同一步联合优化,消融顺序不表示先训练一个任务再冻结它。 + +R2再研究共享原子表示的片段集合与预测谱辅助、候选差异证据。合成结构扩展单列为R3数据规模实验。外部模拟器不作为R1启动依赖。 + +### 2.1 保留主干 + +- 谱图端:继承C03的256维、6层Transformer与最多256峰的原始输入通道。 +- 分子端:继承6层边门控残差MPNN、完整分子图、原子表示和现有候选特征。 +- metadata:使用实验precursor、adduct、极性,以及可用的CE、仪器与缺失标志。 +- 同结构多MS:按key14识别监督身份;CE不同的谱图可共享全局结构目标,但不要求其逐峰表示相同。 +- 不输入SIRIUS公式分数、公式顺序、Zodiac分数、CSI分数或参考答案相似度。 + +### 2.2 候选公式条件的化学组成证据 + +对每个实际候选公式F,从实验MS的10个高强度有效峰产生额外证据;原始256峰通道不变。整数元素计数、质量残差、可解释性mask及适用的损失组成进入轻量证据编码器。 + +先按adduct和电荷构造离子组成,不能将中性公式直接用于所有峰,也不能把任意precursor与峰的m/z差都当作中性损失。保留多重解释和未解释状态。不支持的adduct、峰电荷或组成假设必须记录mask,保留原模型分数,不伪造注释。 + +同一谱图与同一公式只构造一次证据并复用到其全部结构。MSG Mass对官方池内全部不同公式处理,不截断成10个公式;MSG Formula使用该池实际公式;CASMI只使用冻结发布中的实际Top10公式,不扩大或重检索。 + +证据有两条去向: + +1. 修正公式头a_F,公式监督中每个公式只出现一次。 +2. 丰富逐峰表示p_(k,F),参与候选原子局部匹配,使同一个F下不同连接结构也能得到不同分数。 + +只有第一条去向会在同公式候选中成为常量,无法单独改善异构体排序。不能把这条公式常量误称为结构证据。 + +### 2.3 双向局部残差 + +保留父模型的峰找原子分数,新增原子找峰的有界残差。复用同一个有效峰×原子相似度矩阵,不重复加入父模型原有局部分数。 + +反向残差的系数零初始化,初始模型评分应与父模型一致。padding必须mask,长度归一化,极少峰、空mask单独处理。这是统计局部关联,不是断言每个原子都产生一个可见峰。 + +化学组成证据进入局部路径时使用独立零初始化残差,避免新编码器随机输出破坏C03初始排序。R2将进一步用实际原子集合表示碎片,而不把单原子当作完整碎片。 + +### 2.4 谱图指纹监督 + +从原始MS全局表示预测训练参考结构的2048-bit、radius2、非手性Morgan指纹。使用cosine与连续Tanimoto目标,默认内部比重为1与0.1。 + +训练标签来自训练参考结构;推理只用模型预测指纹与每个候选自身指纹,不读取参考答案。先将它作为辅助监督;指纹匹配参与最终评分时使用零初始化、可关闭的校准残差,并单独消融。 + +必须核验同key14的参考指纹是否一致,遇到互变异构、标准化或身份冲突,采用明确版本化标准或mask,不能默认为所有记录的指纹相同。损失按身份均衡,避免有大量MS的结构主导监督。 + +### 2.5 最终评分 + +最终分数为父模型分数加反向局部、组成证据、预测指纹以及公式头修正的残差。各项标度从训练/Validation校准,不根据Test池动态拟合权重。所有新排序残差零初始化,已有分数不重复相加。 + +同公式的公式先验为相同常量。结构分数和同公式竞争监督必须独立成立,不允许模型只通过公式头降低总Loss。没有硬选公式、硬选簇、按真值相似度筛候选或插入真值。 + +## 3 联合目标 + +总目标为继承的C03目标,加小权重的Mass条件结构CE、同公式Top-gap及指纹辅助。组成证据与双向局部路径通过原有最终排序目标和公式目标学习,不为相同logits再叠加一份CE。 + +### 3.1 原始目标 + +保留分子式竞争、结构身份分组的MS与分子对比、最终候选池InfoNCE,以及已有独立细粒度辅助。接入前逐项确认logits、正例集合、temperature、分母和有效查询,发现完全相同监督不能改名重算。 + +批内正例由key14决定。不同MS对应同key14是多正例,不同结构即使分子式相同也不是结构正例。MS-MS与分子-分子细粒度目标保留;同公式粗粒度目标不加在主检索向量上,后续如研究则使用独立投影头。 + +### 3.2 同公式条件CE + +仅对存在有效跨公式负例的Mass训练池,从最终logits取真值公式子集做条件CE,起始权重0.25。Formula和真实公式池不额外重复此项;只有一个有效公式时该项mask。 + +同公式常量偏置在此CE中抵消,梯度直接约束结构竞争。必须使用最终推理分数,不使用真值作为输入改写分数。 + +### 3.3 同公式Top-gap + +找当前得分最高的最多3个不同key14的同公式错误结构,优化softplus(margin + S_wrong - S_positive),起始权重0.1,margin0.2,使用原始最终分数空间。它强调Top1附近竞争,但不是增加了新的标签,必须与纯池CE消融比较。 + +有放回抽样的重复副本不能占满Top3名额。原池真值缺失/不可评分时屏蔽该池的正例依赖项,不插入正例。独立标签可靠的MS与分子对比/指纹监督可继续生效。 + +### 3.4 有放回和重复身份 + +原始CID/SMILES资产、逐样本候选、官方排名不删除。R1新增一个可消融的损失身份均衡:对抽样结果中的同key14条目用log-mean-exp聚合logits,再在身份层做竞争。它是损失权重规范,不是物理删除候选。 + +均衡策略与C03原始重复计权不同,必须保留其单独开关及对照。随机抽样仍有放回,记录抽样次数、不同key14数量、重复数和来源。模型混合难采样下的池CE不是全池似然的无偏估计,不作此宣称。 + +对抽样中的身份g,明确采用以下新损失约定,避免将抽样重复与独立结构混淆: + +```text +e_g = logsumexp(S_j / tau_pool, identity(j)=g) - log(number_of_draws_with_identity_g) +L_pool = logsumexp(e_g, all_sampled_identities) - e_truth +L_cond = logsumexp(e_g, formula(g)=F_truth) - e_truth +L_gap = mean(softplus(0.2 + S_g_wrong - S_truth), Top3 unique wrong identities of F_truth) +L_new = L_C03_audited + 0.25 * mean_valid(L_cond) + 0.1 * mean_valid(L_gap) + + ramp_to_0.1 * mean_identity(L_fingerprint) +``` + +`S_g`为同身份原始分数的log-mean-exp;`e_g`为带池temperature的分组logit,两者不可混用标度。`L_C03_audited`在R1中使用上述可切换的身份计权规范,但只保留一份最终池InfoNCE;matched control保持父模型计权。条件项只有在其分母确实与全池不同且存在有效正负例时才启用。 + +多MS的全局对比中,MS找分子使用正确身份;分子找MS覆盖该身份的所有有效MS,不能只奖励最容易的一条。每个结构身份先聚合其MS目标,再对身份平均。具体实现和temperature沿用父模型并核对,不把原子找峰与此全局双向目标混为一谈。 + +所有CE均要求有效正例和至少一个不同身份/公式的有效负例,并只按实际有效查询平均。单类查询的CE即使数值为0,也不能计入有竞争监督的查询数;元素计数、指纹和其他合格独立目标可继续训练。 + +## 4 数据与采样 + +三个训练来源保持当前643,587条发布:MSG Train162,974条,MSP261,644条,MS2-SAN218,969条。发布应绑定manifest与哈希;这是现有发布统计,不是本轮重新审计全服务器后的新计数。 + +训练标签和负候选均排除MSG Validation、Test和CASMI的heldout key14。查询官方Train候选时实施训练监督mask,不改官方Validation/Test池。相同结构的不同MS保留;不把2D检索无法区分的立体形式做假负例。 + +候选按与真值无关的稳定hash乱序,同步更新训练标签。CID、原始存储顺序、PubChem返回顺序、样本ID、原始候选位置不得作为模型输入;不能用官方候选第一项作为推理答案。训练正例是否恰好占某个位置不应影响分数,需候选置换与padding验收。 + +MSG每个step同时使用Mass与Formula两个视图,每视图63次负例抽样:32次模型混淆、16次化学近邻、15次随机。Mass的模型混淆配额在可用时至少16次来自同公式,保留跨公式与随机竞争。 + +MSP/MS2-SAN保持256有效batch批内对比,从其中16条查询做显式真实公式池竞争,每条128次负例抽样,建议64模型、32化学、32随机。只使用已验收原池,缺真值不补入。 + +训练公式监督使用全部合格训练查询的不同公式候选,不只使用被选作结构显式池的16条。o_data的真实公式结构池只有一个公式时,不算多公式CE;独立公式监督必须有单独、已验收、无标签注入的质量约束候选集合。未具备集合时记录监督缺口,不把真实公式池包装成公式预测训练。 + +初始模型难例来自固定C03父权重的Train-only离线评分。每1000更新生成新版难例索引,checkpoint、候选hash与规则版本绑定。旧教师embedding只用于选负例,学生GNN每次正常前向反向。化学相似度仅供训练抽样,不是推理特征。 + +## 5 优化与效率 + +主干和旧优化器矩从父权重恢复。新增参数创建独立优化器组,不能错误恢复不存在的旧moment;学习率从父模型恢复值的0.3倍主干、1倍新模块起步,前200步ramp,均是待Validation验证的设置。control使用同一学习率策略、更新预算及查询顺序。 + +公式/结构/指纹等有效任务每步共同反向传播。分别对有效查询求均值,记录任务数量和梯度范数。指纹项总权重从0增长到0.1;不自动让Loss数值最大的项获得最大权重,也不预设PCGrad必然有利。 + +原C03不同来源、Mass/Formula和批内辅助的权重必须在接入时导出,不因为将某个源的loss从求和改成均值而隐式改变训练。R1先继承这些权重,新增同公式约束显式加权;独立的视图权重搜索留作可辨认的后续对照。 + +一次编码每个唯一谱图和分子图,复用原子、指纹与公式证据。静态RDKit处理、子分子式准备和模型难例挖掘离线进行。训练不能联网下载。 + +使用bf16或父模型已验证的混合精度,loss与logsumexp用float32;候选分块、梯度累积保持同一有效batch和同一softmax分母。只拼接标量logits,不能每块独立CE,也不能detach需要反传的分块表示。 + +先测候选原子/峰总量、数据等待、H2D、GPU计算、同步与排队,再设physical microbatch和块大小。无当前硬件测量,不承诺固定显存、吞吐或训练完成时间。拒绝为了显存更满而改变训练任务难度。 + +## 6 验证和实验协议 + +首轮每臂从同一个C03 2k追加2000步。主推方案与匹配control先做真实batch验收;消融使用相同查询顺序、随机种子、优化器旧状态和有效batch。随后在预先定义的Validation准则下,决定是否将胜出的方案追加到累计6000新步,必要时再扩展,不默认无限加epoch。 + +选模以完整MSG Validation Mass/Formula结构Top1调和均值为主;同时要求两视图单项不超过预先设置的可容忍退化阈值,报告公式Top1、MCES和缺失率。阈值在训练前锁定,不能看到Test后改。主指标相同先比较Formula Top1和有效MCES,检查有效分母一致。 + +每500更新保存并做轻量日志/梯度检查;每1000更新及pilot终点做完整Validation。MCES以固定算法、阈值、超时和结构配对缓存异步计算,不在每个训练step或每个小检查点重复跑。不得把异步结果未返回写成零或已通过选模。 + +MSG Validation全为正离子,不能用于证明负离子调参正确。CASMI负离子只做冻结报告。后续如需负离子开发集,必须核验其结构未被父模型训练过;从父模型已经使用的Train再划一块,只能算训练诊断,不是新的未见结构验证集。 + +日志需分开记录Mass、Formula、外部真实公式池的InfoNCE、条件CE、gap、公式CE/gap/元素目标、指纹目标和既有intra-modal目标;同时记录正例概率、Top-gap违例率、负例独立身份数、同公式负例数、公式候选覆盖、有效CE比例、证据注释mask覆盖、残差幅度以及每个任务对共享主干的梯度范数。总Loss大小不作为收敛或选模的唯一标准。 + +报告结构Top1/3/5/10/20/50/100/200、公式Top1至10及20/50/100/200、分母、候选覆盖、可评分率和MCES。按adduct、极性、峰数、候选量、同公式候选量和来源分层。最终优胜方案与control建议做3种子复验,未复验不宣称稳定提升。 + +MSG官方原始候选条目继续消耗官方名次;唯一key14排名是补充诊断。CASMI冻结1,765,420候选、467/500覆盖、无256限制、无人为补真值。固定公式Top10的重新排序不称为开放式公式生成。真正的新公式枚举与候选制备只能作为另一声明清楚的评测协议。 + +冻结公式集共有468/500条包含真值公式。在每条最多10个公式、全部正常评分且集合不变时,Formula Recall@10由覆盖决定,仍为93.6%;重新排序只能改善更小K。结构Recall任意K也不能超过原池467/500=93.4%。不能把这两类覆盖问题用额外Loss或真值补入“修复”。 + +## 7 后续创新与扩展 + +R2让分子图共享原子表示生成小规模片段集合,借鉴GLACIER的共享计算和ICEBERG的碎裂证据;用已核验Train-safe教师/启发式片段做弱监督,逐步降低弱标签权重,正结构对自己的实验MS重建。错误候选参与判别排序,不要求每个负结构重建同一实验MS。 + +候选差异研究采用同公式稀疏近邻或紧致微簇,只为寻找竞争候选的差异原子、连接位点及可区分碎片。所有候选保留直接分数,单例残差为0,不做完整N平方相似度矩阵,不把真值簇提前告知模型。 + +具体假设是:共享证据解释共同骨架,差异证据判断候选i相对近邻j多解释了哪些峰/损失。用共享网络的D(x,i,j)-D(x,j,i)形成反对称配对残差,再按有效近邻数归一化并有界加回直接分数。近邻只由候选自身结构建立,大小和阈值只在Validation确定;该机制是待实现消融,不当作已知有效或已经证明新颖。 + +R3才扩展Train-safe合成结构数据。教师的MSG安全不能自动外推为CASMI安全;支持的极性/adduct分别验收,缺CE采用缺失标志或与候选身份无关的先验,不借参考结构挑选最佳CE。结构扩展与增大训练预算分别配对控制。 + +创新主张是待验证的“竞争候选差异驱动的化学证据选择与共享计算”,不是声称首次使用骨架、指纹、对比学习或预测谱。 + +## 8 当前就绪程度 + +已有独立辅助原型:同公式Loss/采样、零初始化反向局部、指纹头;历史24项CPU单元测试通过。这不是正式训练器验收。 + +R1还需:Train-only模型难例索引、子分子式证据适配与离线缓存、身份均衡损失接入、新参数优化器组、真实学生GPU梯度和断点恢复验收。本轮不启动训练、不读取服务器实时状态、不修改任何现有服务。配置检查通过不表示网络已经训练可运行。 + +## 9 证据入口 + +- [C03逐样本诊断](../../analysis_outputs/c03_2k_badcase_20261109/diagnosis.json) +- [四类方法对比与来源](../../analysis_outputs/c03_four_model_review_20261109/comparison.json) +- [MIST-CF方法](https://arxiv.org/html/2307.08240v1) +- [FLARE作者局部Loss](https://huggingface.co/spaces/HassounLab/FLARE/blob/main/flare/utils/loss.py) +- [GLACIER方法](https://arxiv.org/html/2606.29161v1) +- [v1.5审计及数据条件](https://arxiv.org/html/2606.19624v2) diff --git a/code/snapshot/root/code/ceir_r1_20261109/ablation_matrix.json b/code/snapshot/root/code/ceir_r1_20261109/ablation_matrix.json new file mode 100644 index 0000000000000000000000000000000000000000..083a765572aec4efdef98182e9410843b0342350 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/ablation_matrix.json @@ -0,0 +1,2586 @@ +[ + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": false, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": false, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": false, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 0, + "chemical": 0, + "random": 63 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 0, + "chemical": 0, + "random": 128 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": false, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": false, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": false, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": false, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "control" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "main_R1" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 0, + "chemical": 0, + "random": 63 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 0, + "chemical": 0, + "random": 128 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_hard_mixture" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": false, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": false, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_extra_isomer_losses" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": false, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_reverse_local" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": false, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": false, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_fingerprint" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": false, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": true, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_composition_evidence" + }, + { + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ], + "reference_release_spectra": { + "MSG_Train": 162974, + "MSP_libraries": 261644, + "MS2_SAN_JSONL": 218969 + }, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": [ + "MSG_Train", + "MSP_libraries", + "MS2_SAN_JSONL" + ] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", + "zero_initialized_residual": true, + "bound": 0.3, + "reuse_peak_atom_matrix": true, + "assert_each_atom_is_observed_fragment": false + }, + "fingerprint": { + "enabled": true, + "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", + "input_dim": 256, + "hidden_dim": 512, + "bits": 2048, + "radius": 2, + "chirality": false, + "auxiliary_parameter_count": 1182208, + "auxiliary_cosine_weight": 1.0, + "auxiliary_soft_tanimoto_weight": 0.1, + "scoring_residual_zero_init": true, + "audit_targets_within_key14": true, + "mask_invalid_empty_or_conflicting_targets": true + }, + "composition_evidence": { + "enabled": true, + "implementation_ready": false, + "evidence_dim": 128, + "attention_layers": 2, + "heads": 4, + "strong_peaks": 10, + "retain_full_raw_peak_path": true, + "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", + "formulas_in_CASMI": "frozen_actual_Top10_only", + "cache_key": [ + "spectrum_hash", + "formula", + "adduct", + "charge", + "annotation_rule_version" + ], + "outputs": [ + "formula_score_residual", + "formula_conditioned_peak_tokens_for_structure_matching" + ], + "correct_ionic_mass_and_adduct_rules": true, + "ambiguous_or_unassigned_state": true, + "unsupported_chemistry_masks_only_new_evidence": true, + "zero_init_scoring_residuals": true + }, + "fragment_simulator": { + "enabled": false, + "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance" + }, + "candidate_relation": { + "enabled": false, + "stage": "R2_sparse_difference_evidence", + "hard_cluster_or_formula_filter": false, + "all_candidates_keep_direct_score": true + }, + "synthetic_structure_expansion": { + "enabled": false, + "stage": "R3_separate_data_and_budget_control" + } + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": { + "model": 32, + "chemical": 16, + "random": 15 + }, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": { + "model": 64, + "chemical": 32, + "random": 32 + }, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": { + "enabled": false, + "operator": "logmeanexp_over_sampled_entries_per_key14", + "semantics": "loss_weight_normalization_not_deletion_of_assets", + "separate_ablation": true + }, + "conditional_structure": { + "enabled": true, + "weight": 0.25, + "eligible_view": "mass", + "requires_cross_formula_negative": true, + "enabled_for_Formula_or_true_formula_odata": false + }, + "same_formula_gap": { + "enabled": true, + "weight": 0.1, + "margin": 0.2, + "hard_wrong_topk_unique_key14": 3, + "score_space": "raw_final_score", + "temperature": 1.0 + }, + "fingerprint_auxiliary": { + "enabled": true, + "target_weight": 0.1, + "ramp_updates": 200, + "identity_balanced_mean": true + }, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": [ + "control", + "main_R1", + "minus_hard_mixture", + "minus_extra_isomer_losses", + "minus_reverse_local", + "minus_fingerprint", + "minus_composition_evidence", + "minus_identity_balancing" + ], + "later_pilot_winner_repeat_seeds": [ + 20261109, + 20261110, + 20261111 + ], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": [ + "full_recomputed_InChIKey", + "canonical_isomeric_SMILES" + ], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [ + 1, + 3, + 5, + 10, + 20, + 50, + 100, + 200 + ], + "formula_topk": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 20, + 50, + 100, + 200 + ], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + }, + "arm": "minus_identity_balancing" + } +] diff --git a/code/snapshot/root/code/ceir_r1_20261109/acceptance_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/acceptance_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..5bc68bd2949f606e4a92451bd411673c1e0933b3 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/acceptance_ceir.py @@ -0,0 +1,110 @@ +"""Real Train GPU acceptance; temporary updates are never continuation updates.""" +import argparse +import gc +import json +from pathlib import Path +import time +import traceback +from runtime_ceir import * + + +def data_markers_complete(): + names=['train_composition_ready.json','validation_composition_ready.json','teacher_ready.json','fingerprint_targets.json','ASSET_MANIFEST.json'] + return all((CACHE/name).exists() for name in names) + + +def batch_index(plans): + return next(i for i,(_,_,p) in enumerate(plans) if len(p['odata'])==256 and len(p['msg'])==32) + + +def test_arm(arm,index,probe=False): + import torch + from dataclasses import replace + from data_ceir import Dataset + from model_ceir import make_model_optimizer + from objectives_ceir import train_step,amp + from prepare_ceir import load_teacher + from validation_ceir import evaluate + directory=run_dir(arm);plans=json.loads((CACHE/'workload.json').read_text())['plans'] + batch=Dataset([plans[index]],arm)[0] + if len(batch['rows'])!=288 or len({r['record_id'] for r in batch['rows']})!=288:raise RuntimeError('Not a real complete logical batch') + ready_name='early_GPU_probe.json' if probe else 'acceptance.json' + with gpu_work(directory,'real_GPU_acceptance'): + model,opt,progress,parent_lr=make_model_optimizer(arm) + source=source_state();initial_steps=[float(s['step']) for s in opt.state.values() if 'step' in s] + old_parameters=len(opt.param_groups[0]['params']);registered=sum(p.numel() for p in model.parameters()) + q=next(p['query'] for row in batch['rows'] for p in row['pools']);model.eval() + parent=load_teacher();parent.graph_chunk=model.graph_chunk;parent.local_chunk=model.local_chunk + with torch.inference_mode(),amp(): + expected=parent.encode_batch([q])[0][0].base.float() + actual=model.encode_batch([q])[0][0].base.float() + error=(expected-actual).abs().max().item() + if error>3e-4:raise RuntimeError('Initial C03 logit parity failed: '+str(error)) + perm=list(reversed(range(len(q.candidates)))) + shuffled=replace(q,candidates=tuple(q.candidates[i] for i in perm)) + perm_scores=model.encode_batch([shuffled])[0][0].base.float() + permutation_error=(perm_scores-actual[perm]).abs().max().item() + if permutation_error>3e-4:raise RuntimeError('Candidate permutation changed scores') + del parent;gc.collect();torch.cuda.empty_cache();restore_rng(source) + model.train();torch.cuda.reset_peak_memory_stats() + metrics=[] + # Test optimizer and auxiliary gradients without advancing the formal run. + for k in range(3 if arm=='main' else 1): + metrics.append(train_step(model,opt,batch,SOURCE_UPDATE+k,True)) + if metrics[-1]['backbone_gradient_norm']<=0:raise RuntimeError('No encoder gradient') + if arm=='main': + if metrics[-1]['fingerprint_gradient_norm']<=0 or metrics[-1]['composition_gradient_norm']<=0: + raise RuntimeError('Missing joint new-head gradient after zero-gate warm start') + if not metrics[-1]['gap_valid']:raise RuntimeError('No actual same-formula competition tested') + after_steps=[float(s['step']) for p,s in opt.state.items() if 'step' in s and any(p is a for a in opt.param_groups[0]['params'])] + if not after_steps or max(after_steps)<=max(initial_steps):raise RuntimeError('Old AdamW state did not continue') + temporary=directory/'acceptance_temporary.pt' + temp_progress=dict(progress,update=SOURCE_UPDATE+len(metrics),new_updates=len(metrics)) + checkpoint(temporary,model,opt,temp_progress,bind()) + saved_rng=dict(torch_rng=torch.get_rng_state(),cuda_rng=torch.cuda.get_rng_state_all(), + numpy_rng=__import__('numpy').random.get_state(),python_rng=random.getstate()) + next_before=train_step(model,opt,batch,temp_progress['update'],False)['loss'] + del model,opt;gc.collect();torch.cuda.empty_cache() + model,opt,reloaded,_=make_model_optimizer(arm,temporary) + next_after=train_step(model,opt,batch,reloaded['update'],False)['loss'] + resume_error=abs(next_before-next_after) + if resume_error>3e-4:raise RuntimeError('RNG/optimizer resume loss mismatch: '+str(resume_error)) + result=dict(complete=True,binding=bind(),arm=arm,formal_updates=0,temporary_test_updates=len(metrics), + source_update=SOURCE_UPDATE,target_update=TARGET_UPDATE,real_queries=288,pool_views=metrics[0]['pool_valid'], + source_parent_sha256=PLAN['parent']['sha256'],initial_logit_max_error=error,permutation_max_error=permutation_error, + old_optimizer_registered_parameters=old_parameters,old_optimizer_state_entries=len(initial_steps), + registered_parameters=registered,resume_loss_abs_error=resume_error,metrics=metrics, + peak_allocated_mib=max(m['peak_allocated_mib'] for m in metrics), + full_preparation_verified=not probe,Validation_probe_complete=False,unix_time=time.time()) + del model,opt;gc.collect();torch.cuda.empty_cache() + if not probe: + # The same scoring path must work on unchanged official pools as well. + with gpu_work(directory,'Validation_entrypoint_acceptance'): + model,opt,_,_=make_model_optimizer(arm);del opt + val=evaluate(model,arm,SOURCE_UPDATE,maximum_targets=1) + result['Validation_probe_complete']=all(val[k]['spectra']>0 for k in ('mass','formula')) + del model;gc.collect();torch.cuda.empty_cache() + if not result['Validation_probe_complete']:raise RuntimeError('Validation adapter acceptance failed') + save(directory/ready_name,result) + log_event(OUT/'acceptance_events.jsonl',dict(event='GPU_acceptance',arm=arm,probe=probe,peak_mib=result['peak_allocated_mib'],resume_error=resume_error)) + print(json.dumps(dict(arm=arm,complete=True,probe=probe,parameters=registered,peak_mib=result['peak_allocated_mib'],parent_parity=error,resume_error=resume_error)),flush=True) + + +def run(probe=False,only_arm=None): + if not probe and not data_markers_complete():raise RuntimeError('Full pilot data preparation is incomplete') + setup_gpu();plans=json.loads((CACHE/'workload.json').read_text())['plans'];index=batch_index(plans) + for arm in ([only_arm] if only_arm else ('control','main')):test_arm(arm,index,probe) + if probe:return + accepted=[json.loads((run_dir(arm)/'acceptance.json').read_text()) for arm in ('main','control')] + binding=bind() + if any(x['binding']!=binding or not x['complete'] or not x['Validation_probe_complete'] for x in accepted):raise RuntimeError('Acceptance/code binding mismatch') + save(OUT/'READY.json',dict(complete=True,binding=binding,real_GPU_acceptance_complete=True, + all_R1_pilot_data_ready=True,formal_updates=0,unix_time=time.time())) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--early-probe',action='store_true');p.add_argument('--arm',choices=['main','control']);a=p.parse_args() + if a.arm and not a.early_probe:raise RuntimeError('One-arm execution is only a provisional probe') + try:run(a.early_probe,a.arm) + except Exception: + save(OUT/'GPU_ACCEPTANCE_FAILURE.json',dict(traceback=traceback.format_exc(),unix_time=time.time(),probe=a.early_probe));raise diff --git a/code/snapshot/root/code/ceir_r1_20261109/comparison_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/comparison_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..2ba30f4e89f2aad56f0f9bdd887d80e8bef15b01 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/comparison_ceir.py @@ -0,0 +1,98 @@ +"""Validation-only, matched-arm readout. Does not start or extend training.""" +import gzip +import json +from pathlib import Path +import statistics +import time + + +def load(path): + if not path.exists():return None + if path.suffix=='.gz': + with gzip.open(path,'rt') as f:return json.load(f) + return json.loads(path.read_text()) + + +def paired_mces(main,control): + """Exactly the same valid spectrum/view pairs, never fill missing as zero.""" + a=load(main/'MCES_per_spectrum.json.gz');b=load(control/'MCES_per_spectrum.json.gz') + if a is None or b is None:return None + def index(rows): + out={(r['identifier'],r['view']):r['distance'] for r in rows} + if len(out)!=len(rows):raise RuntimeError('Duplicate MCES spectrum/view identity') + return out + aa,bb=index(a),index(b) + if aa.keys()!=bb.keys():raise RuntimeError('Unmatched Validation MCES denominators') + results={} + for view in ('mass','formula'): + keys=[key for key in aa if key[1]==view] + common=[key for key in keys if aa[key] is not None and bb[key] is not None] + ma=statistics.mean(aa[k] for k in common) if common else None + mb=statistics.mean(bb[k] for k in common) if common else None + results[view]=dict(denominator=len(keys),common_valid=len(common),main_common_mean=ma,control_common_mean=mb, + main_minus_control=ma-mb if common else None, + main_missing=sum(aa[k] is None for k in keys),control_missing=sum(bb[k] is None for k in keys)) + return results + + +def build(out): + out=Path(out);pairs={};candidates=[];all_ready=True + for update in (3000,4000): + paths={arm:out/arm/('validation_update_%06d'%update) for arm in ('main','control')} + metrics={arm:load(path/'metrics.json') for arm,path in paths.items()} + if not all(metrics.values()):all_ready=False;continue + main,control=metrics['main'],metrics['control'] + if main['binding']['runtime']!=control['binding']['runtime']: + raise RuntimeError('Comparison code/data bindings do not match') + for view in ('mass','formula'): + if main[view]['spectra']!=19429 or control[view]['spectra']!=19429: + raise RuntimeError('Not a complete matched Validation comparison') + structure={view:{k:100*(main[view]['structure'][k]['micro']-control[view]['structure'][k]['micro']) + for k in main[view]['structure']} for view in ('mass','formula')} + formula={k:100*(main['mass']['formula'][k]['micro']-control['mass']['formula'][k]['micro']) + for k in main['mass']['formula']} + harmonics={} + for arm,m in metrics.items(): + a=m['mass']['structure']['1']['micro'];b=m['formula']['structure']['1']['micro'] + harmonics[arm]=2*a*b/max(a+b,1e-12) + mces=paired_mces(paths['main'],paths['control']) + if mces is not None and any(r['denominator']!=19429 for r in mces.values()): + raise RuntimeError('Incomplete paired MCES readout; do not compare a truncated subset') + guardrails=dict( + both_view_structure_Top1=all(structure[v]['1']>=-.5 for v in ('mass','formula')), + mass_pool_formula_Top1=formula['1']>=-1., + paired_MCES=None if mces is None else all(r['main_minus_control'] is not None and r['main_minus_control']<=.2 for r in mces.values()), + no_additional_MCES_missing=None if mces is None else all(r['main_missing']<=r['control_missing'] for r in mces.values())) + passed=all(value is True for value in guardrails.values()) + if passed and harmonics['main']>harmonics['control']:candidates.append((harmonics['main'],update)) + if mces is None:all_ready=False + pairs[str(update)]=dict(structure_delta_pp=structure,mass_pool_formula_delta_pp=formula,paired_MCES=mces, + harmonic_Top1=harmonics,guardrails=guardrails,all_guardrails_passed=passed, + metrics_files={arm:str(paths[arm]/'metrics.json') for arm in paths}) + best=max(candidates)[1] if candidates and all_ready else None + return dict(protocol='MSG_full_Validation_only_no_Test_or_CASMI_selection',complete=all_ready, + pairs=pairs,recommended_main_checkpoint_update=best, + recommendation='eligible_main_improvement_on_this_seed' if best is not None else 'not_yet_demonstrated_or_pending', + additional_training_authorized=False,automatic_promotion=False, + limitations=['single_seed_not_a_significance_claim','sampled_training_pool_not_unbiased_full_pool_likelihood', + 'formula_metric_is_official_Mass_pool_ranking_not_open_formula_generation'],unix_time=time.time()) + + +def write(out): + out=Path(out);result=build(out) + path=out/'MATCHED_VALIDATION_COMPARISON.json';temp=path.with_suffix('.tmp') + temp.write_text(json.dumps(result,indent=2,allow_nan=False)+'\n');temp.replace(path) + lines=['# CEIR R1 matched Validation comparison','', + 'Same source C03 update 2000, query schedule and 2000 new-update budget. No Test/CASMI selection.', + '', '| Cumulative update | Mass Top1 delta (pp) | Formula Top1 delta (pp) | Mass-pool formula Top1 delta (pp) | Guardrails |', + '| --- | ---: | ---: | ---: | --- |'] + for update,p in result['pairs'].items(): + lines.append('| %s | %.3f | %.3f | %.3f | %s |'%(update,p['structure_delta_pp']['mass']['1'], + p['structure_delta_pp']['formula']['1'],p['mass_pool_formula_delta_pp']['1'], + 'pass' if p['all_guardrails_passed'] else ('pending MCES' if p['paired_MCES'] is None else 'not all passed'))) + lines+=['','Status: '+result['recommendation']+'.', + 'Full Top-K, formula Top-K, coverage, macro averages and metadata strata remain in each metrics.json.', + 'MCES compares exactly the common valid spectrum/view pairs; missing values are not zero. No automatic extra SGD or promotion.',''] + target=out/'MATCHED_VALIDATION_COMPARISON.md';temporary=target.with_suffix('.tmp') + temporary.write_text('\n'.join(lines));temporary.replace(target) + return result diff --git a/code/snapshot/root/code/ceir_r1_20261109/data_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/data_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..9d712251b5198f5e6282a061cb71511833abae1b --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/data_ceir.py @@ -0,0 +1,115 @@ +"""Read-only original data, exact parent MS order, separately seeded sampling.""" +from collections import Counter +from dataclasses import replace +import json +import hashlib +import random +import sqlite3 +import time + +from runtime_ceir import * +from data09 import Reader,loads +from prepare_ceir import get_pool,entry_identity,entry_molecule +from evidence_ceir import query_key +from sampling_ledger_ceir import SamplingLedger + + +class CEIRReader(Reader): + def __init__(self,arm): + super().__init__();self.arm=arm + self.hard=readonly(CACHE/'teacher_parent.sqlite') if arm=='main' else None + self.refreshed=None + self.fp_valid=json.loads((CACHE/'fingerprint_targets.json').read_text())['valid'] + self.pool_hashes={} + self.ledger=SamplingLedger(run_dir(arm)/'sampling_decisions.sqlite', + dict(parent_sha256=PLAN['parent']['sha256'],workload_sha256=json.loads((CACHE/'workload.json').read_text())['binding']['sha256'],arm=arm)) if arm=='main' else None + + def teacher_body(self,rid,kind,version): + if version==SOURCE_UPDATE:db=self.hard + elif version==3000: + fresh=CACHE/'teacher_003000.sqlite' + if self.refreshed is None and fresh.exists(): + candidate=readonly(fresh) + if candidate.execute("SELECT 1 FROM sqlite_master WHERE type='table' AND name='hard_fp32'").fetchone():self.refreshed=candidate + else:candidate.close() + db=self.refreshed + else:raise RuntimeError('Unknown teacher version') + found=db.execute('SELECT body FROM hard_fp32 WHERE record_id=? AND kind=?',(rid,kind)).fetchone() if db is not None else None + return found[0] if found is not None else None + + def sample_ceir(self,rid,seed,explicit=False,maximum_teacher_update=SOURCE_UPDATE): + row=loads(self.db.execute('SELECT body FROM samples WHERE record_id=?',(rid,)).fetchone()[0]) + row['ref']=self.molecule(row['graph_hash']);row['pools']=[] + row['fingerprint_eligible']=self.fp_valid.get(row['identity'],False) + rng=random.Random(seed) + kinds=['mass','formula'] if row['source']=='MSG_Train' else (['odata'] if explicit and row['view']['pool_infonce_eligible'] else []) + if row['source']=='MSG_Train':row['formulas']=tuple(self.official(row['target'],'mass')['formula_classes']) + else:row['formulas']=tuple(row['view']['formulas']) + for kind in kinds: + group=dict(kind=kind,target=row['target']) if kind!='odata' else dict(kind=kind,path=row['view']['pool_path'],sha256=row['view']['pool_sha256']) + pool,entries,indices=get_pool(self,group) + if kind=='odata':indices=pool['safe_mass_order'][row['view']['mass_order_start']:row['view']['mass_order_stop']] + positives=[j for j in indices if entry_identity(entries[j])==row['identity']] + negatives=[j for j in indices if entry_identity(entries[j])!=row['identity']] + if not positives or not negatives:continue + budget=128 if kind=='odata' else 63;positive=rng.choice(positives) + source_counts=Counter() + teacher_update=None + if self.arm=='control': + chosen=rng.choices(negatives,k=budget);source_counts['random']=budget + else: + def choose(): + newer=self.teacher_body(rid,kind,3000) if maximum_teacher_update>=3000 else None + return (3000,newer) if newer is not None else (SOURCE_UPDATE,self.teacher_body(rid,kind,SOURCE_UPDATE)) + version,body=self.ledger.select(rid,kind,seed,lambda v:self.teacher_body(rid,kind,v),choose) + hard=json.loads(body) + if version>maximum_teacher_update:raise RuntimeError('Teacher checkpoint is from a future training update') + if hard['source_update']!=version:raise RuntimeError('Pinned teacher version disagrees with its row') + teacher_update=hard['source_update'] + if hard['parent_sha256']!=PLAN['parent']['sha256'] or hard['query_key']!=query_key(row['query']):raise RuntimeError('Teacher binding drift') + if kind=='odata' and hard['pool_sha256']!=row['view']['pool_sha256']:raise RuntimeError('Teacher pool hash mismatch') + if kind!='odata': + name=(row['target'],kind) + if name not in self.pool_hashes:self.pool_hashes[name]=hashlib.sha256(json.dumps(pool,sort_keys=True,separators=(',',':')).encode()).hexdigest() + if hard['pool_sha256']!=self.pool_hashes[name]:raise RuntimeError('Official Train teacher-pool hash drift') + nset=set(negatives) + top=hard['top'];same=[j for _,_,j in top['same_scores'] if j in nset] + global_=[j for _,_,j in top['global_scores'] if j in nset] + chem=[j for _,_,j in top['chemical'] if j in nset] + model_n,chem_n,random_n=(64,32,32) if kind=='odata' else (32,16,15) + if not global_:raise RuntimeError('Prepared teacher has no valid wrong candidate') + same_n=model_n//2 if same else 0;chosen=[] + for values,n,label in [(same,same_n,'model_same_formula'),(global_,model_n-same_n,'model_global'),(chem,chem_n,'chemical'),(negatives,random_n,'random')]: + if n and not values:raise RuntimeError('Missing prepared '+label+' bank') + chosen.extend(rng.choices(values,k=n));source_counts[label]+=n + selected=[positive,*chosen] + # The truth's storage position is never an input feature. + permutation_rng=random.Random(seed+7919+(0 if kind=='mass' else 1)) + permutation_rng.shuffle(selected) + mols=tuple(entry_molecule(self,entries[j]) for j in selected) + if any(m.identity in self.forbidden for m in mols):raise RuntimeError('Heldout negative asset') + truth_positions=[i for i,m in enumerate(mols) if m.identity==row['identity']] + if len(truth_positions)!=1:raise RuntimeError('False negative or missing selected positive') + fs=tuple(pool['formula_classes']) if kind!='odata' else tuple(sorted({m.formula for m in mols})) + q=replace(row['query'],candidates=mols,formula_candidates=fs,candidate_view='msg_'+kind if kind!='odata' else 'odata_oracle') + row['pools'].append(dict(kind=kind,query=q,truth_identity=row['identity'],truth_formula=row['formula'],positive_index=truth_positions[0], + negative_draws=len(chosen),unique_negative_key14=len({entry_identity(entries[j]) for j in chosen}),source_counts=dict(source_counts), + teacher_source_update=teacher_update, + quality_eligible=bool(row['mass_ok']),reference_injected=False)) + row['query']=replace(row['query'],formula_candidates=row['formulas']) + return row + + +class Dataset: + def __init__(self,plans,arm,start_update=SOURCE_UPDATE):self.plans=plans;self.arm=arm;self.reader=None;self.start_update=start_update + def __len__(self):return len(self.plans) + def __getitem__(self,index): + if self.reader is None:self.reader=CEIRReader(self.arm) + epoch,step,groups=self.plans[index];started=time.monotonic();rows=[] + for source,ids in groups.items(): + for j,rid in enumerate(ids): + seed=SEED+epoch*100000000+step*10000+j+(1000000 if source=='msg' else 0) + rows.append(self.reader.sample_ceir(rid,seed,source=='odata' and j<16,self.start_update+index)) + if self.reader.ledger is not None:self.reader.ledger.commit() + return dict(epoch=epoch,step=step,rows=rows,data_seconds=time.monotonic()-started, + sampler_ledger_uuid=self.reader.ledger.metadata['ledger_uuid'] if self.reader.ledger is not None else None) diff --git a/code/snapshot/root/code/ceir_r1_20261109/debug_parity_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/debug_parity_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..faa1f1549d180c3b4895aefd9a5afefe4f9fc848 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/debug_parity_ceir.py @@ -0,0 +1,35 @@ +"""Read-only real Train score-component probe; no optimizer update.""" +import json +import torch +from runtime_ceir import * +from data_ceir import Dataset +from acceptance_ceir import batch_index +from model_ceir import make_model_optimizer +from prepare_ceir import load_teacher +from objectives_ceir import amp + + +def main(): + setup_gpu();plans=json.loads((CACHE/'workload.json').read_text())['plans'] + batch=Dataset([plans[batch_index(plans)]],'control')[0] + q=next(p['query'] for r in batch['rows'] for p in r['pools']) + with gpu_work(OUT,'debug_initial_score_components'),torch.inference_mode(),amp(): + model,opt,_,_=make_model_optimizer('main');del opt;model.eval() + parent=load_teacher();parent.graph_chunk=32;parent.local_chunk=32 + a=model.encode_batch([q])[0][0];b=parent.encode_batch([q])[0][0] + fwd,rev=model.local_both(a.peaks,a.atoms) + parent_local=parent.local_scores(b.peaks,b.atoms) + original_local=model.local_scores(a.peaks,a.atoms) + condition,joint,_=model.conditioned(a.q,q,[m.formula for m in q.candidates],a.z_molecules,a.formula_scores) + residual=model.local_weight*(fwd+.3*model.ceir.reverse_gate.tanh()*rev) + data=dict(peaks=(a.peaks-b.peaks).abs().max().item(),q=(a.q-b.q).abs().max().item(), + zm=(a.z_molecules-b.z_molecules).abs().max().item(),formulas=(a.formula_scores-b.formula_scores).abs().max().item(), + local_forward=(fwd-parent_local).abs().max().item(),local_same_model=(fwd-original_local).abs().max().item(), + base=(a.base-b.base).abs().max().item(),base_manual=(a.base-(joint+model.local_weight*original_local)).abs().max().item(), + local_weight=str(model.local_weight),fwd_dtype=str(fwd.dtype),reverse_dtype=str(rev.dtype), + residual_dtype=str(residual.dtype),joint_dtype=str(joint.dtype), + gates={n:getattr(model.ceir,n).item() for n in ('reverse_gate','fingerprint_gate','composition_gate','formula_gate')}) + save(OUT/'initial_parity_debug.json',data);print(json.dumps(data),flush=True) + + +if __name__=='__main__':main() diff --git a/code/snapshot/root/code/ceir_r1_20261109/evidence_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/evidence_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..ec769fbb10531825d70eefd60534846174bcef3c --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/evidence_ceir.py @@ -0,0 +1,141 @@ +"""Offline composition evidence: atom-conserving ion-budget mass assignments. + +No model score, CID order, reference identity/formula or reference similarity is +an argument. Bounded annotations may be ambiguous/unassigned. Not a full +fragmentation/rearrangement simulator or a reproduction of MIST-CF. +""" +from functools import lru_cache +import hashlib +import itertools +import json +import math +import re +import sqlite3 +import zlib + +import numpy as np +from rdkit import Chem + +ELEMENTS=('C','H','N','O','P','S','F','Cl','Br','I','B','Si','Na') +PT=Chem.GetPeriodicTable() +MASSES=np.array([PT.GetMostCommonIsotopeMass(e) for e in ELEMENTS],dtype=np.float64) +ELECTRON=.000548579909065 +RULE='ceir_ion_budget_v1_10ppm_top10_2ambiguities_max300k' +STRONG_PEAKS=10 +TOKENS=20 +WIDTH=32 +ADDUCT={ + '[M+H]+':({'H':1},1),'[M-H]-':({'H':-1},-1), + '[M+Na]+':({'Na':1},1),'[M+NH4]+':({'N':1,'H':4},1), + '[M+Cl]-':({'Cl':1},-1),'[M+FA-H]-':({'C':1,'H':1,'O':2},-1), + '[M+2H]2+':({'H':2},2),'[M-2H]2-':({'H':-2},-2)} + + +def counts(formula): + tokens=re.findall(r'([A-Z][a-z]?)(\d*)',formula) + if ''.join(a+b for a,b in tokens)!=formula or not tokens:raise ValueError('Invalid formula') + result=np.zeros(len(ELEMENTS),dtype=np.int16);seen=set() + for element,n in tokens: + if element not in ELEMENTS or element in seen:raise ValueError('Unsupported/repeated element') + seen.add(element);number=int(n or 1) + if number<1 or number>1000:raise ValueError('Unsupported count') + result[ELEMENTS.index(element)]=number + return result + + +def canonical_peaks(query): + return sorted(sorted(query.peaks,key=lambda p:(-p[1],p[0]))[:256]) + + +def query_key(query): + data=[list(map(list,canonical_peaks(query))),query.precursor_mz,query.adduct, + query.collision_energy,query.instrument] + return hashlib.sha256(json.dumps(data,separators=(',',':'),allow_nan=False).encode()).hexdigest() + + +@lru_cache(maxsize=32) +def library(formula,adduct): + try: + parent=counts(formula);delta,charge=ADDUCT[adduct] + for element,n in delta.items():parent[ELEMENTS.index(element)]+=n + if (parent<0).any():return None,'invalid_ion_budget' + axes=[i for i,n in enumerate(parent) if n and ELEMENTS[i]!='H'] + size=math.prod(int(parent[i])+1 for i in axes) + if size>300000:return None,'enumeration_budget_mask' + nonhydrogen=np.zeros((size,len(parent)),dtype=np.int16) + if axes: + grid=np.array(list(itertools.product(*(range(int(parent[i])+1) for i in axes))),dtype=np.int16) + nonhydrogen[:,axes]=grid + base=nonhydrogen@MASSES + return (parent,charge,nonhydrogen,base),'available' + except (ValueError,KeyError):return None,'unsupported_formula_or_adduct' + + +def annotate(query,formula): + features=np.zeros((TOKENS,WIDTH),dtype=np.float32) + valid=np.zeros(TOKENS,dtype=bool);indices=np.zeros(TOKENS,dtype=np.int16) + built,reason=library(formula,query.adduct) + peaks=canonical_peaks(query) + chosen=sorted(range(len(peaks)),key=lambda i:(-peaks[i][1],peaks[i][0]))[:STRONG_PEAKS] + if built is None:return dict(features=features,valid=valid,indices=indices,available=False,reason=reason,matched=0,total=len(chosen)) + parent,z,nonH,base=built;hidx=ELEMENTS.index('H');matched=0 + maximum=max(p[1] for p in peaks) + for order,pi in enumerate(chosen): + mz,intensity=peaks[pi];options=[] + for absolute_charge in range(1,abs(z)+1): + fz=absolute_charge*(1 if z>0 else -1) + target=mz*abs(fz)+fz*ELECTRON + hydrogen=np.rint((target-base)/MASSES[hidx]).astype(np.int32) + theoretical=(base+hydrogen*MASSES[hidx]-fz*ELECTRON)/abs(fz) + ppm=(theoretical-mz)/mz*1e6 + candidates=np.flatnonzero((hydrogen>=0)&(hydrogen<=parent[hidx])&(np.abs(ppm)<=10)) + for j in sorted(candidates,key=lambda k:(abs(ppm[k]),int(k)))[:2]: + vec=nonH[j].copy();vec[hidx]=hydrogen[j] + if vec.sum():options.append((abs(float(ppm[j])),float(ppm[j]),fz,vec)) + options.sort(key=lambda x:(x[0],x[2],tuple(x[3]))) + matched+=bool(options) + for alternative in range(2): + ti=order*2+alternative;indices[ti]=pi + if alternative and len(options)<2:continue + valid[ti]=True + if options: + _,ppm,fz,vec=options[alternative] + features[ti,:13]=np.log1p(vec) + features[ti,13:26]=np.log1p(parent-vec) + tail=[ppm/10,math.sqrt(intensity/maximum),mz/1000,fz/2,1.,math.log1p(len(options))] + else: + features[ti,13:26]=np.log1p(parent) + tail=[0.,math.sqrt(intensity/maximum),mz/1000,z/2,0.,0.] + features[ti,26:]=tail + return dict(features=features,valid=valid,indices=indices,available=True,reason=reason,matched=matched,total=len(chosen)) + + +def encode(result): + # A compact versioned wire representation, no pickle or reference labels. + obj=dict(features=result['features'].astype(np.float16).tobytes().hex(), + valid=result['valid'].astype(np.uint8).tolist(),indices=result['indices'].tolist(), + available=result['available'],reason=result['reason'],matched=result['matched'],total=result['total']) + return zlib.compress(json.dumps(obj,separators=(',',':')).encode(),1) + + +def decode(blob): + obj=json.loads(zlib.decompress(blob));obj['features']=np.frombuffer(bytes.fromhex(obj['features']),dtype=np.float16).reshape(TOKENS,WIDTH).astype(np.float32) + obj['valid']=np.asarray(obj['valid'],dtype=bool);obj['indices']=np.asarray(obj['indices'],dtype=np.int64) + return obj + + +class EvidenceStore: + def __init__(self,paths): + self.dbs=[sqlite3.connect('file:'+str(p)+'?mode=ro',uri=True,timeout=60) for p in paths] + for db in self.dbs:db.execute('PRAGMA query_only=ON') + + @lru_cache(maxsize=2048) + def get(self,key,formula): + for db in self.dbs: + row=db.execute('SELECT body FROM evidence WHERE query_key=? AND formula=?',(key,formula)).fetchone() + if row:return decode(row[0]) + raise RuntimeError('Missing offline composition evidence: '+key+' '+formula) + + def query(self,query): + key=query_key(query) + return [self.get(key,f) for f in query.formula_candidates] diff --git a/code/snapshot/root/code/ceir_r1_20261109/mces_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/mces_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..867608c3dae76c135c9b07e392685db9235b8f7b --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/mces_ceir.py @@ -0,0 +1,106 @@ +"""Post-hoc Validation MCES only, fixed protocol and resumable pair cache.""" +from concurrent.futures import ProcessPoolExecutor +import gzip +import hashlib +import importlib.metadata +import json +import math +from pathlib import Path +import sqlite3 +import statistics +import time +import os + +OUT=Path(os.environ.get('CEIR_OUTPUT','/root/xj/SpecPartition-MS/runs/ceir_r1_20261109')) +CACHE=OUT/'prepared' + + +def save(path,value): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True) + temp=path.with_suffix(path.suffix+'.tmp');temp.write_text(json.dumps(value,allow_nan=False,indent=2)+'\n');temp.replace(path) + +PROTOCOL=dict(package='myopic-mces',version='1.0.0',pulp='2.9.0',threshold=15, + always_stronger_bound=True,solver='PULP_CBC_CMD',solver_threads=1,time_limit_seconds=5, + missing='null_not_zero',stereochemistry='ignored_isotope_charge_preserved') + + +def canonical(smiles): + from rdkit import Chem + if not smiles:return None + m=Chem.MolFromSmiles(smiles) + if m is None:return None + Chem.RemoveStereochemistry(m) + return Chem.MolToSmiles(m,canonical=True,isomericSmiles=True) + + +def worker(task): + from myopic_mces.myopic_mces import MCES + key,a,b=task + if a==b:return key,0.,0,None + try: + result=MCES(ind=0,s1=a,s2=b,threshold=15,solver='PULP_CBC_CMD', + solver_options={'msg':False,'threads':1,'timeLimit':5},always_stronger_bound=True,no_ilp_threshold=False) + value=float(result[1]);mode=int(result[3]) + if not math.isfinite(value) or value<0:raise ValueError('Invalid MCES') + return key,value,mode,None + except Exception as exc:return key,None,None,repr(exc) + + +def evaluate(directory): + for name,version in [('myopic-mces','1.0.0'),('pulp','2.9.0')]: + if importlib.metadata.version(name)!=version:raise RuntimeError('MCES protocol dependency mismatch') + with gzip.open(directory/'per_spectrum_summary.json.gz','rt') as f:rows=json.load(f) + db=sqlite3.connect(CACHE/'Validation_mces_pairs.sqlite');db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS pairs(key TEXT PRIMARY KEY,a TEXT,b TEXT,distance REAL,mode INTEGER,error TEXT)') + inputs=[];todo={} + for r in rows: + a=canonical(r['target']);b=canonical(r.get('top1_smiles'));key=None + if a and b: + key=hashlib.sha256(json.dumps([PROTOCOL,a,b],sort_keys=True,separators=(',',':')).encode()).hexdigest() + found=db.execute('SELECT distance,error FROM pairs WHERE key=?',(key,)).fetchone() + if found is None or found[0] is None:todo[key]=(key,a,b) + inputs.append((r,key)) + tasks=list(todo.values());done=0 + # Bounded batches avoid pre-submitting the whole dataset and use no GPU. + with ProcessPoolExecutor(max_workers=2) as pool: + for start in range(0,len(tasks),32): + for key,value,mode,error in pool.map(worker,tasks[start:start+32]): + task=todo[key] + db.execute('INSERT OR REPLACE INTO pairs VALUES (?,?,?,?,?,?)',(key,task[1],task[2],value,mode,error));done+=1 + db.commit();save(directory/'MCES_status.json',dict(phase='posthoc_Validation_only',processed_new_pairs=done,total_new_pairs=len(tasks),unix_time=time.time())) + results={};details=[] + for view in ('mass','formula'): + selected=[(r,k) for r,k in inputs if r['view']==view];values=[];modes={};missing=0 + for r,key in selected: + hit=db.execute('SELECT distance,mode,error FROM pairs WHERE key=?',(key,)).fetchone() if key else None + value=hit[0] if hit else None + if value is None:missing+=1 + else:values.append(value);modes[str(hit[1])]=modes.get(str(hit[1]),0)+1 + details.append(dict(identifier=r['identifier'],view=view,distance=value,mode=hit[1] if hit else None,error=hit[2] if hit else 'missing_or_invalid_prediction')) + results[view]=dict(n=len(selected),valid=len(values),missing=missing,valid_mean=statistics.mean(values) if values else None, + full_mean=statistics.mean(values) if not missing and values else None,modes=modes) + temporary=directory/'MCES_per_spectrum.json.gz.tmp' + with gzip.open(temporary,'wt',compresslevel=3) as f:json.dump(details,f,separators=(',',':')) + temporary.replace(directory/'MCES_per_spectrum.json.gz') + save(directory/'MCES.json',dict(complete=True,protocol=PROTOCOL,views=results,approximation_and_time_limit_modes_preserved=True,unix_time=time.time())) + db.close() + + +def monitor(): + while True: + found=False + for arm in ('main','control'): + for update in (3000,4000): + directory=OUT/arm/('validation_update_%06d'%update) + if (directory/'metrics.json').exists() and not (directory/'MCES.json').exists(): + evaluate(directory);found=True + complete=all((OUT/arm/'COMPLETE.json').exists() and all((OUT/arm/('validation_update_%06d'%u)/'MCES.json').exists() for u in (3000,4000)) for arm in ('main','control')) + if found or complete: + from comparison_ceir import write + write(OUT) + if complete: + save(OUT/'ALL_VALIDATION_AND_MCES_COMPLETE.json',dict(complete=True,unix_time=time.time()));return + if not found:time.sleep(30) + + +if __name__=='__main__':monitor() diff --git a/code/snapshot/root/code/ceir_r1_20261109/model_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/model_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..9b3d86a235a4e3ef2b9e340a7a0f6d63c096b1df --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/model_ceir.py @@ -0,0 +1,170 @@ +"""C03-compatible model plus zero-initialized chemical-evidence residuals.""" +from dataclasses import replace +import numpy as np +import torch +from torch import nn +from torch.nn import functional as F +from torch.nn.utils.rnn import pad_sequence + +from runtime_ceir import * +from evidence_ceir import EvidenceStore,TOKENS,WIDTH +from specpartition_ms.model_v122 import BidirectionalRanker +from specpartition_ms.model import Encoded +from specpartition_ms.fast_formula_r2 import forward_batch as original_formula_forward +from coarse_losses import ProjectionBank +from kernels import install_graph_kernel + + +class CompositionHead(nn.Module): + def __init__(self): + super().__init__();d=128 + self.feature=nn.Linear(WIDTH,d);self.peak=nn.Linear(256,d) + layer=nn.TransformerEncoderLayer(d,4,dim_feedforward=2*d,dropout=0.,activation='gelu',batch_first=True,norm_first=True) + self.encoder=nn.TransformerEncoder(layer,2,enable_nested_tensor=False) + self.output=nn.Linear(d,256) + self.formula=nn.Sequential(nn.Linear(256+d,d),nn.GELU(),nn.Linear(d,1)) + + def forward(self,q,peaks,assets): + active=[i for i,a in enumerate(assets) if a['available'] and a['valid'].any()] + if not active:return [None]*len(assets),q.new_zeros(len(assets)) + features=q.new_tensor(np.stack([assets[i]['features'] for i in active])) + valid=torch.as_tensor(np.stack([assets[i]['valid'] for i in active]),device=q.device,dtype=torch.bool) + indices=torch.as_tensor(np.stack([assets[i]['indices'] for i in active]),device=q.device,dtype=torch.long) + encoded=self.encoder(self.feature(features)+self.peak(peaks[indices]),src_key_padding_mask=~valid) + summary=(encoded*valid[:,:,None]).sum(1)/valid.sum(1)[:,None] + values=self.formula(torch.cat((q.expand(len(active),-1),summary),-1)).squeeze(-1).tanh() + delta=q.new_zeros(len(assets)).index_copy(0,torch.tensor(active,device=q.device),values.to(q.dtype)) + results=[None]*len(assets) + lifted=self.output(encoded) + for j,i in enumerate(active):results[i]=(lifted[j,valid[j]],peaks[indices[j,valid[j]]]) + return results,delta + + +class Extensions(nn.Module): + def __init__(self): + super().__init__() + self.fingerprint=nn.Sequential(nn.Linear(256,512),nn.GELU(),nn.Linear(512,2048)) + self.composition=CompositionHead() + self.reverse_gate=nn.Parameter(torch.zeros(())) + self.fingerprint_gate=nn.Parameter(torch.zeros(())) + self.composition_gate=nn.Parameter(torch.zeros(())) + self.formula_gate=nn.Parameter(torch.zeros(())) + + +class CEIRRanker(BidirectionalRanker): + def __init__(self,c,arm): + super().__init__(c);self.hierarchy=ProjectionBank();self.ceir=Extensions() + self.arm=arm;self.evidence=None;install_graph_kernel(self) + + def install_evidence(self,validation=False): + paths=[CACHE/'train_composition.sqlite'] + if validation:paths.append(CACHE/'validation_composition.sqlite') + self.evidence=EvidenceStore(paths) + + def formula_batch(self,qs,queries,tokens,return_context=False): + scores=original_formula_forward(self.formula_v07,qs,queries,tokens) + contexts=[None]*len(queries) + if self.arm=='main': + if self.evidence is None:raise RuntimeError('Offline evidence store is not installed') + for i,query in enumerate(queries): + if not query.formula_candidates:continue + assets=self.evidence.query(query) + context,delta=self.ceir.composition(qs[i].float(),tokens[i].float(),assets) + scores[i]=scores[i]+self.ceir.formula_gate.tanh()*.5*delta.float() + contexts[i]=context + return (scores,contexts) if return_context else scores + + def local_both(self,peaks,atoms): + qp=F.normalize(self.local_q(peaks).float(),dim=-1);forward=[];reverse=[] + for start in range(0,len(atoms),self.local_chunk): + block=atoms[start:start+self.local_chunk];padded=pad_sequence(block,batch_first=True) + z=F.normalize(self.local_a(padded).float(),dim=-1) + valid=torch.arange(padded.shape[1],device=self.device)[None,:] 0).all() + checks.append('Gradient descent raises truth and lowers both distinct wrong identities') + no_negative = ce(torch.tensor([1., 1.], requires_grad=True), ['truth', 'truth'], 'truth') + assert no_negative.item() == 0 + checks.append('No distinct negative means no competitive CE signal') + + positive = torch.tensor(1., requires_grad=True) + negatives = torch.tensor([1.4, 0.5]) + gap = F.softplus(.2 + negatives - positive).mean() + gap.backward() + assert positive.grad < 0 + checks.append('Same-formula gap pushes the positive above hard wrong scores') + return {'scope': 'synthetic CPU mathematical checks only', 'checks_passed': len(checks), + 'checks': checks, 'same_formula_bias_gradient': grad.item(), + 'integrated_loss_or_GPU_acceptance': False, 'training_started': False} + + +if __name__ == '__main__': + report = run() + (Path(__file__).resolve().parent / 'objective_sanity_validation.json').write_text( + json.dumps(report, ensure_ascii=False, indent=2) + '\n') + print(json.dumps(report, ensure_ascii=False)) diff --git a/code/snapshot/root/code/ceir_r1_20261109/objective_sanity_validation.json b/code/snapshot/root/code/ceir_r1_20261109/objective_sanity_validation.json new file mode 100644 index 0000000000000000000000000000000000000000..a3bebf5264761d3295ae693bf08e2704aaccd899 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/objective_sanity_validation.json @@ -0,0 +1,15 @@ +{ + "scope": "synthetic CPU mathematical checks only", + "checks_passed": 6, + "checks": [ + "Repeated identical negative draws do not change identity-balanced CE", + "Candidate permutation preserves identity-balanced CE", + "A shared same-formula scalar offset has zero conditional-CE gradient", + "Gradient descent raises truth and lowers both distinct wrong identities", + "No distinct negative means no competitive CE signal", + "Same-formula gap pushes the positive above hard wrong scores" + ], + "same_formula_bias_gradient": -2.220446049250313e-16, + "integrated_loss_or_GPU_acceptance": false, + "training_started": false +} diff --git a/code/snapshot/root/code/ceir_r1_20261109/objectives_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/objectives_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..4b15b4bf2e0ecb85781c0741a19d8202c6ba6eff --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/objectives_ceir.py @@ -0,0 +1,167 @@ +"""Joint C03 objectives plus qualified CEIR terms, one final pool denominator.""" +from collections import Counter +import math +import time +import numpy as np +import torch +from torch.nn import functional as F +from torch.nn.utils.rnn import pad_sequence +from torch.utils.checkpoint import checkpoint as recompute + +from runtime_ceir import * +from kernels import grouped_contrastive +from specpartition_ms.fast_formula_r2 import auxiliary_batch + +PARENT_OBJECTIVES=load_module('ceir_parent_objectives',ROOT/'rebuild/hierarchical_training_20261103/objectives.py') + + +def amp():return torch.autocast('cuda',dtype=torch.bfloat16,enabled=LEGACY.C['bf16']) + + +def molecular_views(model,mols,probability): + # The closure reinstalls the stochastic hook during backward recomputation; + # unlike checkpointing a graph after removing the hook, RNG semantics hold. + def one(dummy): + old=model.activation_checkpoint_atom_threshold + model.activation_checkpoint_atom_threshold=10**12 + handle=model.graph.atom.register_forward_hook(lambda module,inputs,output:F.dropout(output,p=probability,training=True)) + try: + with amp():return model.encode_molecules(mols)[0].float() + finally:handle.remove();model.activation_checkpoint_atom_threshold=old + return (recompute(one,model.graph.atom.weight,use_reentrant=False,preserve_rng_state=True), + recompute(one,model.graph.atom.weight,use_reentrant=False,preserve_rng_state=True)) + + +PARENT_OBJECTIVES.molecular_views=molecular_views + + +def identity_logits(scores,identities): + keys=sorted(set(identities)) + mask=torch.tensor([[key==identity for identity in identities] for key in keys],device=scores.device,dtype=torch.bool) + group=scores.float()[None,:].expand(len(keys),-1).masked_fill(~mask,-torch.inf).logsumexp(-1)-mask.sum(-1).float().log() + return keys,group + + +def pool_terms(score,pool,arm): + ids=[m.identity for m in pool['query'].candidates];forms=[m.formula for m in pool['query'].candidates] + truth=pool['truth_identity'];tf=pool['truth_formula'];zero=score.float().sum()*0. + if arm=='control':return torch.logsumexp(score.float(),0)-score[pool['positive_index']].float(),zero,zero + keys,values=identity_logits(score,ids);positive=keys.index(truth) + ce=values.logsumexp(0)-values[positive] + formula_by_id={key:forms[ids.index(key)] for key in keys} + if any(f!=formula_by_id[k] for k,f in zip(ids,forms)):raise RuntimeError('Identity/formula conflict') + same=[i for i,k in enumerate(keys) if formula_by_id[k]==tf] + wrong=[i for i in same if i!=positive] + conditional=zero;gap=zero + if wrong and pool['quality_eligible']: + hard=values[wrong].topk(min(3,len(wrong))).values + gap=F.softplus(.2+hard-values[positive]).mean() + if pool['kind']=='mass' and len(same)1 and r['formula'] in r['formulas']] + zero=qs.float().sum()*0.;ce=zero;gap=zero;correct=zero + if valid: + ss=pad_sequence([scores[i].float() for i in valid],batch_first=True,padding_value=-torch.inf) + pos=torch.tensor([rows[i]['formulas'].index(rows[i]['formula']) for i in valid],device=qs.device) + rid=torch.arange(len(valid),device=qs.device);ps=ss[rid,pos] + ce=(ss.logsumexp(-1)-ps).sum()/max(1,total_valid) + negative=ss.scatter(1,pos[:,None],-torch.inf);k=min(3,ss.shape[1]-1) + top=negative.topk(k,dim=-1).values + actual=qs.new_tensor([min(k,len(scores[i])-1) for i in valid]) + gap=(F.softplus(.2+top-ps[:,None]).sum(-1)/actual).sum()/max(1,total_valid) + correct=(ss.argmax(-1)==pos).float().sum() + element,_,_=auxiliary_batch(model.formula_v07,qs,[r['formula'] for r in rows]) + elem=element.sum()/max(1,total_aux) + return ce+.1*gap+.2*elem,dict(formula_ce=ce.detach(),formula_gap=gap.detach(),element_ce=elem.detach(),formula_correct=correct.detach()) + + +def fingerprint_loss(model,q,rows): + if model.arm!='main':return q.sum()*0.,0 + selected=[i for i,r in enumerate(rows) if r['fingerprint_eligible']] + if not selected:return q.sum()*0.,0 + p=model.ceir.fingerprint(q[selected]).float().sigmoid() + y=torch.as_tensor(np.stack([rows[i]['ref'].whole for i in selected]),device=q.device,dtype=torch.float32) + inter=(p*y).sum(-1);union=p.square().sum(-1)+y.square().sum(-1)-inter + loss=1-F.cosine_similarity(p,y,dim=-1)+.1*(1-inter/union.clamp_min(1e-8)) + ids=[rows[i]['identity'] for i in selected];counts=Counter(ids) + weights=q.new_tensor([1/counts[k]/len(counts) for k in ids]) + return (loss*weights).sum(),len(selected) + + +def train_step(model,opt,batch,update,apply_update=True): + started=time.monotonic();rows=batch['rows'];queries=[r['query'] for r in rows];ids=[r['identity'] for r in rows] + reps={} + for r in rows: + if r['identity'] not in reps or r['ref'].smiles1 and r['formula'] in r['formulas'] for r in rows) + for a in range(0,len(rows),16): + block=rows[a:a+16] + with amp(): + tokens,q,_=model.spectrum.forward_batch([r['query'] for r in block]) + lf,d=formula_loss(model,q,tokens,block,valid,len(rows)) + loss=(q*dq[a:a+len(block)]).sum()+w['formula']*lf + loss.backward();metrics['formula_loss']+=lf.detach() + for k,v in d.items():metrics[k]+=v + for a in range(0,len(mols),32): + with amp():u=model.encode_molecules(mols[a:a+32])[0];surrogate=(u*dm[a:a+len(u)]).sum() + surrogate.backward() + pools=[p for r in rows for p in r['pools']];counts=Counter(p['kind'] for p in pools) + pm={k:qc.new_zeros(()) for k in ('odata','mass','formula')};c_total=qc.new_zeros(());g_total=qc.new_zeros(()) + def valid_same(p): + mm=p['query'].candidates + return p['quality_eligible'] and any(m.identity!=p['truth_identity'] and m.formula==p['truth_formula'] for m in mm) + g_count=sum(valid_same(p) for p in pools) if model.arm=='main' else 0 + c_count=sum(valid_same(p) and p['kind']=='mass' and any(m.formula!=p['truth_formula'] for m in p['query'].candidates) for p in pools) if model.arm=='main' else 0 + for p in pools: + with amp(): + enc=model.encode_batch([p['query']])[0][0] + ce,conditional,gap=pool_terms(enc.base,p,model.arm) + weight=w[{'odata':'odata_pool','mass':'msg_mass_pool','formula':'msg_formula_pool'}[p['kind']]] + loss=weight*ce/counts[p['kind']]+.25*conditional/max(1,c_count)+.1*gap/max(1,g_count) + loss.backward();pm[p['kind']]+=ce.detach()/counts[p['kind']] + c_total+=conditional.detach()/max(1,c_count);g_total+=gap.detach()/max(1,g_count) + total=base.detach()+auxiliary.detach()+fp_weight*fp.detach()+w['formula']*metrics['formula_loss']+.25*c_total+.1*g_total + for k,v in pm.items():metrics[k+'_pool']=v;total+=w[{'odata':'odata_pool','mass':'msg_mass_pool','formula':'msg_formula_pool'}[k]]*v + metrics.update(details);metrics.update(conditional_structure_ce=c_total,same_formula_gap=g_total,loss=total) + if not torch.isfinite(total):raise RuntimeError('Nonfinite CEIR objective') + gradients={} + for name,parameters in [('backbone',[p for n,p in model.named_parameters() if not n.startswith('ceir.')]), + ('fingerprint',model.ceir.fingerprint.parameters()),('composition',model.ceir.composition.parameters())]: + gs=[p.grad.detach().float().square().sum() for p in parameters if p.grad is not None] + gradients[name+'_gradient_norm']=torch.stack(gs).sum().sqrt() if gs else total*0 + for name in ('reverse_gate','fingerprint_gate','composition_gate','formula_gate'): + p=getattr(model.ceir,name);gradients[name+'_gradient']=p.grad.detach() if p.grad is not None else total*0 + metrics[name]=p.detach() + norm=torch.nn.utils.clip_grad_norm_(model.parameters(),LEGACY.C['gradient_clip'],error_if_nonfinite=True) + metrics.update(gradients);metrics['gradient_norm']=norm.detach() + if apply_update:opt.step() + values=torch.stack([v.detach().float().to(model.device) if torch.is_tensor(v) else torch.tensor(v,device=model.device).float() for v in metrics.values()]).cpu().tolist() + result=dict(zip(metrics,values));result.update(queries=len(rows),unique_connectivity=len(columns),formula_valid=valid, + fingerprint_valid=fp_valid,conditional_valid=c_count,gap_valid=g_count,pool_valid=dict(counts), + negative_draws=sum(p['negative_draws'] for p in pools),negative_unique_key14=sum(p['unique_negative_key14'] for p in pools), + sampling_sources=dict(sum((Counter(p['source_counts']) for p in pools),Counter())), + sources=dict(Counter(r['source'] for r in rows)),data_seconds=batch['data_seconds'], + adduct_counts=dict(Counter(r['query'].adduct for r in rows)), + quality_inconsistent_queries=sum(not r['mass_ok'] for r in rows), + teacher_version_query_counts=dict(Counter(str(p['teacher_source_update']) for p in pools if p['teacher_source_update'] is not None)), + step_compute_seconds=time.monotonic()-started,peak_allocated_mib=torch.cuda.max_memory_allocated()/2**20) + return result diff --git a/code/snapshot/root/code/ceir_r1_20261109/pipeline_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/pipeline_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..f8fb1dd05eca3de0f61df37cae2d6b9f0a12f8b6 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/pipeline_ceir.py @@ -0,0 +1,126 @@ +"""Managed gate: all caches -> real GPU acceptance -> both continuation arms.""" +import json +import importlib.metadata +import platform +from pathlib import Path +import shutil +import subprocess +import sys +import time +import traceback +from runtime_ceir import * + + +def provenance_snapshot(): + binding=bind();dest=OUT/'source_snapshot';dest.mkdir(parents=True,exist_ok=True) + for file in HERE.iterdir(): + if file.is_file() and not file.name.startswith('.') and file.suffix in ('.py','.json','.md','.conf'):shutil.copy2(file,dest/file.name) + if (HERE/'reference').exists():shutil.copytree(HERE/'reference',dest/'reference',dirs_exist_ok=True) + dependencies=dest/'parent_dependencies';dependencies.mkdir(exist_ok=True) + for name,digest in binding['dependency_sources'].items(): + original=Path(name);relative=original.relative_to(ROOT) + target=dependencies/relative;target.parent.mkdir(parents=True,exist_ok=True);shutil.copy2(original,target) + if sha(target)!=digest:raise RuntimeError('Dependency snapshot mismatch') + save(OUT/'SOURCE_MANIFEST.json',dict(binding=binding,source_parent=PLAN['parent'],snapshot=str(dest),unix_time=time.time())) + save(OUT/'EXECUTION_CONFIG.json',dict(schema_version=1,status='integrated_runtime_not_the_historical_proposal', + parent=PLAN['parent'],source_update=SOURCE_UPDATE,target_update=TARGET_UPDATE, + permitted_arms=['main','control'],additional_updates_each=2000,original_base_config=LEGACY.C, + resolved_main=PLAN['loss'],sampling=PLAN['sampling'],optimizer=PLAN['optimizer'], + GPU=dict(allocator_fraction_each=.11,admission_free_mib=5500,private_R1_slots=2, + new_jobs_only_not_an_exclusive_lock_against_other_users=True), + data_scope='only_actual_2000_step_pilot_queries_and_full_official_Validation', + no_Test_or_CASMI_for_training_or_selection=True,proposal_readiness_flags_are_historical=True, + runtime_binding=binding,unix_time=time.time())) + import torch + versions={} + for package in ('torch','numpy','rdkit'): + try:versions[package]=importlib.metadata.version(package) + except importlib.metadata.PackageNotFoundError:versions[package]=None + gpu=subprocess.run(['nvidia-smi','--query-gpu=name,driver_version,memory.total', + '--format=csv,noheader'],capture_output=True,text=True,check=True).stdout.strip() + save(OUT/'ENVIRONMENT.json',dict(python=sys.version,executable=sys.executable,platform=platform.platform(), + packages=versions,torch_build_CUDA=torch.version.cuda,GPU_query=gpu, + mixed_precision='BF16_encoder_FP32_reductions',deterministic_algorithms=True, + cuda_workspace=':4096:8',student_trainable_embeddings_persisted=False)) + + +def freeze_assets(): + marker=CACHE/'ASSET_MANIFEST.json' + files=['workload.json','fingerprint_targets.json','train_composition.sqlite','validation_composition.sqlite','teacher_parent.sqlite'] + if marker.exists(): + prior=json.loads(marker.read_text()) + for name,meta in prior['files'].items(): + stat=(CACHE/name).stat() + if stat.st_size!=meta['bytes'] or stat.st_mtime_ns!=meta['mtime_ns']: + raise RuntimeError('Prepared asset changed after freeze: '+name) + return + teacher=json.loads((CACHE/'teacher_ready.json').read_text()) + manifest=json.loads((CACHE/'workload.json').read_text()) + expected={(rid,g['kind']) for g in manifest['pools'].values() for rid in g['record_ids']} + db=readonly(CACHE/'teacher_parent.sqlite') + actual=set(db.execute('SELECT record_id,kind FROM hard_fp32')) + if actual!=expected or teacher['queries']!=len(expected):raise RuntimeError('Incomplete or extraneous teacher query coverage') + db.close() + stats={} + for name in files: + path=CACHE/name;stat=path.stat() + meta=dict(bytes=stat.st_size,mtime_ns=stat.st_mtime_ns,sha256=sha(path)) + if path.suffix=='.sqlite': + db=readonly(path);integrity=db.execute('PRAGMA quick_check').fetchall();db.close() + if integrity!=[('ok',)]:raise RuntimeError('SQLite integrity check failed: '+name) + meta['sqlite_quick_check']='ok' + stats[name]=meta + save(marker,dict(complete=True,files=stats,teacher_query_pairs=len(expected),workload_binding=manifest['binding'],unix_time=time.time())) + + +def pipeline(): + OUT.mkdir(parents=True,exist_ok=True);CACHE.mkdir(parents=True,exist_ok=True) + while not (OUT/'CODE_RELEASE.json').exists(): + save(OUT/'pipeline_status.json',dict(phase='waiting_for_frozen_code_release',formal_training_started=False,unix_time=time.time())) + time.sleep(10) + release=json.loads((OUT/'CODE_RELEASE.json').read_text()) + if release['code']!=code_manifest():raise RuntimeError('Code differs from the frozen release') + names=['train_composition_ready.json','validation_composition_ready.json','teacher_ready.json'] + starts={} + while not all((CACHE/name).exists() for name in names): + for service,marker in [('specpartition-ceir-r1-evidence-20261109','validation_composition_ready.json'), + ('specpartition-ceir-r1-mining-20261109','teacher_ready.json')]: + if (CACHE/marker).exists():continue + key=(service,sha(HERE/'prepare_ceir.py')) + status=subprocess.run(['supervisorctl','status',service],capture_output=True,text=True).stdout + if 'RUNNING' not in status and 'STARTING' not in status and starts.get(key,0)<3: + subprocess.run(['supervisorctl','start',service],check=False);starts[key]=starts.get(key,0)+1 + missing=[name for name in names if not (CACHE/name).exists()] + save(OUT/'pipeline_status.json',dict(phase='preparing_all_pilot_caches',pending=missing,formal_training_started=False,unix_time=time.time())) + time.sleep(15) + freeze_assets();provenance_snapshot() + if not (OUT/'READY.json').exists(): + save(OUT/'pipeline_status.json',dict(phase='real_GPU_acceptance',formal_training_started=False,unix_time=time.time())) + subprocess.run([sys.executable,'-u',str(HERE/'acceptance_ceir.py')],check=True,cwd=HERE) + if json.loads((OUT/'READY.json').read_text())['binding']!=bind():raise RuntimeError('Code changed after GPU acceptance') + services=['specpartition-ceir-r1-main-20261109','specpartition-ceir-r1-control-20261109', + 'specpartition-ceir-r1-mces-20261109','specpartition-ceir-r1-refresh-20261109'] + # Explicitly name only this experiment's new services; never `update all`. + for service in services: + if '-main-' in service and (OUT/'main/COMPLETE.json').exists():continue + if '-control-' in service and (OUT/'control/COMPLETE.json').exists():continue + if '-mces-' in service and (OUT/'ALL_VALIDATION_AND_MCES_COMPLETE.json').exists():continue + if '-refresh-' in service and (OUT/'main/step_004000.pt').exists():continue + status=subprocess.run(['supervisorctl','status',service],capture_output=True,text=True).stdout + if 'RUNNING' not in status:subprocess.run(['supervisorctl','start',service],check=True) + while True: + updates={} + for arm in ('main','control'): + path=OUT/arm/'status.json' + updates[arm]=json.loads(path.read_text()).get('new_updates',0) if path.exists() else 0 + started=all(value>=1 for value in updates.values()) + save(OUT/'pipeline_status.json',dict(phase='both_arms_have_real_updates' if started else 'waiting_for_first_real_updates', + formal_training_started=started,actual_new_updates=updates,services=services,unix_time=time.time())) + if started:return + time.sleep(10) + + +if __name__=='__main__': + try:pipeline() + except Exception: + save(OUT/'PIPELINE_FAILURE.json',dict(traceback=traceback.format_exc(),unix_time=time.time(),other_services_modified=False));raise diff --git a/code/snapshot/root/code/ceir_r1_20261109/plan.json b/code/snapshot/root/code/ceir_r1_20261109/plan.json new file mode 100644 index 0000000000000000000000000000000000000000..9f13706212f1511609384489465e6f42f386d3ca --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/plan.json @@ -0,0 +1,182 @@ +{ + "schema_version": 1, + "method": "SpecPartition-MS CEIR-R1", + "description": "Chemical Evidence for Isomer Ranking; recommended hypothesis, not a measured strongest model", + "status": "design_and_config_only_not_trainer_integrated", + "new_training_started": false, + "existing_services_changed": false, + "parent": { + "checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "source_update": 2000, + "resume_old_model_optimizer_moments_rng": true, + "new_parameters_separate_optimizer_group": true, + "strict_false_checkpoint_load_requires_explicit_whitelist": true + }, + "data": { + "training_sources": ["MSG_Train", "MSP_libraries", "MS2_SAN_JSONL"], + "reference_release_spectra": {"MSG_Train": 162974, "MSP_libraries": 261644, "MS2_SAN_JSONL": 218969}, + "reference_release_total": 643587, + "labels": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/train.json", + "prepared": "/workspace/xj/SpecPartition-MS/data/derived/joint_r09_inputs_20261102/train.sqlite", + "candidates": "/workspace/xj/SpecPartition-MS/data/derived/training_r08_true_formula_records_20261101/preparation.sqlite", + "heldout_registry": "/workspace/xj/SpecPartition-MS/data/derived/data_release_r07_key14_20261101/heldout_registry.json", + "live_inventory_rechecked_this_turn": false, + "exclude_heldout_key14_from_training_labels_and_negative_supervision": true, + "keep_multiple_MS_per_identity": true, + "delete_raw_candidate_records": false, + "official_MSG_Mass_Formula_both_each_step": true, + "truth_injection": false, + "network_during_training": false, + "heavy_RDKit_during_training": false, + "negative_mining_allowed_splits": ["MSG_Train", "MSP_libraries", "MS2_SAN_JSONL"] + }, + "model": { + "inherit_C03_backbones": true, + "spectrum_dim": 256, + "spectrum_layers": 6, + "molecule_edge_gated_MPNN_layers": 6, + "raw_peak_limit": 256, + "reference_registered_parent_parameters": 17001870, + "new_total_parameters": null, + "new_modules": { + "reverse_local": {"enabled": true, "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/local_coverage.py", "zero_initialized_residual": true, "bound": 0.3, "reuse_peak_atom_matrix": true, "assert_each_atom_is_observed_fragment": false}, + "fingerprint": {"enabled": true, "existing_prototype": "../specpartition-c03-isomer-refinement-20261109/fingerprint_aux.py", "input_dim": 256, "hidden_dim": 512, "bits": 2048, "radius": 2, "chirality": false, "auxiliary_parameter_count": 1182208, "auxiliary_cosine_weight": 1.0, "auxiliary_soft_tanimoto_weight": 0.1, "scoring_residual_zero_init": true, "audit_targets_within_key14": true, "mask_invalid_empty_or_conflicting_targets": true}, + "composition_evidence": {"enabled": true, "implementation_ready": false, "evidence_dim": 128, "attention_layers": 2, "heads": 4, "strong_peaks": 10, "retain_full_raw_peak_path": true, "formulas_in_MSG": "all_actual_distinct_pool_formulas_not_Top10_truncated", "formulas_in_CASMI": "frozen_actual_Top10_only", "cache_key": ["spectrum_hash", "formula", "adduct", "charge", "annotation_rule_version"], "outputs": ["formula_score_residual", "formula_conditioned_peak_tokens_for_structure_matching"], "correct_ionic_mass_and_adduct_rules": true, "ambiguous_or_unassigned_state": true, "unsupported_chemistry_masks_only_new_evidence": true, "zero_init_scoring_residuals": true}, + "fragment_simulator": {"enabled": false, "stage": "R2_after_Train_safe_teacher_and_GPU_acceptance"}, + "candidate_relation": {"enabled": false, "stage": "R2_sparse_difference_evidence", "hard_cluster_or_formula_filter": false, "all_candidates_keep_direct_score": true}, + "synthetic_structure_expansion": {"enabled": false, "stage": "R3_separate_data_and_budget_control"} + }, + "no_reference_formula_in_Mass_inference": true, + "no_reference_SMILES_or_similarity_in_inference": true, + "SIRIUS_scores_ranks_CSI_features": false, + "do_not_add_parent_peak_atom_score_twice": true, + "calibrate_formula_residual_without_duplicating_parent_prior": true, + "initial_logits_match_parent_required": true + }, + "sampling": { + "odata_effective_batch": 256, + "MSG_effective_batch": 32, + "odata_explicit_queries": 16, + "MSG_negative_draws_per_view": 63, + "MSG_mix": {"model": 32, "chemical": 16, "random": 15}, + "MSG_model_same_formula_quota_when_available": 16, + "odata_negative_draws": 128, + "odata_mix": {"model": 64, "chemical": 32, "random": 32}, + "with_replacement": true, + "same_key14_never_negative": true, + "teacher_index_initial_checkpoint": "parent_exact_sha256", + "teacher_index_refresh_updates": 1000, + "teacher_max_staleness_updates": 2000, + "teacher_index_binds_checkpoint_pool_and_rule_hashes": true, + "teacher_missing_at_start": "fail_acceptance_not_silent_all_random_fallback", + "teacher_embeddings_only_for_sampling_not_student_backprop": true, + "sampled_pool_CE_claimed_unbiased_full_pool_likelihood": false, + "log_unique_key14_and_repetitions": true + }, + "loss": { + "inherit_C03_base_objectives_and_weights": true, + "audit_equal_logits_positive_sets_denominators_no_duplicate_CE": true, + "final_score_pool_InfoNCE_once": true, + "grouped_multi_MS_positives": true, + "same_formula_is_not_structure_positive": true, + "coarse_formula_positive_loss_on_main_retrieval_embedding": false, + "formula_head_unique_formula_once": true, + "formula_supervision_for_all_eligible_queries": true, + "odata_true_formula_pool_is_not_multiformula_supervision": true, + "identity_balanced_occurrence_reduction": {"enabled": true, "operator": "logmeanexp_over_sampled_entries_per_key14", "semantics": "loss_weight_normalization_not_deletion_of_assets", "separate_ablation": true}, + "conditional_structure": {"enabled": true, "weight": 0.25, "eligible_view": "mass", "requires_cross_formula_negative": true, "enabled_for_Formula_or_true_formula_odata": false}, + "same_formula_gap": {"enabled": true, "weight": 0.1, "margin": 0.2, "hard_wrong_topk_unique_key14": 3, "score_space": "raw_final_score", "temperature": 1.0}, + "fingerprint_auxiliary": {"enabled": true, "target_weight": 0.1, "ramp_updates": 200, "identity_balanced_mean": true}, + "composition_evidence_additional_duplicate_CE": false, + "local_path_additional_duplicate_pool_CE": false, + "missing_positive_masks_positive_dependent_pool_terms": true, + "competitive_CE_requires_distinct_negative": true, + "means_and_effective_counts_use_actual_eligible_queries": true, + "no_positive_injection": true, + "hyperparameters_are_unvalidated_starting_points": true + }, + "optimizer": { + "inherit_family_and_old_moments": true, + "backbone_lr_multiplier_vs_parent_restored_lr": 0.3, + "new_module_lr_multiplier_vs_parent_restored_lr": 1.0, + "warmup_new_or_changed_groups_updates": 200, + "inherit_gradient_clip": true, + "same_schedule_in_matched_control": true, + "joint_update_of_active_tasks": true + }, + "efficiency": { + "unique_graph_encode_once_per_step": true, + "formula_evidence_shared_per_query_formula": true, + "offline_static_assets_and_annotations": true, + "no_full_BxBxPxA_tensor": true, + "candidate_block_size": "measure_on_real_GPU_not_predeclared_as_verified", + "single_softmax_denominator_across_blocks": true, + "do_not_detach_trainable_student_embeddings": true, + "loss_and_logsumexp_fp32": true, + "profile_data_H2D_compute_sync_and_queue_time": true, + "walltime_and_memory_claims": null + }, + "experiment": { + "pilot_additional_updates": 2000, + "pilot_final_update": 4000, + "continuation_max_additional_updates_after_predeclared_selection": 6000, + "checkpoint_and_lightweight_checks_every_updates": 500, + "full_Validation_every_updates": 1000, + "MCES": "asynchronous_fixed_protocol_and_pair_cache_not_every_step", + "same_parent_seed_query_order_optimizer_and_effective_batch": true, + "ablation_sequence": ["control", "main_R1", "minus_hard_mixture", "minus_extra_isomer_losses", "minus_reverse_local", "minus_fingerprint", "minus_composition_evidence", "minus_identity_balancing"], + "later_pilot_winner_repeat_seeds": [20261109, 20261110, 20261111], + "not_all_arms_started_or_queued": true + }, + "selection": { + "split": "MSG_Validation_full", + "primary": "harmonic_mean_of_Mass_and_Formula_structure_Top1", + "maximum_per_view_structure_Top1_drop_pp_vs_matched_control": 0.5, + "maximum_formula_Top1_drop_pp_vs_matched_control": 1.0, + "maximum_MCES_increase_vs_matched_control_same_valid_queries": 0.2, + "guardrails_are_predeclared_design_choices_not_significance_bounds": true, + "formula_scope": "Mass_pool_formula_ranking_not_open_generation", + "missingness_cannot_be_hidden_by_effective_mean": true, + "Test_CASMI_used_for_selection": false, + "formula_and_metadata_strata_reported_separately": true + }, + "evaluation": { + "MSG_official_pools_unchanged": true, + "official_raw_aliases_still_consume_ranks": true, + "CASMI_frozen_candidates": 1765420, + "CASMI_truth_coverage": 467, + "CASMI_n": 500, + "CASMI_candidate_limit": null, + "CASMI_truth_injection": false, + "CASMI_formula_scope": "rerank_fixed_SIRIUS_Top10_not_open_formula_generation", + "CASMI_frozen_formula_truth_coverage": 468, + "CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas": true, + "secondary_structure_metrics": ["full_recomputed_InChIKey", "canonical_isomeric_SMILES"], + "primary_structure_metric": "key14_connectivity", + "structure_topk": [1,3,5,10,20,50,100,200], + "formula_topk": [1,2,3,4,5,6,7,8,9,10,20,50,100,200], + "MCES_missing_not_zero_filled": true, + "MCES_training_split_filtering_requested": false + }, + "input_leakage_checks": { + "stable_hash_candidate_shuffle_without_reference": true, + "CID_original_position_PubChem_order_as_features": false, + "candidate_permutation_and_padding_invariance_required": true, + "all_sources_and_view_loss_weights_exported_from_parent": true, + "MSG_Validation_claimed_negative_mode_development_set": false, + "new_negative_development_split_must_audit_parent_training_exposure": true + }, + "readiness": { + "config_is_training_entrypoint": false, + "existing_CPU_helper_tests": 24, + "formal_trainer_integration": false, + "Train_only_bound_teacher_index": false, + "composition_annotation_adapter_and_cache": false, + "identity_balanced_losses_integrated": false, + "new_parameter_optimizer_groups_integrated": false, + "real_student_GPU_forward_backward": false, + "resume_and_parent_logit_parity_acceptance": false, + "training_allowed_only_after_all_implementation_gates": true + } +} diff --git a/code/snapshot/root/code/ceir_r1_20261109/prepare-evidence.supervisor.conf b/code/snapshot/root/code/ceir_r1_20261109/prepare-evidence.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..085cd6fd68978fb432eec37c3d5a762d54b5a2e5 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/prepare-evidence.supervisor.conf @@ -0,0 +1,31 @@ +[program:specpartition-ceir-r1-evidence-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u prepare_ceir.py evidence +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/prepare_evidence.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/prepare_evidence_error.log +stdout_logfile_maxbytes=50MB +stdout_logfile_backups=2 +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-r1-mining-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u prepare_ceir.py mining +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/prepare_mining.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/prepare_mining_error.log +stdout_logfile_maxbytes=50MB +stdout_logfile_backups=2 +stderr_logfile_maxbytes=20MB diff --git a/code/snapshot/root/code/ceir_r1_20261109/prepare_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/prepare_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..942f78b91bd122a0d90f5aeb6c0f7454d9915720 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/prepare_ceir.py @@ -0,0 +1,345 @@ +"""Resumable offline preparation for exactly the approved 2k continuation. + +All original candidate pools and all actual formula classes survive. The work +manifest scopes the new caches to this pilot, not a claim to process unused +future epochs or the full open-formula search space. +""" +import argparse +from collections import Counter,OrderedDict +from concurrent.futures import ProcessPoolExecutor +from dataclasses import replace +import hashlib +import json +import multiprocessing +from pathlib import Path +import sqlite3 +import time + +import numpy as np +from runtime_ceir import * +from evidence_ceir import annotate, encode, query_key, RULE +from data09 import Reader, loads + + +def workload(): + CACHE.mkdir(parents=True,exist_ok=True);path=CACHE/'workload.json' + plans,binding=pilot_plans() + if path.exists(): + if json.loads(path.read_text())['binding']!=binding:raise RuntimeError('Pilot workload changed') + return + ids={};pool_queries={};identity_graphs={};db=readonly(LEGACY.PREP/'train.sqlite') + for epoch,step,groups in plans: + for source,values in groups.items(): + for j,rid in enumerate(values): + explicit=source=='odata' and j<16 + ids[rid]=dict(source=source,explicit=ids.get(rid,{}).get('explicit',False) or explicit) + reader=Reader() + for number,(rid,flags) in enumerate(sorted(ids.items())): + row=loads(db.execute('SELECT body FROM samples WHERE record_id=?',(rid,)).fetchone()[0]) + if row['identity'] in reader.forbidden:raise RuntimeError('Heldout training label') + identity_graphs.setdefault(row['identity'],set()).add(row['graph_hash']) + if row['source']=='MSG_Train': + for kind in ('mass','formula'): + key='msg_'+kind+':'+row['target'] + pool_queries.setdefault(key,dict(kind=kind,target=row['target'],record_ids=[]))['record_ids'].append(rid) + elif flags['explicit'] and row['view']['pool_infonce_eligible']: + key='odata:'+row['view']['pool_path'] + pool_queries.setdefault(key,dict(kind='odata',path=row['view']['pool_path'],sha256=row['view']['pool_sha256'],record_ids=[]))['record_ids'].append(rid) + if (number+1)%5000==0:save(CACHE/'workload_status.json',dict(phase='binding_pilot_records',records=number+1,total=len(ids))) + fingerprint_valid={} + for identity,graphs in identity_graphs.items(): + fingerprints={hashlib.sha256(reader.molecule(g).whole.astype(np.uint8).tobytes()).hexdigest() for g in graphs} + fingerprint_valid[identity]=len(fingerprints)==1 and bool(reader.molecule(next(iter(graphs))).whole.sum()) + save(CACHE/'fingerprint_targets.json',dict(valid=fingerprint_valid,scope='all referenced training identities in the approved pilot', + identities=len(fingerprint_valid),conflicting_or_empty=sum(not x for x in fingerprint_valid.values()))) + counts=Counter(x['source'] for x in ids.values()) + save(path,dict(binding=binding,plans=plans,records=ids,pools=pool_queries,record_counts=dict(counts), + scope='all actual rows/pools in parent data cursor 2000 to 4000', + parent_sha256=PLAN['parent']['sha256'],raw_pools_changed=False, + formula_training_scope='inherited_external_label_conditioned_competition_not_blind_predictions', + annotations_or_negatives_from_Test_CASMI=False)) + db.close() + + +def one_annotation(arg): + query,formulas=arg;key=query_key(query) + return [(key,f,encode(annotate(query,f))) for f in formulas] + + +def evidence_tasks(split): + manifest=json.loads((CACHE/'workload.json').read_text()) + if split=='train': + reader=Reader();db=reader.db + for rid in manifest['records']: + row=loads(db.execute('SELECT body FROM samples WHERE record_id=?',(rid,)).fetchone()[0]) + fs=tuple(reader.official(row['target'],'mass')['formula_classes']) if row['source']=='MSG_Train' else tuple(row['view']['formulas']) + # Pool formula view may contain classes absent from this specific Mass pool. + if row['source']=='MSG_Train':fs=tuple(sorted(set(fs)|set(reader.official(row['target'],'formula')['formula_classes']))) + yield row['query'],fs + else: + # Evaluation cache reads only official Validation, never enters mining. + db=readonly(LEGACY.PREP/'validation.sqlite');fs_by_target={} + for identifier,target,blob in db.execute('SELECT identifier,target,body FROM spectra ORDER BY identifier'): + if target not in fs_by_target: + smiles=set() + for view in ('mass','formula'):smiles.update(json.loads(db.execute('SELECT body FROM pools WHERE target=? AND view=?',(target,view)).fetchone()[0])) + fs=set() + from specpartition_ms.chemistry import canonical_formula,formula_vector + for s in smiles: + f=db.execute('SELECT formula FROM aliases WHERE smiles=?',(s,)).fetchone()[0] + if f: + try:formula_vector(f);fs.add(canonical_formula(f)) + except ValueError:pass + fs_by_target[target]=tuple(sorted(fs)) + yield loads(blob)['query'],fs_by_target[target] + + +def prepare_evidence(): + import zlib + for split in ('train','validation'): + marker=CACHE/(split+'_composition_ready.json') + if marker.exists(): + if json.loads(marker.read_text())['rule']!=RULE:raise RuntimeError('Annotation rule changed') + continue + dest=CACHE/(split+'_composition.sqlite');db=sqlite3.connect(dest);db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS evidence(query_key TEXT,formula TEXT,body BLOB,PRIMARY KEY(query_key,formula))') + initial_count=db.execute('SELECT COUNT(*) FROM evidence').fetchone()[0];initial_changes=db.total_changes + started=time.monotonic();n=0;stats=Counter() + # Small chunks preserve memory and keep at most a few outstanding CPU jobs. + ctx=multiprocessing.get_context('spawn') + with ProcessPoolExecutor(max_workers=2,mp_context=ctx) as workers: + tasks=iter(evidence_tasks(split)) + exhausted=False + while not exhausted: + chunk=[] + for _ in range(128): + try:q,fs=next(tasks) + except StopIteration:exhausted=True;break + key=query_key(q) + missing=[f for f in fs if not db.execute('SELECT 1 FROM evidence WHERE query_key=? AND formula=?',(key,f)).fetchone()] + if missing:chunk.append((q,missing)) + n+=1 + for result in workers.map(one_annotation,chunk,chunksize=4): + for key,f,blob in result: + db.execute('INSERT OR IGNORE INTO evidence VALUES (?,?,?)',(key,f,blob)) + meta=json.loads(zlib.decompress(blob));stats[meta['reason']]+=1 + stats['matched_peaks']+=meta['matched'];stats['annotated_peaks']+=meta['total'] + db.commit() + status=dict(phase='offline_composition',split=split,queries_scanned=n,rows=initial_count+db.total_changes-initial_changes,stats=dict(stats),seconds=time.monotonic()-started,rule=RULE) + save(CACHE/'evidence_status.json',status);print(json.dumps(status),flush=True);check_disk() + count=db.execute('SELECT COUNT(*) FROM evidence').fetchone()[0] + db.execute('PRAGMA wal_checkpoint(TRUNCATE)');db.close() + save(marker,dict(complete=True,rule=RULE,queries_scanned=n,rows=count,stats=dict(stats), + stats_scope='this_run_generated_annotations_including_duplicate_requests_not_unique_cache_rows', + workload_binding=json.loads((CACHE/'workload.json').read_text())['binding'])) + + +def get_pool(reader, group, row=None): + if group['kind']!='odata': + pool=reader.official(group['target'],group['kind']) + entries=pool['entries'];indices=[i for i,e in enumerate(entries) if e['eligible_for_training']] + return pool,entries,indices + pool=reader.pool(group['path'],group['sha256']);entries=pool['records'] + indices=pool['safe_mass_order'] + return pool,entries,indices + + +def entry_identity(entry):return entry.get('identity',entry.get('connectivity')) +def entry_formula(entry):return entry['formula'] +def entry_molecule(reader,entry): + # External PubChem records preserve both raw and canonical SMILES; the + # accepted R08 feature store is keyed by canonical_smiles, exactly as data09. + return reader.molecule(entry['graph_hash']) if entry.get('graph_hash') else reader.by_smiles(entry.get('canonical_smiles') or entry.get('smiles')) + + +def load_teacher(checkpoint_path=None): + import torch + from coarse_losses import ProjectionBank + from kernels import install_graph_kernel + if checkpoint_path is not None: + from model_ceir import CEIRRanker + state=torch.load(checkpoint_path,map_location='cpu',weights_only=False) + if state.get('architecture')!='CEIR_R1' or state['binding']['parent_sha256']!=PLAN['parent']['sha256']: + raise RuntimeError('Refresh checkpoint lineage mismatch') + model=CEIRRanker(LEGACY.C,'main');model.load_state_dict(state['model'],strict=True) + model.install_evidence(False);model.to(LEGACY.C['device']);model.eval();model.graph_chunk=128 + return model + state=source_state();model=LEGACY.make_model();model.hierarchy=ProjectionBank() + model.load_state_dict(state['model'],strict=True);install_graph_kernel(model) + model.graph_chunk=128;model.local_chunk=128 + model.to(LEGACY.C['device']);model.eval();del state + return model + + +def teacher_local_batch(model,tokens,atoms): + """Bounded frozen-teacher QxMxPxA tile; not full student BxB alignment.""" + import torch + from torch.nn import functional as F + from torch.nn.utils.rnn import pad_sequence + qp=pad_sequence([F.normalize(model.local_q(t.float()).float(),dim=-1) for t in tokens],batch_first=True) + lengths=torch.tensor([len(t) for t in tokens],device=model.device) + aa=pad_sequence([a.float() for a in atoms],batch_first=True);za=F.normalize(model.local_a(aa).float(),dim=-1) + valid=torch.arange(aa.shape[1],device=model.device)[None,:]self.maximum: + _,pair=self.values.popitem(last=False);self.bytes-=sum(t.numel()*t.element_size() for t in pair) + return list(all_atoms.split(sizes)),zm + + +def shortlist_update(current,scores,indices,identities,limit=64): + # Sampling identities, not deleting original candidate assets. + best={key:(float(score),int(index)) for key,score,index in current} + for score,index,identity in zip(scores,indices,identities): + value=(float(score),int(index)) + if identity not in best or value[0]>best[identity][0] or (value[0]==best[identity][0] and value[1]=32 and len(tokens)>=2: + error=(local_values[0]-model.local_scores(tokens[0].float(),[a.float() for a in atoms])).abs().max().item() + if error>1e-5:raise RuntimeError('Batched FP32 teacher local-score parity failed: '+str(error)) + save(CACHE/'teacher_kernel_parity.json',dict(max_abs_error=error,tolerance=1e-5,queries=len(tokens),candidates=len(atoms),precision='FP32_local_BF16_GNN',complete=True)) + local_checked=True + all_scores=[] + for qi,q in enumerate(queries): + if checkpoint_path is None: + _,joint,_=model.conditioned(qs[qi],q,forms,zm,formula_scores[qi]) + all_scores.append((joint+model.local_weight*local_values[qi]).float()) + else: + score,_,_=model.score_encoded(qs[qi],tokens[qi],q,mols,atoms,zm,formula_scores[qi],contexts[qi]) + all_scores.append(score.float()) + values=torch.stack(all_scores).cpu().numpy() + for qi,(r,target) in enumerate(zip(rr,ref)): + valid=[j for j,index in enumerate(inds) if index in allowed[qi] and ids[j]!=r['identity']] + if not valid:continue + jj=[inds[j] for j in valid];kk=[ids[j] for j in valid];ss=values[qi,valid] + tops[qi]['global_scores']=shortlist_update(tops[qi]['global_scores'],ss,jj,kk) + same=[j for j in valid if forms[j]==r['formula']] + tops[qi]['same_scores']=shortlist_update(tops[qi]['same_scores'],values[qi,same],[inds[j] for j in same],[ids[j] for j in same]) + chem_indices=same if same_available[qi] else valid + inter=whole[chem_indices]@target.whole;union=whole[chem_indices].sum(1)+target.whole.sum()-inter + sim=inter/np.maximum(union,1e-8) + tops[qi]['chemical']=shortlist_update(tops[qi]['chemical'],sim,[inds[j] for j in chem_indices],[ids[j] for j in chem_indices]) + del mols,atoms,zm + for qi,(rid,r,top) in enumerate(zip(rids,rr,tops)): + has_positive=any(entry_identity(entries[j])==r['identity'] for j in allowed[qi]) + has_negative=any(entry_identity(entries[j])!=r['identity'] for j in allowed[qi]) + pool_eligible=has_positive and has_negative + if pool_eligible and not top['global_scores']:raise RuntimeError('Missing teacher negatives despite a valid original competition pool') + value=dict(parent_sha256=PLAN['parent']['sha256'],source_update=source_update,pool_key=poolkey, + teacher_checkpoint_sha256=checkpoint_sha, + precision='FP32_local_BF16_GNN' if checkpoint_path is None else 'CEIR_R1_mixed_precision',kernel_version=2, + pool_eligible=pool_eligible,masked_reason=None if pool_eligible else 'original_pool_missing_positive_or_distinct_negative', + pool_sha256=pool_sha,pool_count=len(entries),eligible_count=len(eligible),query_key=query_key(r['query']), + candidates_scored_without_cap=len(eligible),top=top,truth_never_injected=True) + out.execute('INSERT OR REPLACE INTO hard_fp32 VALUES (?,?,?)',(rid,kind,json.dumps(value,separators=(',',':')))) + out.commit();completed+=len(rr) + status=dict(phase='Train_only_full_pool_teacher_mining',groups=gi+1,total_groups=len(groups),queries=completed, + seconds=time.monotonic()-started,parent_sha256=PLAN['parent']['sha256'], + frozen_teacher_graphs_encoded=graph_cache.encoded,graph_cache_hits=graph_cache.hits, + graph_cache_cpu_mib=graph_cache.bytes/2**20,student_embeddings_cached=False) + save(CACHE/('mining_status.json' if checkpoint_path is None else 'refresh_status.json'),status);print(json.dumps(status),flush=True);check_disk() + count=out.execute('SELECT COUNT(*) FROM hard_fp32').fetchone()[0] + expected=sum(len(g['record_ids']) for g in manifest['pools'].values()) + if count!=expected:raise RuntimeError('Incomplete teacher index') + eligible_queries=sum(json.loads(r[0]).get('pool_eligible',True) for r in out.execute('SELECT body FROM hard_fp32')) + out.execute('PRAGMA wal_checkpoint(TRUNCATE)');out.close() + save(ready_path,dict(complete=True,queries=count,expected=expected,parent_sha256=PLAN['parent']['sha256'], + teacher_checkpoint_sha256=checkpoint_sha,source_update=source_update, + eligible_teacher_queries=eligible_queries,masked_noncompetitive_queries=expected-eligible_queries, + workload_binding=manifest['binding'],full_original_eligible_pools_scored=True,Test_or_CASMI_read=False, + mining_source='actual_fixed_parent_final_score_not_global_embedding_surrogate')) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('phase',choices=['workload','evidence','mining']);p.add_argument('--teacher-checkpoint');a=p.parse_args() + OUT.mkdir(parents=True,exist_ok=True);CACHE.mkdir(parents=True,exist_ok=True) + if a.phase=='workload':workload() + elif a.phase=='evidence':prepare_evidence() + else:prepare_mining(a.teacher_checkpoint) diff --git a/code/snapshot/root/code/ceir_r1_20261109/reference/diagnosis.json b/code/snapshot/root/code/ceir_r1_20261109/reference/diagnosis.json new file mode 100644 index 0000000000000000000000000000000000000000..98fb9cc7c5edae5ebfd531754d5f3bb28f1ffc26 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/reference/diagnosis.json @@ -0,0 +1,9274 @@ +{ + "baseline": "C03 step_002000.pt", + "checkpoint_sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "scope": "diagnostic_only_no_Test_or_CASMI_negative_mining_or_tuning", + "views": { + "MSG Test/mass": { + "metrics": { + "n": 17556, + "targets": 3170, + "key14": 2997, + "hits": { + "1": 5140, + "3": 8563, + "5": 10431, + "10": 12657, + "20": 14328, + "50": 16306, + "100": 17025, + "200": 17544 + }, + "recall": { + "1": 0.2927773980405559, + "3": 0.4877534745955799, + "5": 0.5941558441558441, + "10": 0.7209501025290499, + "20": 0.8161312371838687, + "50": 0.9287992709045341, + "100": 0.969753930280246, + "200": 0.9993164730006835 + }, + "formula_hits": { + "1": 13997, + "2": 15563, + "3": 16125, + "4": 16392, + "5": 16585, + "6": 16724, + "7": 16826, + "8": 16898, + "9": 16960, + "10": 17018 + }, + "truth_in_pool": 17553, + "truth_scoreable": 17552, + "error_buckets": { + "covered_same_formula_wrong": 9452, + "correct": 5140, + "covered_wrong_formula": 2960, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 17556, + "min": 0.0, + "median": 15.0, + "mean": 12.770534290271133, + "p95": 34.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 17556, + "min": 28, + "median": 256.0, + "mean": 253.87662337662337, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 12416, + "min": 0.0, + "median": 0.16666666666666666, + "mean": 0.26113054647954065, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 953, + "acyclic_reference_in_errors": 80, + "wrong_with_whole_similarity_ge_08": 396, + "reference_identity_conflicts": 5 + }, + "strata": { + "adduct": { + "[M+H]+": { + "n": 14066, + "targets": 3044, + "key14": 2898, + "hits": { + "1": 4392, + "3": 7264, + "5": 8800, + "10": 10582, + "20": 11852, + "50": 13307, + "100": 13771, + "200": 14055 + }, + "recall": { + "1": 0.3122422863642827, + "3": 0.5164225792691597, + "5": 0.6256220673965591, + "10": 0.7523105360443623, + "20": 0.8425991753163657, + "50": 0.9460400966870468, + "100": 0.9790274420588654, + "200": 0.9992179724157543 + }, + "formula_hits": { + "1": 11615, + "2": 12789, + "3": 13195, + "4": 13383, + "5": 13502, + "6": 13591, + "7": 13649, + "8": 13696, + "9": 13739, + "10": 13775 + }, + "truth_in_pool": 14063, + "truth_scoreable": 14062, + "error_buckets": { + "covered_same_formula_wrong": 7689, + "correct": 4392, + "covered_wrong_formula": 1981, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 14066, + "min": 0.0, + "median": 15.0, + "mean": 11.962747049623205, + "p95": 33.0, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 14066, + "min": 28, + "median": 256.0, + "mean": 253.80534622493957, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 9674, + "min": 0.0, + "median": 0.16604010025062654, + "mean": 0.2577011733856173, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 759, + "acyclic_reference_in_errors": 71, + "wrong_with_whole_similarity_ge_08": 264, + "reference_identity_conflicts": 5 + }, + "[M+Na]+": { + "n": 3490, + "targets": 523, + "key14": 489, + "hits": { + "1": 748, + "3": 1299, + "5": 1631, + "10": 2075, + "20": 2476, + "50": 2999, + "100": 3254, + "200": 3489 + }, + "recall": { + "1": 0.21432664756446992, + "3": 0.37220630372492836, + "5": 0.4673352435530086, + "10": 0.5945558739255015, + "20": 0.7094555873925501, + "50": 0.8593123209169055, + "100": 0.932378223495702, + "200": 0.9997134670487106 + }, + "formula_hits": { + "1": 2382, + "2": 2774, + "3": 2930, + "4": 3009, + "5": 3083, + "6": 3133, + "7": 3177, + "8": 3202, + "9": 3221, + "10": 3243 + }, + "truth_in_pool": 3490, + "truth_scoreable": 3490, + "error_buckets": { + "correct": 748, + "covered_wrong_formula": 979, + "covered_same_formula_wrong": 1763 + }, + "mces": { + "n": 3490, + "min": 0.0, + "median": 15.0, + "mean": 16.02621776504298, + "p95": 43.5, + "max": 77.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3490, + "min": 53, + "median": 256.0, + "mean": 254.16389684813754, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2742, + "min": 0.027777777777777776, + "median": 0.17677696078431374, + "mean": 0.27322965490791934, + "p95": 0.7916666666666666, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 194, + "acyclic_reference_in_errors": 9, + "wrong_with_whole_similarity_ge_08": 132, + "reference_identity_conflicts": 0 + } + }, + "polarity": { + "positive": { + "n": 17556, + "targets": 3170, + "key14": 2997, + "hits": { + "1": 5140, + "3": 8563, + "5": 10431, + "10": 12657, + "20": 14328, + "50": 16306, + "100": 17025, + "200": 17544 + }, + "recall": { + "1": 0.2927773980405559, + "3": 0.4877534745955799, + "5": 0.5941558441558441, + "10": 0.7209501025290499, + "20": 0.8161312371838687, + "50": 0.9287992709045341, + "100": 0.969753930280246, + "200": 0.9993164730006835 + }, + "formula_hits": { + "1": 13997, + "2": 15563, + "3": 16125, + "4": 16392, + "5": 16585, + "6": 16724, + "7": 16826, + "8": 16898, + "9": 16960, + "10": 17018 + }, + "truth_in_pool": 17553, + "truth_scoreable": 17552, + "error_buckets": { + "covered_same_formula_wrong": 9452, + "correct": 5140, + "covered_wrong_formula": 2960, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 17556, + "min": 0.0, + "median": 15.0, + "mean": 12.770534290271133, + "p95": 34.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 17556, + "min": 28, + "median": 256.0, + "mean": 253.87662337662337, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 12416, + "min": 0.0, + "median": 0.16666666666666666, + "mean": 0.26113054647954065, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 953, + "acyclic_reference_in_errors": 80, + "wrong_with_whole_similarity_ge_08": 396, + "reference_identity_conflicts": 5 + } + }, + "reference_has_halogen": { + "True": { + "n": 3805, + "targets": 962, + "key14": 938, + "hits": { + "1": 1485, + "3": 2468, + "5": 2956, + "10": 3368, + "20": 3612, + "50": 3736, + "100": 3795, + "200": 3804 + }, + "recall": { + "1": 0.3902759526938239, + "3": 0.6486202365308804, + "5": 0.7768725361366623, + "10": 0.8851511169513797, + "20": 0.9492772667542707, + "50": 0.9818659658344284, + "100": 0.9973718791064389, + "200": 0.9997371879106439 + }, + "formula_hits": { + "1": 3068, + "2": 3415, + "3": 3511, + "4": 3568, + "5": 3597, + "6": 3616, + "7": 3633, + "8": 3648, + "9": 3662, + "10": 3673 + }, + "truth_in_pool": 3805, + "truth_scoreable": 3805, + "error_buckets": { + "covered_same_formula_wrong": 1582, + "correct": 1485, + "covered_wrong_formula": 738 + }, + "mces": { + "n": 3805, + "min": 0.0, + "median": 14.0, + "mean": 11.290144546649145, + "p95": 34.899999999999864, + "max": 73.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3805, + "min": 28, + "median": 256.0, + "mean": 254.54349540078843, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2320, + "min": 0.021739130434782608, + "median": 0.16508292245629763, + "mean": 0.2247816271685186, + "p95": 0.7580645161290323, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 166, + "acyclic_reference_in_errors": 15, + "wrong_with_whole_similarity_ge_08": 70, + "reference_identity_conflicts": 0 + }, + "False": { + "n": 13751, + "targets": 2208, + "key14": 2059, + "hits": { + "1": 3655, + "3": 6095, + "5": 7475, + "10": 9289, + "20": 10716, + "50": 12570, + "100": 13230, + "200": 13740 + }, + "recall": { + "1": 0.2657988509926551, + "3": 0.44324049160061085, + "5": 0.5435968293215039, + "10": 0.6755145080357792, + "20": 0.7792887789978911, + "50": 0.9141153370663951, + "100": 0.9621118464111701, + "200": 0.9992000581775871 + }, + "formula_hits": { + "1": 10929, + "2": 12148, + "3": 12614, + "4": 12824, + "5": 12988, + "6": 13108, + "7": 13193, + "8": 13250, + "9": 13298, + "10": 13345 + }, + "truth_in_pool": 13748, + "truth_scoreable": 13747, + "error_buckets": { + "covered_same_formula_wrong": 7870, + "correct": 3655, + "covered_wrong_formula": 2222, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 13751, + "min": 0.0, + "median": 15.0, + "mean": 13.180168715002544, + "p95": 34.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 13751, + "min": 53, + "median": 256.0, + "mean": 253.69209512035488, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 10096, + "min": 0.0, + "median": 0.16666666666666666, + "mean": 0.269483309237224, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 787, + "acyclic_reference_in_errors": 65, + "wrong_with_whole_similarity_ge_08": 326, + "reference_identity_conflicts": 5 + } + }, + "reference_rings": { + "3": { + "n": 3604, + "targets": 756, + "key14": 723, + "hits": { + "1": 925, + "3": 1625, + "5": 2003, + "10": 2488, + "20": 2874, + "50": 3335, + "100": 3486, + "200": 3597 + }, + "recall": { + "1": 0.25665926748057716, + "3": 0.4508879023307436, + "5": 0.5557713651498335, + "10": 0.6903440621531631, + "20": 0.7974472807991121, + "50": 0.9253607103218646, + "100": 0.967258601553829, + "200": 0.9980577136514983 + }, + "formula_hits": { + "1": 3178, + "2": 3365, + "3": 3424, + "4": 3461, + "5": 3488, + "6": 3501, + "7": 3513, + "8": 3523, + "9": 3528, + "10": 3536 + }, + "truth_in_pool": 3604, + "truth_scoreable": 3604, + "error_buckets": { + "covered_same_formula_wrong": 2190, + "correct": 925, + "covered_wrong_formula": 489 + }, + "mces": { + "n": 3604, + "min": 0.0, + "median": 15.0, + "mean": 12.582130965593784, + "p95": 30.5, + "max": 91.5 + }, + "mces_missing": 0, + "candidates": { + "n": 3604, + "min": 28, + "median": 256.0, + "mean": 255.02358490566039, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2679, + "min": 0.038461538461538464, + "median": 0.16091954022988506, + "mean": 0.2203530702029346, + "p95": 0.7275184275184273, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 131, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 59, + "reference_identity_conflicts": 0 + }, + "4": { + "n": 4963, + "targets": 1032, + "key14": 980, + "hits": { + "1": 1487, + "3": 2564, + "5": 3160, + "10": 3893, + "20": 4368, + "50": 4642, + "100": 4850, + "200": 4960 + }, + "recall": { + "1": 0.2996171670360669, + "3": 0.5166230102760427, + "5": 0.6367116663308483, + "10": 0.7844045939955672, + "20": 0.8801128349788434, + "50": 0.9353213781986701, + "100": 0.9772315131976627, + "200": 0.999395526899053 + }, + "formula_hits": { + "1": 3943, + "2": 4367, + "3": 4576, + "4": 4668, + "5": 4735, + "6": 4799, + "7": 4831, + "8": 4846, + "9": 4860, + "10": 4867 + }, + "truth_in_pool": 4961, + "truth_scoreable": 4960, + "error_buckets": { + "covered_same_formula_wrong": 2618, + "correct": 1487, + "covered_wrong_formula": 855, + "truth_unscoreable": 1, + "truth_absent": 2 + }, + "mces": { + "n": 4963, + "min": 0.0, + "median": 15.0, + "mean": 12.47068305460407, + "p95": 36.0, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 4963, + "min": 116, + "median": 256.0, + "mean": 254.64658472697965, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3476, + "min": 0.043478260869565216, + "median": 0.15789473684210525, + "mean": 0.22666571421647447, + "p95": 0.6760275900900901, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 250, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 41, + "reference_identity_conflicts": 2 + }, + "1": { + "n": 395, + "targets": 75, + "key14": 70, + "hits": { + "1": 110, + "3": 249, + "5": 270, + "10": 288, + "20": 311, + "50": 339, + "100": 372, + "200": 395 + }, + "recall": { + "1": 0.27848101265822783, + "3": 0.6303797468354431, + "5": 0.6835443037974683, + "10": 0.7291139240506329, + "20": 0.7873417721518987, + "50": 0.8582278481012658, + "100": 0.9417721518987342, + "200": 1.0 + }, + "formula_hits": { + "1": 228, + "2": 290, + "3": 327, + "4": 330, + "5": 334, + "6": 339, + "7": 340, + "8": 344, + "9": 346, + "10": 352 + }, + "truth_in_pool": 395, + "truth_scoreable": 395, + "error_buckets": { + "covered_wrong_formula": 92, + "covered_same_formula_wrong": 193, + "correct": 110 + }, + "mces": { + "n": 395, + "min": 0.0, + "median": 15.0, + "mean": 14.924050632911392, + "p95": 36.14999999999998, + "max": 77.0 + }, + "mces_missing": 0, + "candidates": { + "n": 395, + "min": 108, + "median": 256.0, + "mean": 224.9367088607595, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 285, + "min": 0.027777777777777776, + "median": 0.136986301369863, + "mean": 0.2895684756762118, + "p95": 0.6444444444444445, + "max": 0.8833333333333333 + }, + "same_exact_nonempty_scaffold_in_errors": 90, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "2": { + "n": 1361, + "targets": 278, + "key14": 266, + "hits": { + "1": 554, + "3": 772, + "5": 902, + "10": 1050, + "20": 1162, + "50": 1278, + "100": 1347, + "200": 1361 + }, + "recall": { + "1": 0.4070536370315944, + "3": 0.5672299779573843, + "5": 0.662747979426892, + "10": 0.7714915503306392, + "20": 0.8537839823659075, + "50": 0.9390154298310066, + "100": 0.9897134459955915, + "200": 1.0 + }, + "formula_hits": { + "1": 1227, + "2": 1300, + "3": 1325, + "4": 1337, + "5": 1344, + "6": 1345, + "7": 1346, + "8": 1346, + "9": 1348, + "10": 1349 + }, + "truth_in_pool": 1361, + "truth_scoreable": 1361, + "error_buckets": { + "covered_same_formula_wrong": 619, + "correct": 554, + "covered_wrong_formula": 188 + }, + "mces": { + "n": 1361, + "min": 0.0, + "median": 15.0, + "mean": 10.788390889052167, + "p95": 28.5, + "max": 51.5 + }, + "mces_missing": 0, + "candidates": { + "n": 1361, + "min": 112, + "median": 256.0, + "mean": 254.57972079353416, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 807, + "min": 0.025974025974025976, + "median": 0.14563106796116504, + "mean": 0.17246072511200897, + "p95": 0.33783783783783783, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 25, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 18, + "reference_identity_conflicts": 0 + }, + "5": { + "n": 2937, + "targets": 582, + "key14": 555, + "hits": { + "1": 1151, + "3": 1851, + "5": 2116, + "10": 2418, + "20": 2658, + "50": 2838, + "100": 2915, + "200": 2937 + }, + "recall": { + "1": 0.3918964930200885, + "3": 0.6302349336057201, + "5": 0.7204630575417093, + "10": 0.8232890704800817, + "20": 0.9050051072522982, + "50": 0.9662921348314607, + "100": 0.9925093632958801, + "200": 1.0 + }, + "formula_hits": { + "1": 2094, + "2": 2506, + "3": 2657, + "4": 2738, + "5": 2799, + "6": 2828, + "7": 2851, + "8": 2870, + "9": 2883, + "10": 2897 + }, + "truth_in_pool": 2937, + "truth_scoreable": 2937, + "error_buckets": { + "covered_same_formula_wrong": 1271, + "correct": 1151, + "covered_wrong_formula": 515 + }, + "mces": { + "n": 2937, + "min": 0.0, + "median": 15.0, + "mean": 11.431052093973442, + "p95": 32.59999999999991, + "max": 72.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2937, + "min": 112, + "median": 256.0, + "mean": 255.36976506639428, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1786, + "min": 0.036036036036036036, + "median": 0.15454545454545454, + "mean": 0.24694240891539054, + "p95": 0.7731958762886598, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 72, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 76, + "reference_identity_conflicts": 0 + }, + "8": { + "n": 273, + "targets": 36, + "key14": 32, + "hits": { + "1": 82, + "3": 130, + "5": 156, + "10": 226, + "20": 270, + "50": 273, + "100": 273, + "200": 273 + }, + "recall": { + "1": 0.30036630036630035, + "3": 0.47619047619047616, + "5": 0.5714285714285714, + "10": 0.8278388278388278, + "20": 0.989010989010989, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 196, + "2": 233, + "3": 240, + "4": 240, + "5": 241, + "6": 241, + "7": 241, + "8": 242, + "9": 242, + "10": 243 + }, + "truth_in_pool": 273, + "truth_scoreable": 273, + "error_buckets": { + "covered_same_formula_wrong": 118, + "correct": 82, + "covered_wrong_formula": 73 + }, + "mces": { + "n": 273, + "min": 0.0, + "median": 15.0, + "mean": 15.45970695970696, + "p95": 48.5, + "max": 66.0 + }, + "mces_missing": 0, + "candidates": { + "n": 273, + "min": 118, + "median": 256.0, + "mean": 251.44322344322345, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 191, + "min": 0.06315789473684211, + "median": 0.19424460431654678, + "mean": 0.27091183305827543, + "p95": 0.8, + "max": 0.8 + }, + "same_exact_nonempty_scaffold_in_errors": 3, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 19, + "reference_identity_conflicts": 0 + }, + "7": { + "n": 1506, + "targets": 126, + "key14": 107, + "hits": { + "1": 203, + "3": 440, + "5": 738, + "10": 1017, + "20": 1206, + "50": 1416, + "100": 1465, + "200": 1505 + }, + "recall": { + "1": 0.1347941567065073, + "3": 0.2921646746347942, + "5": 0.4900398406374502, + "10": 0.6752988047808764, + "20": 0.8007968127490039, + "50": 0.9402390438247012, + "100": 0.9727755644090306, + "200": 0.99933598937583 + }, + "formula_hits": { + "1": 1116, + "2": 1329, + "3": 1352, + "4": 1361, + "5": 1371, + "6": 1384, + "7": 1394, + "8": 1402, + "9": 1413, + "10": 1424 + }, + "truth_in_pool": 1506, + "truth_scoreable": 1506, + "error_buckets": { + "covered_wrong_formula": 474, + "covered_same_formula_wrong": 829, + "correct": 203 + }, + "mces": { + "n": 1506, + "min": 0.0, + "median": 15.0, + "mean": 16.997011952191237, + "p95": 48.0, + "max": 73.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1506, + "min": 143, + "median": 256.0, + "mean": 254.70451527224435, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1303, + "min": 0.03296703296703297, + "median": 0.16260162601626016, + "mean": 0.2803651096616144, + "p95": 0.7857142857142857, + "max": 0.9393939393939394 + }, + "same_exact_nonempty_scaffold_in_errors": 189, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 55, + "reference_identity_conflicts": 0 + }, + "0": { + "n": 185, + "targets": 34, + "key14": 31, + "hits": { + "1": 105, + "3": 136, + "5": 144, + "10": 152, + "20": 172, + "50": 181, + "100": 185, + "200": 185 + }, + "recall": { + "1": 0.5675675675675675, + "3": 0.7351351351351352, + "5": 0.7783783783783784, + "10": 0.8216216216216217, + "20": 0.9297297297297298, + "50": 0.9783783783783784, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 150, + "2": 168, + "3": 172, + "4": 173, + "5": 174, + "6": 175, + "7": 175, + "8": 175, + "9": 176, + "10": 176 + }, + "truth_in_pool": 185, + "truth_scoreable": 185, + "error_buckets": { + "covered_same_formula_wrong": 48, + "correct": 105, + "covered_wrong_formula": 32 + }, + "mces": { + "n": 185, + "min": 0.0, + "median": 0.0, + "mean": 10.116216216216216, + "p95": 41.89999999999999, + "max": 54.0 + }, + "mces_missing": 0, + "candidates": { + "n": 185, + "min": 53, + "median": 256.0, + "mean": 219.12432432432433, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 80, + "min": 0.0, + "median": 0.08602150537634409, + "mean": 0.16133882460402763, + "p95": 0.536602393617021, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 80, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "6": { + "n": 2247, + "targets": 226, + "key14": 208, + "hits": { + "1": 502, + "3": 760, + "5": 898, + "10": 1073, + "20": 1252, + "50": 1937, + "100": 2053, + "200": 2246 + }, + "recall": { + "1": 0.22340898976412996, + "3": 0.33822874944370274, + "5": 0.39964396973742766, + "10": 0.4775255896751224, + "20": 0.5571873609256787, + "50": 0.8620382732532266, + "100": 0.9136626613262128, + "200": 0.9995549621717846 + }, + "formula_hits": { + "1": 1819, + "2": 1940, + "3": 1980, + "4": 2008, + "5": 2021, + "6": 2034, + "7": 2056, + "8": 2068, + "9": 2081, + "10": 2091 + }, + "truth_in_pool": 2246, + "truth_scoreable": 2246, + "error_buckets": { + "covered_same_formula_wrong": 1540, + "correct": 502, + "covered_wrong_formula": 204, + "truth_absent": 1 + }, + "mces": { + "n": 2247, + "min": 0.0, + "median": 15.0, + "mean": 13.123052959501557, + "p95": 36.5, + "max": 68.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2247, + "min": 145, + "median": 256.0, + "mean": 255.63506898086337, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1745, + "min": 0.021739130434782608, + "median": 0.46, + "mean": 0.4316836650270914, + "p95": 0.8117647058823529, + "max": 0.9036144578313253 + }, + "same_exact_nonempty_scaffold_in_errors": 189, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 120, + "reference_identity_conflicts": 3 + }, + "12": { + "n": 7, + "targets": 4, + "key14": 4, + "hits": { + "1": 4, + "3": 5, + "5": 5, + "10": 5, + "20": 5, + "50": 6, + "100": 7, + "200": 7 + }, + "recall": { + "1": 0.5714285714285714, + "3": 0.7142857142857143, + "5": 0.7142857142857143, + "10": 0.7142857142857143, + "20": 0.7142857142857143, + "50": 0.8571428571428571, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 5, + "2": 6, + "3": 6, + "4": 7, + "5": 7, + "6": 7, + "7": 7, + "8": 7, + "9": 7, + "10": 7 + }, + "truth_in_pool": 7, + "truth_scoreable": 7, + "error_buckets": { + "correct": 4, + "covered_same_formula_wrong": 3 + }, + "mces": { + "n": 7, + "min": 0.0, + "median": 0.0, + "mean": 4.571428571428571, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 7, + "min": 256, + "median": 256.0, + "mean": 256, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3, + "min": 0.22627737226277372, + "median": 0.22627737226277372, + "mean": 0.37780193611844487, + "p95": 0.6353936946730858, + "max": 0.6808510638297872 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "10": { + "n": 43, + "targets": 6, + "key14": 6, + "hits": { + "1": 9, + "3": 12, + "5": 15, + "10": 20, + "20": 20, + "50": 27, + "100": 37, + "200": 43 + }, + "recall": { + "1": 0.20930232558139536, + "3": 0.27906976744186046, + "5": 0.3488372093023256, + "10": 0.46511627906976744, + "20": 0.46511627906976744, + "50": 0.627906976744186, + "100": 0.8604651162790697, + "200": 1.0 + }, + "formula_hits": { + "1": 17, + "2": 32, + "3": 36, + "4": 38, + "5": 40, + "6": 40, + "7": 41, + "8": 42, + "9": 43, + "10": 43 + }, + "truth_in_pool": 43, + "truth_scoreable": 43, + "error_buckets": { + "covered_same_formula_wrong": 5, + "covered_wrong_formula": 29, + "correct": 9 + }, + "mces": { + "n": 43, + "min": 0.0, + "median": 33.0, + "mean": 25.872093023255815, + "p95": 46.5, + "max": 46.5 + }, + "mces_missing": 0, + "candidates": { + "n": 43, + "min": 227, + "median": 256.0, + "mean": 255.32558139534885, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 34, + "min": 0.07352941176470588, + "median": 0.2153846153846154, + "mean": 0.21039795065951913, + "p95": 0.6831683168316832, + "max": 0.7714285714285715 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "13": { + "n": 2, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 1, + "20": 2, + "50": 2, + "100": 2, + "200": 2 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 0.5, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 2, + "2": 2, + "3": 2, + "4": 2, + "5": 2, + "6": 2, + "7": 2, + "8": 2, + "9": 2, + "10": 2 + }, + "truth_in_pool": 2, + "truth_scoreable": 2, + "error_buckets": { + "covered_same_formula_wrong": 1, + "covered_wrong_formula": 1 + }, + "mces": { + "n": 2, + "min": 2.0, + "median": 13.5, + "mean": 13.5, + "p95": 23.849999999999998, + "max": 25.0 + }, + "mces_missing": 0, + "candidates": { + "n": 2, + "min": 256, + "median": 256.0, + "mean": 256, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2, + "min": 0.07086614173228346, + "median": 0.3354330708661417, + "mean": 0.3354330708661417, + "p95": 0.5735433070866142, + "max": 0.6 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "9": { + "n": 29, + "targets": 12, + "key14": 12, + "hits": { + "1": 4, + "3": 15, + "5": 20, + "10": 22, + "20": 24, + "50": 28, + "100": 29, + "200": 29 + }, + "recall": { + "1": 0.13793103448275862, + "3": 0.5172413793103449, + "5": 0.6896551724137931, + "10": 0.7586206896551724, + "20": 0.8275862068965517, + "50": 0.9655172413793104, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 21, + "2": 22, + "3": 25, + "4": 25, + "5": 25, + "6": 25, + "7": 25, + "8": 27, + "9": 27, + "10": 27 + }, + "truth_in_pool": 29, + "truth_scoreable": 29, + "error_buckets": { + "covered_same_formula_wrong": 17, + "covered_wrong_formula": 8, + "correct": 4 + }, + "mces": { + "n": 29, + "min": 0.0, + "median": 15.0, + "mean": 15.931034482758621, + "p95": 40.99999999999995, + "max": 50.0 + }, + "mces_missing": 0, + "candidates": { + "n": 29, + "min": 195, + "median": 256.0, + "mean": 251.79310344827587, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 25, + "min": 0.049586776859504134, + "median": 0.1953125, + "mean": 0.36104810510113416, + "p95": 0.9681415929203535, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 4, + "reference_identity_conflicts": 0 + }, + "11": { + "n": 4, + "targets": 2, + "key14": 2, + "hits": { + "1": 4, + "3": 4, + "5": 4, + "10": 4, + "20": 4, + "50": 4, + "100": 4, + "200": 4 + }, + "recall": { + "1": 1.0, + "3": 1.0, + "5": 1.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 1, + "2": 3, + "3": 3, + "4": 4, + "5": 4, + "6": 4, + "7": 4, + "8": 4, + "9": 4, + "10": 4 + }, + "truth_in_pool": 4, + "truth_scoreable": 4, + "error_buckets": { + "correct": 4 + }, + "mces": { + "n": 4, + "min": 0.0, + "median": 0.0, + "mean": 0.0, + "p95": 0.0, + "max": 0.0 + }, + "mces_missing": 0, + "candidates": { + "n": 4, + "min": 256, + "median": 256.0, + "mean": 256, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": null, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + } + }, + "candidate_size": { + "65-256": { + "n": 17550, + "targets": 3168, + "key14": 2995, + "hits": { + "1": 5136, + "3": 8557, + "5": 10425, + "10": 12651, + "20": 14322, + "50": 16300, + "100": 17019, + "200": 17538 + }, + "recall": { + "1": 0.29264957264957264, + "3": 0.48757834757834756, + "5": 0.594017094017094, + "10": 0.7208547008547008, + "20": 0.8160683760683761, + "50": 0.9287749287749287, + "100": 0.9697435897435898, + "200": 0.9993162393162394 + }, + "formula_hits": { + "1": 13991, + "2": 15557, + "3": 16119, + "4": 16386, + "5": 16579, + "6": 16718, + "7": 16820, + "8": 16892, + "9": 16954, + "10": 17012 + }, + "truth_in_pool": 17547, + "truth_scoreable": 17546, + "error_buckets": { + "covered_same_formula_wrong": 9450, + "correct": 5136, + "covered_wrong_formula": 2960, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 17550, + "min": 0.0, + "median": 15.0, + "mean": 12.773760683760683, + "p95": 34.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 17550, + "min": 74, + "median": 256.0, + "mean": 253.94672364672365, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 12414, + "min": 0.0, + "median": 0.16666666666666666, + "mean": 0.2611017798018854, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 952, + "acyclic_reference_in_errors": 79, + "wrong_with_whole_similarity_ge_08": 396, + "reference_identity_conflicts": 5 + }, + "<=64": { + "n": 6, + "targets": 2, + "key14": 2, + "hits": { + "1": 4, + "3": 6, + "5": 6, + "10": 6, + "20": 6, + "50": 6, + "100": 6, + "200": 6 + }, + "recall": { + "1": 0.6666666666666666, + "3": 1.0, + "5": 1.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 6, + "2": 6, + "3": 6, + "4": 6, + "5": 6, + "6": 6, + "7": 6, + "8": 6, + "9": 6, + "10": 6 + }, + "truth_in_pool": 6, + "truth_scoreable": 6, + "error_buckets": { + "correct": 4, + "covered_same_formula_wrong": 2 + }, + "mces": { + "n": 6, + "min": 0.0, + "median": 0.0, + "mean": 3.3333333333333335, + "p95": 14.0, + "max": 18.0 + }, + "mces_missing": 0, + "candidates": { + "n": 6, + "min": 28, + "median": 53.0, + "mean": 48.833333333333336, + "p95": 53.0, + "max": 53 + }, + "whole_similarity_in_errors": { + "n": 2, + "min": 0.09090909090909091, + "median": 0.4396853146853147, + "mean": 0.4396853146853147, + "p95": 0.7535839160839161, + "max": 0.7884615384615384 + }, + "same_exact_nonempty_scaffold_in_errors": 1, + "acyclic_reference_in_errors": 1, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + } + }, + "true_formula_size": { + "17-64": { + "n": 6038, + "targets": 1115, + "key14": 1048, + "hits": { + "1": 1546, + "3": 2729, + "5": 3373, + "10": 4398, + "20": 5130, + "50": 5813, + "100": 5948, + "200": 6028 + }, + "recall": { + "1": 0.25604504802914874, + "3": 0.4519708512752567, + "5": 0.5586286849950315, + "10": 0.7283868830738656, + "20": 0.8496190791652866, + "50": 0.9627360052997681, + "100": 0.9850944021199073, + "200": 0.9983438224577674 + }, + "formula_hits": { + "1": 5064, + "2": 5578, + "3": 5764, + "4": 5825, + "5": 5863, + "6": 5884, + "7": 5910, + "8": 5920, + "9": 5936, + "10": 5945 + }, + "truth_in_pool": 6035, + "truth_scoreable": 6035, + "error_buckets": { + "covered_same_formula_wrong": 3722, + "correct": 1546, + "covered_wrong_formula": 767, + "truth_absent": 3 + }, + "mces": { + "n": 6038, + "min": 0.0, + "median": 15.0, + "mean": 12.285607817157999, + "p95": 29.0, + "max": 91.5 + }, + "mces_missing": 0, + "candidates": { + "n": 6038, + "min": 53, + "median": 256.0, + "mean": 252.95462073534284, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4492, + "min": 0.0, + "median": 0.16842105263157894, + "mean": 0.26172132982059126, + "p95": 0.7746478873239436, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 397, + "acyclic_reference_in_errors": 17, + "wrong_with_whole_similarity_ge_08": 177, + "reference_identity_conflicts": 5 + }, + "<=16": { + "n": 7641, + "targets": 1316, + "key14": 1249, + "hits": { + "1": 2890, + "3": 4728, + "5": 5694, + "10": 6473, + "20": 6952, + "50": 7228, + "100": 7478, + "200": 7639 + }, + "recall": { + "1": 0.3782227457139118, + "3": 0.618767177071064, + "5": 0.7451904201020809, + "10": 0.847140426645727, + "20": 0.909828556471666, + "50": 0.9459494830519566, + "100": 0.9786677136500458, + "200": 0.9997382541552153 + }, + "formula_hits": { + "1": 5207, + "2": 6146, + "3": 6509, + "4": 6705, + "5": 6855, + "6": 6971, + "7": 7045, + "8": 7107, + "9": 7152, + "10": 7200 + }, + "truth_in_pool": 7641, + "truth_scoreable": 7640, + "error_buckets": { + "covered_wrong_formula": 2096, + "covered_same_formula_wrong": 2654, + "correct": 2890, + "truth_unscoreable": 1 + }, + "mces": { + "n": 7641, + "min": 0.0, + "median": 14.0, + "mean": 13.308402041617589, + "p95": 43.0, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 7641, + "min": 28, + "median": 256.0, + "mean": 253.62544169611309, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4751, + "min": 0.021739130434782608, + "median": 0.14736842105263157, + "mean": 0.24565596722072053, + "p95": 0.7530939648586708, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 397, + "acyclic_reference_in_errors": 43, + "wrong_with_whole_similarity_ge_08": 165, + "reference_identity_conflicts": 0 + }, + "65-256": { + "n": 3877, + "targets": 739, + "key14": 710, + "hits": { + "1": 704, + "3": 1106, + "5": 1364, + "10": 1786, + "20": 2246, + "50": 3265, + "100": 3599, + "200": 3877 + }, + "recall": { + "1": 0.1815836987361362, + "3": 0.28527211761671395, + "5": 0.35181841630126387, + "10": 0.4606654629868455, + "20": 0.5793139025019345, + "50": 0.8421459891668817, + "100": 0.9282950735104463, + "200": 1.0 + }, + "formula_hits": { + "1": 3726, + "2": 3839, + "3": 3852, + "4": 3862, + "5": 3867, + "6": 3869, + "7": 3871, + "8": 3871, + "9": 3872, + "10": 3873 + }, + "truth_in_pool": 3877, + "truth_scoreable": 3877, + "error_buckets": { + "covered_same_formula_wrong": 3076, + "correct": 704, + "covered_wrong_formula": 97 + }, + "mces": { + "n": 3877, + "min": 0.0, + "median": 15.0, + "mean": 12.465695125096724, + "p95": 18.5, + "max": 34.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3877, + "min": 122, + "median": 256.0, + "mean": 255.80758318287334, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3173, + "min": 0.025, + "median": 0.19101123595505617, + "mean": 0.2834645922692207, + "p95": 0.6966292134831461, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 159, + "acyclic_reference_in_errors": 20, + "wrong_with_whole_similarity_ge_08": 54, + "reference_identity_conflicts": 0 + } + }, + "peak_count": { + "51-100": { + "n": 1830, + "targets": 1078, + "key14": 1036, + "hits": { + "1": 638, + "3": 1044, + "5": 1228, + "10": 1476, + "20": 1626, + "50": 1759, + "100": 1812, + "200": 1828 + }, + "recall": { + "1": 0.34863387978142074, + "3": 0.5704918032786885, + "5": 0.6710382513661202, + "10": 0.8065573770491803, + "20": 0.8885245901639345, + "50": 0.9612021857923497, + "100": 0.9901639344262295, + "200": 0.9989071038251366 + }, + "formula_hits": { + "1": 1542, + "2": 1675, + "3": 1733, + "4": 1756, + "5": 1772, + "6": 1777, + "7": 1781, + "8": 1786, + "9": 1789, + "10": 1792 + }, + "truth_in_pool": 1829, + "truth_scoreable": 1828, + "error_buckets": { + "covered_same_formula_wrong": 980, + "covered_wrong_formula": 210, + "correct": 638, + "truth_absent": 1, + "truth_unscoreable": 1 + }, + "mces": { + "n": 1830, + "min": 0.0, + "median": 15.0, + "mean": 10.87704918032787, + "p95": 30.5, + "max": 60.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1830, + "min": 53, + "median": 256.0, + "mean": 251.9584699453552, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1192, + "min": 0.025, + "median": 0.15847621347500604, + "mean": 0.2472555537353751, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 95, + "acyclic_reference_in_errors": 11, + "wrong_with_whole_similarity_ge_08": 38, + "reference_identity_conflicts": 1 + }, + "26-50": { + "n": 3097, + "targets": 1563, + "key14": 1506, + "hits": { + "1": 1055, + "3": 1694, + "5": 2041, + "10": 2470, + "20": 2762, + "50": 2977, + "100": 3071, + "200": 3095 + }, + "recall": { + "1": 0.3406522441072005, + "3": 0.5469809493057798, + "5": 0.6590248627704229, + "10": 0.7975460122699386, + "20": 0.8918308040038747, + "50": 0.9612528253148208, + "100": 0.9916047788182112, + "200": 0.999354213755247 + }, + "formula_hits": { + "1": 2588, + "2": 2857, + "3": 2950, + "4": 2990, + "5": 3009, + "6": 3018, + "7": 3029, + "8": 3034, + "9": 3045, + "10": 3053 + }, + "truth_in_pool": 3095, + "truth_scoreable": 3095, + "error_buckets": { + "covered_same_formula_wrong": 1661, + "correct": 1055, + "covered_wrong_formula": 379, + "truth_absent": 2 + }, + "mces": { + "n": 3097, + "min": 0.0, + "median": 15.0, + "mean": 11.013561511139812, + "p95": 30.5, + "max": 72.5 + }, + "mces_missing": 0, + "candidates": { + "n": 3097, + "min": 81, + "median": 256.0, + "mean": 254.96222150468196, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2042, + "min": 0.025974025974025976, + "median": 0.1590909090909091, + "mean": 0.23371553654563842, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 120, + "acyclic_reference_in_errors": 9, + "wrong_with_whole_similarity_ge_08": 71, + "reference_identity_conflicts": 4 + }, + "11-25": { + "n": 4851, + "targets": 1884, + "key14": 1812, + "hits": { + "1": 1468, + "3": 2455, + "5": 2966, + "10": 3578, + "20": 4025, + "50": 4549, + "100": 4721, + "200": 4849 + }, + "recall": { + "1": 0.3026180169037312, + "3": 0.5060812203669347, + "5": 0.61142032570604, + "10": 0.7375798804370233, + "20": 0.8297258297258298, + "50": 0.9377447948876521, + "100": 0.9732014017728303, + "200": 0.9995877138734282 + }, + "formula_hits": { + "1": 3889, + "2": 4322, + "3": 4455, + "4": 4532, + "5": 4583, + "6": 4622, + "7": 4650, + "8": 4668, + "9": 4688, + "10": 4710 + }, + "truth_in_pool": 4851, + "truth_scoreable": 4851, + "error_buckets": { + "covered_same_formula_wrong": 2552, + "correct": 1468, + "covered_wrong_formula": 831 + }, + "mces": { + "n": 4851, + "min": 0.0, + "median": 15.0, + "mean": 12.474850546279118, + "p95": 34.0, + "max": 91.5 + }, + "mces_missing": 0, + "candidates": { + "n": 4851, + "min": 89, + "median": 256.0, + "mean": 254.7305710162853, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3383, + "min": 0.0, + "median": 0.16455696202531644, + "mean": 0.2532563402247407, + "p95": 0.7532161955691367, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 224, + "acyclic_reference_in_errors": 21, + "wrong_with_whole_similarity_ge_08": 107, + "reference_identity_conflicts": 0 + }, + "<=10": { + "n": 6557, + "targets": 1390, + "key14": 1333, + "hits": { + "1": 1568, + "3": 2662, + "5": 3355, + "10": 4166, + "20": 4830, + "50": 5852, + "100": 6207, + "200": 6551 + }, + "recall": { + "1": 0.23913375019063596, + "3": 0.4059783437547659, + "5": 0.5116669208479487, + "10": 0.635351532713131, + "20": 0.7366173554979412, + "50": 0.8924813176757663, + "100": 0.9466219307610187, + "200": 0.9990849473844746 + }, + "formula_hits": { + "1": 4990, + "2": 5620, + "3": 5859, + "4": 5972, + "5": 6063, + "6": 6148, + "7": 6202, + "8": 6239, + "9": 6264, + "10": 6287 + }, + "truth_in_pool": 6557, + "truth_scoreable": 6557, + "error_buckets": { + "covered_same_formula_wrong": 3601, + "correct": 1568, + "covered_wrong_formula": 1388 + }, + "mces": { + "n": 6557, + "min": 0.0, + "median": 15.0, + "mean": 14.658151593716639, + "p95": 38.0, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 6557, + "min": 28, + "median": 256.0, + "mean": 254.42214427329571, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4989, + "min": 0.036036036036036036, + "median": 0.1724137931034483, + "mean": 0.2741721192589879, + "p95": 0.7391304347826086, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 402, + "acyclic_reference_in_errors": 31, + "wrong_with_whole_similarity_ge_08": 138, + "reference_identity_conflicts": 0 + }, + ">100": { + "n": 1221, + "targets": 572, + "key14": 539, + "hits": { + "1": 411, + "3": 708, + "5": 841, + "10": 967, + "20": 1085, + "50": 1169, + "100": 1214, + "200": 1221 + }, + "recall": { + "1": 0.3366093366093366, + "3": 0.5798525798525799, + "5": 0.6887796887796888, + "10": 0.7919737919737919, + "20": 0.8886158886158886, + "50": 0.9574119574119574, + "100": 0.9942669942669943, + "200": 1.0 + }, + "formula_hits": { + "1": 988, + "2": 1089, + "3": 1128, + "4": 1142, + "5": 1158, + "6": 1159, + "7": 1164, + "8": 1171, + "9": 1174, + "10": 1176 + }, + "truth_in_pool": 1221, + "truth_scoreable": 1221, + "error_buckets": { + "correct": 411, + "covered_same_formula_wrong": 658, + "covered_wrong_formula": 152 + }, + "mces": { + "n": 1221, + "min": 0.0, + "median": 15.0, + "mean": 11.102784602784602, + "p95": 34.0, + "max": 69.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1221, + "min": 81, + "median": 256.0, + "mean": 247.67567567567568, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 810, + "min": 0.028169014084507043, + "median": 0.17369121561668144, + "mean": 0.3032224906763302, + "p95": 0.8, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 112, + "acyclic_reference_in_errors": 8, + "wrong_with_whole_similarity_ge_08": 42, + "reference_identity_conflicts": 0 + } + }, + "precursor_mass": { + "200-400": { + "n": 3780, + "targets": 1043, + "key14": 1023, + "hits": { + "1": 1218, + "3": 1958, + "5": 2350, + "10": 2910, + "20": 3264, + "50": 3587, + "100": 3743, + "200": 3780 + }, + "recall": { + "1": 0.32222222222222224, + "3": 0.517989417989418, + "5": 0.6216931216931217, + "10": 0.7698412698412699, + "20": 0.8634920634920635, + "50": 0.948941798941799, + "100": 0.9902116402116402, + "200": 1.0 + }, + "formula_hits": { + "1": 3562, + "2": 3685, + "3": 3726, + "4": 3745, + "5": 3752, + "6": 3757, + "7": 3765, + "8": 3765, + "9": 3769, + "10": 3773 + }, + "truth_in_pool": 3780, + "truth_scoreable": 3780, + "error_buckets": { + "covered_same_formula_wrong": 2340, + "correct": 1218, + "covered_wrong_formula": 222 + }, + "mces": { + "n": 3780, + "min": 0.0, + "median": 15.0, + "mean": 10.725132275132275, + "p95": 22.5, + "max": 58.5 + }, + "mces_missing": 0, + "candidates": { + "n": 3780, + "min": 157, + "median": 256.0, + "mean": 255.95396825396824, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2562, + "min": 0.0, + "median": 0.1549671592775041, + "mean": 0.16856200019482775, + "p95": 0.2836971586971584, + "max": 0.8367346938775511 + }, + "same_exact_nonempty_scaffold_in_errors": 22, + "acyclic_reference_in_errors": 8, + "wrong_with_whole_similarity_ge_08": 7, + "reference_identity_conflicts": 0 + }, + "400-600": { + "n": 7399, + "targets": 1591, + "key14": 1513, + "hits": { + "1": 2511, + "3": 4144, + "5": 5002, + "10": 5937, + "20": 6587, + "50": 7055, + "100": 7301, + "200": 7393 + }, + "recall": { + "1": 0.33937018516015677, + "3": 0.5600756859035004, + "5": 0.6760373023381538, + "10": 0.8024057305041222, + "20": 0.8902554399243141, + "50": 0.9535072307068523, + "100": 0.9867549668874173, + "200": 0.9991890796053521 + }, + "formula_hits": { + "1": 6273, + "2": 6938, + "3": 7077, + "4": 7163, + "5": 7201, + "6": 7227, + "7": 7247, + "8": 7275, + "9": 7295, + "10": 7312 + }, + "truth_in_pool": 7396, + "truth_scoreable": 7395, + "error_buckets": { + "covered_wrong_formula": 1144, + "covered_same_formula_wrong": 3740, + "correct": 2511, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 7399, + "min": 0.0, + "median": 15.0, + "mean": 11.583457223949182, + "p95": 32.04999999999973, + "max": 72.5 + }, + "mces_missing": 0, + "candidates": { + "n": 7399, + "min": 89, + "median": 256.0, + "mean": 255.543181511015, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4888, + "min": 0.021739130434782608, + "median": 0.1511627906976744, + "mean": 0.20616680064991136, + "p95": 0.6, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 288, + "acyclic_reference_in_errors": 54, + "wrong_with_whole_similarity_ge_08": 38, + "reference_identity_conflicts": 3 + }, + ">600": { + "n": 6377, + "targets": 566, + "key14": 491, + "hits": { + "1": 1411, + "3": 2461, + "5": 3079, + "10": 3810, + "20": 4477, + "50": 5664, + "100": 5981, + "200": 6371 + }, + "recall": { + "1": 0.2212639172024463, + "3": 0.3859181433275835, + "5": 0.48282891641837855, + "10": 0.5974596205112122, + "20": 0.702054257487847, + "50": 0.8881919397835973, + "100": 0.9379018347185197, + "200": 0.9990591187078564 + }, + "formula_hits": { + "1": 4162, + "2": 4940, + "3": 5322, + "4": 5484, + "5": 5632, + "6": 5740, + "7": 5814, + "8": 5858, + "9": 5896, + "10": 5933 + }, + "truth_in_pool": 6377, + "truth_scoreable": 6377, + "error_buckets": { + "correct": 1411, + "covered_same_formula_wrong": 3372, + "covered_wrong_formula": 1594 + }, + "mces": { + "n": 6377, + "min": 0.0, + "median": 15.0, + "mean": 15.36027912811667, + "p95": 44.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 6377, + "min": 28, + "median": 256.0, + "mean": 250.71161988395798, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4966, + "min": 0.027777777777777776, + "median": 0.23622047244094488, + "mean": 0.3629878572319898, + "p95": 0.8117647058823529, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 643, + "acyclic_reference_in_errors": 18, + "wrong_with_whole_similarity_ge_08": 351, + "reference_identity_conflicts": 2 + } + }, + "instrument": { + "Orbitrap": { + "n": 14723, + "targets": 2735, + "key14": 2652, + "hits": { + "1": 4381, + "3": 7248, + "5": 8819, + "10": 10691, + "20": 12015, + "50": 13678, + "100": 14250, + "200": 14715 + }, + "recall": { + "1": 0.2975616382530734, + "3": 0.49229097330707056, + "5": 0.598994770087618, + "10": 0.7261427698159343, + "20": 0.8160700944101066, + "50": 0.9290226176730286, + "100": 0.9678733953677919, + "200": 0.9994566324797935 + }, + "formula_hits": { + "1": 11855, + "2": 13149, + "3": 13594, + "4": 13798, + "5": 13946, + "6": 14065, + "7": 14149, + "8": 14209, + "9": 14256, + "10": 14305 + }, + "truth_in_pool": 14722, + "truth_scoreable": 14722, + "error_buckets": { + "covered_same_formula_wrong": 7987, + "correct": 4381, + "covered_wrong_formula": 2354, + "truth_absent": 1 + }, + "mces": { + "n": 14723, + "min": 0.0, + "median": 15.0, + "mean": 12.680839502818719, + "p95": 34.5, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 14723, + "min": 28, + "median": 256.0, + "mean": 254.05637438022143, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 10342, + "min": 0.02564102564102564, + "median": 0.16853932584269662, + "mean": 0.26003380325219455, + "p95": 0.7475728155339806, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 791, + "acyclic_reference_in_errors": 42, + "wrong_with_whole_similarity_ge_08": 311, + "reference_identity_conflicts": 1 + }, + "unknown": { + "n": 409, + "targets": 316, + "key14": 300, + "hits": { + "1": 128, + "3": 208, + "5": 247, + "10": 291, + "20": 332, + "50": 372, + "100": 401, + "200": 407 + }, + "recall": { + "1": 0.31295843520782396, + "3": 0.508557457212714, + "5": 0.6039119804400978, + "10": 0.7114914425427873, + "20": 0.8117359413202934, + "50": 0.9095354523227384, + "100": 0.980440097799511, + "200": 0.9951100244498777 + }, + "formula_hits": { + "1": 311, + "2": 334, + "3": 348, + "4": 352, + "5": 360, + "6": 363, + "7": 365, + "8": 370, + "9": 376, + "10": 377 + }, + "truth_in_pool": 408, + "truth_scoreable": 407, + "error_buckets": { + "covered_same_formula_wrong": 190, + "covered_wrong_formula": 89, + "correct": 128, + "truth_unscoreable": 1, + "truth_absent": 1 + }, + "mces": { + "n": 409, + "min": 0.0, + "median": 15.0, + "mean": 13.58557457212714, + "p95": 43.0, + "max": 69.0 + }, + "mces_missing": 0, + "candidates": { + "n": 409, + "min": 53, + "median": 256.0, + "mean": 252.09046454767727, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 281, + "min": 0.04504504504504504, + "median": 0.1553398058252427, + "mean": 0.27291876200773574, + "p95": 0.8918918918918919, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 17, + "acyclic_reference_in_errors": 5, + "wrong_with_whole_similarity_ge_08": 23, + "reference_identity_conflicts": 2 + }, + "QTOF": { + "n": 2424, + "targets": 695, + "key14": 612, + "hits": { + "1": 631, + "3": 1107, + "5": 1365, + "10": 1675, + "20": 1981, + "50": 2256, + "100": 2374, + "200": 2422 + }, + "recall": { + "1": 0.26031353135313534, + "3": 0.4566831683168317, + "5": 0.5631188118811881, + "10": 0.691006600660066, + "20": 0.8172442244224423, + "50": 0.9306930693069307, + "100": 0.9793729372937293, + "200": 0.9991749174917491 + }, + "formula_hits": { + "1": 1831, + "2": 2080, + "3": 2183, + "4": 2242, + "5": 2279, + "6": 2296, + "7": 2312, + "8": 2319, + "9": 2328, + "10": 2336 + }, + "truth_in_pool": 2423, + "truth_scoreable": 2423, + "error_buckets": { + "covered_same_formula_wrong": 1275, + "correct": 631, + "covered_wrong_formula": 517, + "truth_absent": 1 + }, + "mces": { + "n": 2424, + "min": 0.0, + "median": 15.0, + "mean": 13.177805280528053, + "p95": 35.0, + "max": 72.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2424, + "min": 53, + "median": 256.0, + "mean": 253.08622112211222, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1793, + "min": 0.0, + "median": 0.15384615384615385, + "mean": 0.26560909075940153, + "p95": 0.7746478873239436, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 145, + "acyclic_reference_in_errors": 33, + "wrong_with_whole_similarity_ge_08": 62, + "reference_identity_conflicts": 2 + } + }, + "collision_energy_missing": { + "False": { + "n": 10162, + "targets": 2417, + "key14": 2339, + "hits": { + "1": 3384, + "3": 5564, + "5": 6776, + "10": 8162, + "20": 9067, + "50": 9857, + "100": 10106, + "200": 10162 + }, + "recall": { + "1": 0.33300531391458377, + "3": 0.5475300137768155, + "5": 0.6667978744341665, + "10": 0.803188348750246, + "20": 0.8922456209407597, + "50": 0.9699862231844125, + "100": 0.9944892737650068, + "200": 1.0 + }, + "formula_hits": { + "1": 9347, + "2": 9917, + "3": 10050, + "4": 10109, + "5": 10130, + "6": 10138, + "7": 10148, + "8": 10148, + "9": 10149, + "10": 10151 + }, + "truth_in_pool": 10162, + "truth_scoreable": 10162, + "error_buckets": { + "covered_same_formula_wrong": 5904, + "correct": 3384, + "covered_wrong_formula": 874 + }, + "mces": { + "n": 10162, + "min": 0.0, + "median": 15.0, + "mean": 10.762743554418421, + "p95": 28.0, + "max": 72.5 + }, + "mces_missing": 0, + "candidates": { + "n": 10162, + "min": 28, + "median": 256.0, + "mean": 255.03030899429245, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 6778, + "min": 0.0, + "median": 0.16071428571428573, + "mean": 0.23096445810421917, + "p95": 0.7384615384615385, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 482, + "acyclic_reference_in_errors": 47, + "wrong_with_whole_similarity_ge_08": 162, + "reference_identity_conflicts": 0 + }, + "True": { + "n": 7394, + "targets": 974, + "key14": 894, + "hits": { + "1": 1756, + "3": 2999, + "5": 3655, + "10": 4495, + "20": 5261, + "50": 6449, + "100": 6919, + "200": 7382 + }, + "recall": { + "1": 0.23748985664051933, + "3": 0.4055991344333243, + "5": 0.4943197186908304, + "10": 0.6079253448742223, + "20": 0.7115228563700298, + "50": 0.872193670543684, + "100": 0.9357587232891533, + "200": 0.9983770624830944 + }, + "formula_hits": { + "1": 4650, + "2": 5646, + "3": 6075, + "4": 6283, + "5": 6455, + "6": 6586, + "7": 6678, + "8": 6750, + "9": 6811, + "10": 6867 + }, + "truth_in_pool": 7391, + "truth_scoreable": 7390, + "error_buckets": { + "covered_same_formula_wrong": 3548, + "covered_wrong_formula": 2086, + "correct": 1756, + "truth_absent": 3, + "truth_unscoreable": 1 + }, + "mces": { + "n": 7394, + "min": 0.0, + "median": 15.0, + "mean": 15.529956721666215, + "p95": 42.0, + "max": 101.0 + }, + "mces_missing": 0, + "candidates": { + "n": 7394, + "min": 53, + "median": 256.0, + "mean": 252.29104679469842, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 5638, + "min": 0.02564102564102564, + "median": 0.17894736842105263, + "mean": 0.29739619866257166, + "p95": 0.7746478873239436, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 471, + "acyclic_reference_in_errors": 33, + "wrong_with_whole_similarity_ge_08": 234, + "reference_identity_conflicts": 5 + } + } + }, + "repeated_structure_performance": { + "repeated_identities": 2657, + "all_spectra_wrong": 1454, + "mixed_correct_and_wrong": 647, + "all_spectra_correct": 556, + "key14_macro_top1": 0.31856771484866764 + }, + "ranking_diagnostics": { + "raw_entry_count": 4457058, + "distinct_identity_count_weighted_by_spectra": 4188763, + "unique_identity_topk_diagnostic_only": { + "1": 0.2927773980405559, + "3": 0.5276258828890408, + "5": 0.6487240829346093, + "10": 0.7769423558897243, + "20": 0.8702437912964229, + "50": 0.9531784005468216, + "100": 0.9860446570972887, + "200": 0.9997151970836181 + }, + "true_formula_restricted_topk_oracle_only": { + "1": 0.3835725677830941, + "3": 0.5835042150831624, + "5": 0.6944064707222602, + "10": 0.7982456140350878, + "20": 0.8743449532923218, + "50": 0.9650262018683071, + "100": 0.9858737753474596, + "200": 0.9997721576668945 + }, + "top20_unique_key14": { + "n": 17556, + "min": 1, + "median": 20.0, + "mean": 17.527739804055592, + "p95": 20.0, + "max": 20 + }, + "wrong_top1_score_gap": { + "n": 12412, + "min": 0.0004589557647705078, + "median": 1.9883221536874771, + "mean": 2.5951563095708585, + "p95": 7.197752237319944, + "max": 12.419378757476807 + } + } + }, + "MSG Test/formula": { + "metrics": { + "n": 17556, + "targets": 3170, + "key14": 2997, + "hits": { + "1": 2867, + "3": 4972, + "5": 6323, + "10": 8361, + "20": 10570, + "50": 13808, + "100": 16019, + "200": 17123 + }, + "recall": { + "1": 0.16330599225336068, + "3": 0.2832080200501253, + "5": 0.3601617680565049, + "10": 0.4762474367737526, + "20": 0.60207336523126, + "50": 0.7865117338801549, + "100": 0.9124515835042151, + "200": 0.9753360674413306 + }, + "formula_hits": { + "1": 17555, + "2": 17555, + "3": 17555, + "4": 17555, + "5": 17555, + "6": 17555, + "7": 17555, + "8": 17555, + "9": 17555, + "10": 17555 + }, + "truth_in_pool": 17555, + "truth_scoreable": 17552, + "error_buckets": { + "covered_same_formula_wrong": 14685, + "correct": 2867, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 17555, + "min": 0.0, + "median": 15.0, + "mean": 11.060039874679578, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 17556, + "min": 1, + "median": 237.0, + "mean": 165.74726589200273, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 14688, + "min": 0.0, + "median": 0.19708029197080293, + "mean": 0.3151402857358365, + "p95": 0.7755102040816326, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 1594, + "acyclic_reference_in_errors": 81, + "wrong_with_whole_similarity_ge_08": 508, + "reference_identity_conflicts": 5 + }, + "strata": { + "adduct": { + "[M+H]+": { + "n": 14066, + "targets": 3044, + "key14": 2898, + "hits": { + "1": 2177, + "3": 3928, + "5": 5073, + "10": 6791, + "20": 8566, + "50": 11279, + "100": 12978, + "200": 13843 + }, + "recall": { + "1": 0.15477036826389876, + "3": 0.2792549409924641, + "5": 0.3606569031707664, + "10": 0.48279539314659464, + "20": 0.6089862078771505, + "50": 0.8018626475188397, + "100": 0.9226503625764254, + "200": 0.9841461680648372 + }, + "formula_hits": { + "1": 14065, + "2": 14065, + "3": 14065, + "4": 14065, + "5": 14065, + "6": 14065, + "7": 14065, + "8": 14065, + "9": 14065, + "10": 14065 + }, + "truth_in_pool": 14065, + "truth_scoreable": 14062, + "error_buckets": { + "covered_same_formula_wrong": 11885, + "correct": 2177, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 14065, + "min": 0.0, + "median": 15.0, + "mean": 11.159864912904373, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 14066, + "min": 1, + "median": 256.0, + "mean": 174.20354045215413, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 11888, + "min": 0.0, + "median": 0.1927710843373494, + "mean": 0.3074362920136652, + "p95": 0.7681159420289855, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 1253, + "acyclic_reference_in_errors": 68, + "wrong_with_whole_similarity_ge_08": 328, + "reference_identity_conflicts": 5 + }, + "[M+Na]+": { + "n": 3490, + "targets": 523, + "key14": 489, + "hits": { + "1": 690, + "3": 1044, + "5": 1250, + "10": 1570, + "20": 2004, + "50": 2529, + "100": 3041, + "200": 3280 + }, + "recall": { + "1": 0.1977077363896848, + "3": 0.29914040114613183, + "5": 0.35816618911174786, + "10": 0.4498567335243553, + "20": 0.5742120343839542, + "50": 0.7246418338108882, + "100": 0.8713467048710601, + "200": 0.9398280802292264 + }, + "formula_hits": { + "1": 3490, + "2": 3490, + "3": 3490, + "4": 3490, + "5": 3490, + "6": 3490, + "7": 3490, + "8": 3490, + "9": 3490, + "10": 3490 + }, + "truth_in_pool": 3490, + "truth_scoreable": 3490, + "error_buckets": { + "correct": 690, + "covered_same_formula_wrong": 2800 + }, + "mces": { + "n": 3490, + "min": 0.0, + "median": 15.0, + "mean": 10.657736389684814, + "p95": 18.0, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3490, + "min": 1, + "median": 113.0, + "mean": 131.66532951289398, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2800, + "min": 0.03773584905660377, + "median": 0.24, + "mean": 0.3478492419391127, + "p95": 0.8117647058823529, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 341, + "acyclic_reference_in_errors": 13, + "wrong_with_whole_similarity_ge_08": 180, + "reference_identity_conflicts": 0 + } + }, + "polarity": { + "positive": { + "n": 17556, + "targets": 3170, + "key14": 2997, + "hits": { + "1": 2867, + "3": 4972, + "5": 6323, + "10": 8361, + "20": 10570, + "50": 13808, + "100": 16019, + "200": 17123 + }, + "recall": { + "1": 0.16330599225336068, + "3": 0.2832080200501253, + "5": 0.3601617680565049, + "10": 0.4762474367737526, + "20": 0.60207336523126, + "50": 0.7865117338801549, + "100": 0.9124515835042151, + "200": 0.9753360674413306 + }, + "formula_hits": { + "1": 17555, + "2": 17555, + "3": 17555, + "4": 17555, + "5": 17555, + "6": 17555, + "7": 17555, + "8": 17555, + "9": 17555, + "10": 17555 + }, + "truth_in_pool": 17555, + "truth_scoreable": 17552, + "error_buckets": { + "covered_same_formula_wrong": 14685, + "correct": 2867, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 17555, + "min": 0.0, + "median": 15.0, + "mean": 11.060039874679578, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 17556, + "min": 1, + "median": 237.0, + "mean": 165.74726589200273, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 14688, + "min": 0.0, + "median": 0.19708029197080293, + "mean": 0.3151402857358365, + "p95": 0.7755102040816326, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 1594, + "acyclic_reference_in_errors": 81, + "wrong_with_whole_similarity_ge_08": 508, + "reference_identity_conflicts": 5 + } + }, + "reference_has_halogen": { + "True": { + "n": 3805, + "targets": 962, + "key14": 938, + "hits": { + "1": 604, + "3": 1129, + "5": 1519, + "10": 2015, + "20": 2513, + "50": 3234, + "100": 3629, + "200": 3788 + }, + "recall": { + "1": 0.15873850197109066, + "3": 0.2967148488830486, + "5": 0.3992115637319317, + "10": 0.5295663600525624, + "20": 0.6604467805519054, + "50": 0.849934296977661, + "100": 0.9537450722733246, + "200": 0.9955321944809461 + }, + "formula_hits": { + "1": 3805, + "2": 3805, + "3": 3805, + "4": 3805, + "5": 3805, + "6": 3805, + "7": 3805, + "8": 3805, + "9": 3805, + "10": 3805 + }, + "truth_in_pool": 3805, + "truth_scoreable": 3805, + "error_buckets": { + "covered_same_formula_wrong": 3201, + "correct": 604 + }, + "mces": { + "n": 3805, + "min": 0.0, + "median": 15.0, + "mean": 10.675295663600526, + "p95": 18.0, + "max": 28.5 + }, + "mces_missing": 0, + "candidates": { + "n": 3805, + "min": 1, + "median": 148.0, + "mean": 145.31721419185283, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3201, + "min": 0.031578947368421054, + "median": 0.1951219512195122, + "mean": 0.2900959176638788, + "p95": 0.7647058823529411, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 330, + "acyclic_reference_in_errors": 6, + "wrong_with_whole_similarity_ge_08": 101, + "reference_identity_conflicts": 0 + }, + "False": { + "n": 13751, + "targets": 2208, + "key14": 2059, + "hits": { + "1": 2263, + "3": 3843, + "5": 4804, + "10": 6346, + "20": 8057, + "50": 10574, + "100": 12390, + "200": 13335 + }, + "recall": { + "1": 0.1645698494654934, + "3": 0.2794705839575304, + "5": 0.3493564104428769, + "10": 0.46149370954839647, + "20": 0.5859210239255327, + "50": 0.7689622572903789, + "100": 0.9010253799723656, + "200": 0.9697476547160206 + }, + "formula_hits": { + "1": 13750, + "2": 13750, + "3": 13750, + "4": 13750, + "5": 13750, + "6": 13750, + "7": 13750, + "8": 13750, + "9": 13750, + "10": 13750 + }, + "truth_in_pool": 13750, + "truth_scoreable": 13747, + "error_buckets": { + "covered_same_formula_wrong": 11484, + "correct": 2263, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 13750, + "min": 0.0, + "median": 15.0, + "mean": 11.166509090909091, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 13751, + "min": 1, + "median": 243.0, + "mean": 171.40040724310958, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 11487, + "min": 0.0, + "median": 0.2, + "mean": 0.322119220374849, + "p95": 0.7755102040816326, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 1264, + "acyclic_reference_in_errors": 75, + "wrong_with_whole_similarity_ge_08": 407, + "reference_identity_conflicts": 5 + } + }, + "reference_rings": { + "3": { + "n": 3604, + "targets": 756, + "key14": 723, + "hits": { + "1": 446, + "3": 859, + "5": 1108, + "10": 1584, + "20": 1985, + "50": 2805, + "100": 3244, + "200": 3566 + }, + "recall": { + "1": 0.12375138734739179, + "3": 0.23834628190899002, + "5": 0.3074361820199778, + "10": 0.43951165371809103, + "20": 0.5507769145394007, + "50": 0.7783018867924528, + "100": 0.9001109877913429, + "200": 0.9894561598224195 + }, + "formula_hits": { + "1": 3604, + "2": 3604, + "3": 3604, + "4": 3604, + "5": 3604, + "6": 3604, + "7": 3604, + "8": 3604, + "9": 3604, + "10": 3604 + }, + "truth_in_pool": 3604, + "truth_scoreable": 3604, + "error_buckets": { + "covered_same_formula_wrong": 3158, + "correct": 446 + }, + "mces": { + "n": 3604, + "min": 0.0, + "median": 15.0, + "mean": 12.125971143174251, + "p95": 19.0, + "max": 30.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3604, + "min": 1, + "median": 256.0, + "mean": 182.5102663706992, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3158, + "min": 0.0410958904109589, + "median": 0.17567567567567569, + "mean": 0.2594211964518977, + "p95": 0.7475728155339806, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 242, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 41, + "reference_identity_conflicts": 0 + }, + "4": { + "n": 4963, + "targets": 1032, + "key14": 980, + "hits": { + "1": 758, + "3": 1442, + "5": 1900, + "10": 2475, + "20": 3138, + "50": 4091, + "100": 4559, + "200": 4817 + }, + "recall": { + "1": 0.152730203505944, + "3": 0.29055007052186177, + "5": 0.38283296393310495, + "10": 0.49869030828128147, + "20": 0.6322788635905702, + "50": 0.8242998186580697, + "100": 0.9185976224058029, + "200": 0.9705823090872456 + }, + "formula_hits": { + "1": 4962, + "2": 4962, + "3": 4962, + "4": 4962, + "5": 4962, + "6": 4962, + "7": 4962, + "8": 4962, + "9": 4962, + "10": 4962 + }, + "truth_in_pool": 4963, + "truth_scoreable": 4960, + "error_buckets": { + "covered_same_formula_wrong": 4202, + "correct": 758, + "truth_unscoreable": 3 + }, + "mces": { + "n": 4962, + "min": 0.0, + "median": 15.0, + "mean": 11.338976219266424, + "p95": 21.5, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 4963, + "min": 1, + "median": 256.0, + "mean": 183.0122909530526, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4204, + "min": 0.03333333333333333, + "median": 0.1845407020164302, + "mean": 0.28269934669002067, + "p95": 0.7755102040816326, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 413, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 132, + "reference_identity_conflicts": 2 + }, + "1": { + "n": 395, + "targets": 75, + "key14": 70, + "hits": { + "1": 82, + "3": 226, + "5": 252, + "10": 292, + "20": 323, + "50": 358, + "100": 375, + "200": 386 + }, + "recall": { + "1": 0.20759493670886076, + "3": 0.5721518987341773, + "5": 0.6379746835443038, + "10": 0.739240506329114, + "20": 0.8177215189873418, + "50": 0.9063291139240506, + "100": 0.9493670886075949, + "200": 0.9772151898734177 + }, + "formula_hits": { + "1": 395, + "2": 395, + "3": 395, + "4": 395, + "5": 395, + "6": 395, + "7": 395, + "8": 395, + "9": 395, + "10": 395 + }, + "truth_in_pool": 395, + "truth_scoreable": 395, + "error_buckets": { + "covered_same_formula_wrong": 313, + "correct": 82 + }, + "mces": { + "n": 395, + "min": 0.0, + "median": 15.0, + "mean": 10.921518987341772, + "p95": 19.0, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 395, + "min": 1, + "median": 40.0, + "mean": 107.83291139240507, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 313, + "min": 0.05454545454545454, + "median": 0.2328767123287671, + "mean": 0.331159071448852, + "p95": 0.6444444444444445, + "max": 0.9310344827586207 + }, + "same_exact_nonempty_scaffold_in_errors": 111, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 7, + "reference_identity_conflicts": 0 + }, + "2": { + "n": 1361, + "targets": 278, + "key14": 266, + "hits": { + "1": 175, + "3": 363, + "5": 480, + "10": 670, + "20": 822, + "50": 1086, + "100": 1255, + "200": 1352 + }, + "recall": { + "1": 0.12858192505510654, + "3": 0.26671565025716387, + "5": 0.3526818515797208, + "10": 0.4922850844966936, + "20": 0.6039676708302718, + "50": 0.7979426891991183, + "100": 0.9221160911094783, + "200": 0.9933872152828802 + }, + "formula_hits": { + "1": 1361, + "2": 1361, + "3": 1361, + "4": 1361, + "5": 1361, + "6": 1361, + "7": 1361, + "8": 1361, + "9": 1361, + "10": 1361 + }, + "truth_in_pool": 1361, + "truth_scoreable": 1361, + "error_buckets": { + "covered_same_formula_wrong": 1186, + "correct": 175 + }, + "mces": { + "n": 1361, + "min": 0.0, + "median": 15.0, + "mean": 11.636664217487143, + "p95": 19.5, + "max": 30.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1361, + "min": 1, + "median": 256.0, + "mean": 168.9426891991183, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1186, + "min": 0.025974025974025976, + "median": 0.1724137931034483, + "mean": 0.2550063071671719, + "p95": 0.6896551724137931, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 151, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 25, + "reference_identity_conflicts": 0 + }, + "5": { + "n": 2937, + "targets": 582, + "key14": 555, + "hits": { + "1": 639, + "3": 961, + "5": 1216, + "10": 1627, + "20": 1988, + "50": 2463, + "100": 2737, + "200": 2905 + }, + "recall": { + "1": 0.21756894790602654, + "3": 0.3272046305754171, + "5": 0.4140279196458972, + "10": 0.553966632618318, + "20": 0.6768811712631937, + "50": 0.8386108273748724, + "100": 0.9319033026898196, + "200": 0.9891045284303711 + }, + "formula_hits": { + "1": 2937, + "2": 2937, + "3": 2937, + "4": 2937, + "5": 2937, + "6": 2937, + "7": 2937, + "8": 2937, + "9": 2937, + "10": 2937 + }, + "truth_in_pool": 2937, + "truth_scoreable": 2937, + "error_buckets": { + "covered_same_formula_wrong": 2298, + "correct": 639 + }, + "mces": { + "n": 2937, + "min": 0.0, + "median": 15.0, + "mean": 9.219441607082057, + "p95": 17.5, + "max": 28.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2937, + "min": 1, + "median": 226.0, + "mean": 172.3779366700715, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2298, + "min": 0.058823529411764705, + "median": 0.21263297872340425, + "mean": 0.3471669751441429, + "p95": 0.7777777777777778, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 195, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 91, + "reference_identity_conflicts": 0 + }, + "8": { + "n": 273, + "targets": 36, + "key14": 32, + "hits": { + "1": 89, + "3": 123, + "5": 129, + "10": 162, + "20": 207, + "50": 252, + "100": 262, + "200": 273 + }, + "recall": { + "1": 0.326007326007326, + "3": 0.45054945054945056, + "5": 0.4725274725274725, + "10": 0.5934065934065934, + "20": 0.7582417582417582, + "50": 0.9230769230769231, + "100": 0.9597069597069597, + "200": 1.0 + }, + "formula_hits": { + "1": 273, + "2": 273, + "3": 273, + "4": 273, + "5": 273, + "6": 273, + "7": 273, + "8": 273, + "9": 273, + "10": 273 + }, + "truth_in_pool": 273, + "truth_scoreable": 273, + "error_buckets": { + "covered_same_formula_wrong": 184, + "correct": 89 + }, + "mces": { + "n": 273, + "min": 0.0, + "median": 4.5, + "mean": 8.267399267399268, + "p95": 20.0, + "max": 22.0 + }, + "mces_missing": 0, + "candidates": { + "n": 273, + "min": 2, + "median": 43.0, + "mean": 75.87545787545787, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 184, + "min": 0.08547008547008547, + "median": 0.3181818181818182, + "mean": 0.4026901480271478, + "p95": 0.7422680412371134, + "max": 0.7422680412371134 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "7": { + "n": 1506, + "targets": 126, + "key14": 107, + "hits": { + "1": 138, + "3": 274, + "5": 380, + "10": 550, + "20": 906, + "50": 1250, + "100": 1452, + "200": 1505 + }, + "recall": { + "1": 0.09163346613545817, + "3": 0.18193891102257637, + "5": 0.25232403718459495, + "10": 0.3652058432934927, + "20": 0.601593625498008, + "50": 0.8300132802124834, + "100": 0.9641434262948207, + "200": 0.99933598937583 + }, + "formula_hits": { + "1": 1506, + "2": 1506, + "3": 1506, + "4": 1506, + "5": 1506, + "6": 1506, + "7": 1506, + "8": 1506, + "9": 1506, + "10": 1506 + }, + "truth_in_pool": 1506, + "truth_scoreable": 1506, + "error_buckets": { + "covered_same_formula_wrong": 1368, + "correct": 138 + }, + "mces": { + "n": 1506, + "min": 0.0, + "median": 15.0, + "mean": 11.412350597609562, + "p95": 19.0, + "max": 32.5 + }, + "mces_missing": 0, + "candidates": { + "n": 1506, + "min": 1, + "median": 79.0, + "mean": 95.05245683930943, + "p95": 234.75, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1368, + "min": 0.053763440860215055, + "median": 0.2, + "mean": 0.3208952012132389, + "p95": 0.7948717948717948, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 285, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 66, + "reference_identity_conflicts": 0 + }, + "0": { + "n": 185, + "targets": 34, + "key14": 31, + "hits": { + "1": 104, + "3": 125, + "5": 135, + "10": 164, + "20": 175, + "50": 178, + "100": 180, + "200": 185 + }, + "recall": { + "1": 0.5621621621621622, + "3": 0.6756756756756757, + "5": 0.7297297297297297, + "10": 0.8864864864864865, + "20": 0.9459459459459459, + "50": 0.9621621621621622, + "100": 0.972972972972973, + "200": 1.0 + }, + "formula_hits": { + "1": 185, + "2": 185, + "3": 185, + "4": 185, + "5": 185, + "6": 185, + "7": 185, + "8": 185, + "9": 185, + "10": 185 + }, + "truth_in_pool": 185, + "truth_scoreable": 185, + "error_buckets": { + "covered_same_formula_wrong": 81, + "correct": 104 + }, + "mces": { + "n": 185, + "min": 0.0, + "median": 0.0, + "mean": 4.859459459459459, + "p95": 15.0, + "max": 27.0 + }, + "mces_missing": 0, + "candidates": { + "n": 185, + "min": 4, + "median": 22.0, + "mean": 62.983783783783785, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 81, + "min": 0.0, + "median": 0.18181818181818182, + "mean": 0.3189704444266198, + "p95": 0.9444444444444444, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 81, + "wrong_with_whole_similarity_ge_08": 8, + "reference_identity_conflicts": 0 + }, + "6": { + "n": 2247, + "targets": 226, + "key14": 208, + "hits": { + "1": 418, + "3": 563, + "5": 662, + "10": 774, + "20": 953, + "50": 1244, + "100": 1870, + "200": 2049 + }, + "recall": { + "1": 0.1860258121940365, + "3": 0.25055629728526924, + "5": 0.2946150422785937, + "10": 0.3444592790387183, + "20": 0.4241210502892746, + "50": 0.5536270582999555, + "100": 0.8322207387627948, + "200": 0.9118825100133512 + }, + "formula_hits": { + "1": 2247, + "2": 2247, + "3": 2247, + "4": 2247, + "5": 2247, + "6": 2247, + "7": 2247, + "8": 2247, + "9": 2247, + "10": 2247 + }, + "truth_in_pool": 2246, + "truth_scoreable": 2246, + "error_buckets": { + "covered_same_formula_wrong": 1828, + "correct": 418, + "truth_absent": 1 + }, + "mces": { + "n": 2247, + "min": 0.0, + "median": 15.0, + "mean": 11.458166444147752, + "p95": 16.0, + "max": 27.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2247, + "min": 1, + "median": 243.0, + "mean": 171.92834890965733, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1829, + "min": 0.047619047619047616, + "median": 0.5263157894736842, + "mean": 0.4656975201276176, + "p95": 0.8117647058823529, + "max": 0.9036144578313253 + }, + "same_exact_nonempty_scaffold_in_errors": 193, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 121, + "reference_identity_conflicts": 3 + }, + "12": { + "n": 7, + "targets": 4, + "key14": 4, + "hits": { + "1": 2, + "3": 2, + "5": 3, + "10": 3, + "20": 5, + "50": 5, + "100": 7, + "200": 7 + }, + "recall": { + "1": 0.2857142857142857, + "3": 0.2857142857142857, + "5": 0.42857142857142855, + "10": 0.42857142857142855, + "20": 0.7142857142857143, + "50": 0.7142857142857143, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 7, + "2": 7, + "3": 7, + "4": 7, + "5": 7, + "6": 7, + "7": 7, + "8": 7, + "9": 7, + "10": 7 + }, + "truth_in_pool": 7, + "truth_scoreable": 7, + "error_buckets": { + "covered_same_formula_wrong": 5, + "correct": 2 + }, + "mces": { + "n": 7, + "min": 0.0, + "median": 2.0, + "mean": 5.142857142857143, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 7, + "min": 54, + "median": 118.0, + "mean": 104.85714285714286, + "p95": 127.0, + "max": 127 + }, + "whole_similarity_in_errors": { + "n": 5, + "min": 0.22627737226277372, + "median": 0.6627906976744186, + "mean": 0.49179744074083437, + "p95": 0.6772389905987135, + "max": 0.6808510638297872 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "10": { + "n": 43, + "targets": 6, + "key14": 6, + "hits": { + "1": 8, + "3": 24, + "5": 35, + "10": 37, + "20": 40, + "50": 41, + "100": 43, + "200": 43 + }, + "recall": { + "1": 0.18604651162790697, + "3": 0.5581395348837209, + "5": 0.813953488372093, + "10": 0.8604651162790697, + "20": 0.9302325581395349, + "50": 0.9534883720930233, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 43, + "2": 43, + "3": 43, + "4": 43, + "5": 43, + "6": 43, + "7": 43, + "8": 43, + "9": 43, + "10": 43 + }, + "truth_in_pool": 43, + "truth_scoreable": 43, + "error_buckets": { + "covered_same_formula_wrong": 35, + "correct": 8 + }, + "mces": { + "n": 43, + "min": 0.0, + "median": 15.0, + "mean": 10.0, + "p95": 27.799999999999983, + "max": 29.0 + }, + "mces_missing": 0, + "candidates": { + "n": 43, + "min": 11, + "median": 12.0, + "mean": 17.488372093023255, + "p95": 39.499999999999964, + "max": 102 + }, + "whole_similarity_in_errors": { + "n": 35, + "min": 0.11029411764705882, + "median": 0.1402439024390244, + "mean": 0.41358670703533285, + "p95": 0.8181818181818182, + "max": 0.8181818181818182 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 13, + "reference_identity_conflicts": 0 + }, + "13": { + "n": 2, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 0, + "20": 2, + "50": 2, + "100": 2, + "200": 2 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 0.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 2, + "2": 2, + "3": 2, + "4": 2, + "5": 2, + "6": 2, + "7": 2, + "8": 2, + "9": 2, + "10": 2 + }, + "truth_in_pool": 2, + "truth_scoreable": 2, + "error_buckets": { + "covered_same_formula_wrong": 2 + }, + "mces": { + "n": 2, + "min": 17.0, + "median": 17.0, + "mean": 17.0, + "p95": 17.0, + "max": 17.0 + }, + "mces_missing": 0, + "candidates": { + "n": 2, + "min": 50, + "median": 50.0, + "mean": 50, + "p95": 50.0, + "max": 50 + }, + "whole_similarity_in_errors": { + "n": 2, + "min": 0.0962962962962963, + "median": 0.0962962962962963, + "mean": 0.0962962962962963, + "p95": 0.0962962962962963, + "max": 0.0962962962962963 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "9": { + "n": 29, + "targets": 12, + "key14": 12, + "hits": { + "1": 4, + "3": 6, + "5": 19, + "10": 19, + "20": 22, + "50": 29, + "100": 29, + "200": 29 + }, + "recall": { + "1": 0.13793103448275862, + "3": 0.20689655172413793, + "5": 0.6551724137931034, + "10": 0.6551724137931034, + "20": 0.7586206896551724, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 29, + "2": 29, + "3": 29, + "4": 29, + "5": 29, + "6": 29, + "7": 29, + "8": 29, + "9": 29, + "10": 29 + }, + "truth_in_pool": 29, + "truth_scoreable": 29, + "error_buckets": { + "covered_same_formula_wrong": 25, + "correct": 4 + }, + "mces": { + "n": 29, + "min": 0.0, + "median": 15.0, + "mean": 12.913793103448276, + "p95": 22.999999999999993, + "max": 24.0 + }, + "mces_missing": 0, + "candidates": { + "n": 29, + "min": 2, + "median": 19.0, + "mean": 50.3448275862069, + "p95": 126.39999999999999, + "max": 128 + }, + "whole_similarity_in_errors": { + "n": 25, + "min": 0.08783783783783784, + "median": 0.3504273504273504, + "mean": 0.3750495644728799, + "p95": 0.9681415929203535, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 4, + "reference_identity_conflicts": 0 + }, + "11": { + "n": 4, + "targets": 2, + "key14": 2, + "hits": { + "1": 4, + "3": 4, + "5": 4, + "10": 4, + "20": 4, + "50": 4, + "100": 4, + "200": 4 + }, + "recall": { + "1": 1.0, + "3": 1.0, + "5": 1.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 4, + "2": 4, + "3": 4, + "4": 4, + "5": 4, + "6": 4, + "7": 4, + "8": 4, + "9": 4, + "10": 4 + }, + "truth_in_pool": 4, + "truth_scoreable": 4, + "error_buckets": { + "correct": 4 + }, + "mces": { + "n": 4, + "min": 0.0, + "median": 0.0, + "mean": 0.0, + "p95": 0.0, + "max": 0.0 + }, + "mces_missing": 0, + "candidates": { + "n": 4, + "min": 24, + "median": 24.0, + "mean": 29.75, + "p95": 43.54999999999999, + "max": 47 + }, + "whole_similarity_in_errors": null, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + } + }, + "candidate_size": { + "65-256": { + "n": 12945, + "targets": 2522, + "key14": 2390, + "hits": { + "1": 1313, + "3": 2480, + "5": 3283, + "10": 4655, + "20": 6360, + "50": 9219, + "100": 11409, + "200": 12513 + }, + "recall": { + "1": 0.10142912321359598, + "3": 0.19157976052529935, + "5": 0.25361143298570876, + "10": 0.3595983005021244, + "20": 0.49130938586326767, + "50": 0.7121668597914252, + "100": 0.8813441483198146, + "200": 0.9666280417149479 + }, + "formula_hits": { + "1": 12945, + "2": 12945, + "3": 12945, + "4": 12945, + "5": 12945, + "6": 12945, + "7": 12945, + "8": 12945, + "9": 12945, + "10": 12945 + }, + "truth_in_pool": 12944, + "truth_scoreable": 12942, + "error_buckets": { + "covered_same_formula_wrong": 11629, + "correct": 1313, + "truth_absent": 1, + "truth_unscoreable": 2 + }, + "mces": { + "n": 12945, + "min": 0.0, + "median": 15.0, + "mean": 12.37632290459637, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 0, + "candidates": { + "n": 12945, + "min": 65, + "median": 256.0, + "mean": 215.15102356122054, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 11632, + "min": 0.0, + "median": 0.18421052631578946, + "mean": 0.2807343087721318, + "p95": 0.7422680412371134, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 781, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 156, + "reference_identity_conflicts": 5 + }, + "<=64": { + "n": 4611, + "targets": 648, + "key14": 607, + "hits": { + "1": 1554, + "3": 2492, + "5": 3040, + "10": 3706, + "20": 4210, + "50": 4589, + "100": 4610, + "200": 4610 + }, + "recall": { + "1": 0.33702016916070265, + "3": 0.5404467577531988, + "5": 0.659292995011928, + "10": 0.8037302103665148, + "20": 0.9130340490132293, + "50": 0.9952288006939927, + "100": 0.9997831273042724, + "200": 0.9997831273042724 + }, + "formula_hits": { + "1": 4610, + "2": 4610, + "3": 4610, + "4": 4610, + "5": 4610, + "6": 4610, + "7": 4610, + "8": 4610, + "9": 4610, + "10": 4610 + }, + "truth_in_pool": 4611, + "truth_scoreable": 4610, + "error_buckets": { + "covered_same_formula_wrong": 3056, + "correct": 1554, + "truth_unscoreable": 1 + }, + "mces": { + "n": 4610, + "min": 0.0, + "median": 4.0, + "mean": 7.363882863340564, + "p95": 18.5, + "max": 33.0 + }, + "mces_missing": 1, + "candidates": { + "n": 4611, + "min": 1, + "median": 24.0, + "mean": 27.050314465408807, + "p95": 57.0, + "max": 64 + }, + "whole_similarity_in_errors": { + "n": 3056, + "min": 0.053763440860215055, + "median": 0.3619047619047619, + "mean": 0.44609916140396916, + "p95": 0.8395061728395061, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 813, + "acyclic_reference_in_errors": 42, + "wrong_with_whole_similarity_ge_08": 352, + "reference_identity_conflicts": 0 + } + }, + "true_formula_size": { + "65-256": { + "n": 12945, + "targets": 2522, + "key14": 2390, + "hits": { + "1": 1313, + "3": 2480, + "5": 3283, + "10": 4655, + "20": 6360, + "50": 9219, + "100": 11409, + "200": 12513 + }, + "recall": { + "1": 0.10142912321359598, + "3": 0.19157976052529935, + "5": 0.25361143298570876, + "10": 0.3595983005021244, + "20": 0.49130938586326767, + "50": 0.7121668597914252, + "100": 0.8813441483198146, + "200": 0.9666280417149479 + }, + "formula_hits": { + "1": 12945, + "2": 12945, + "3": 12945, + "4": 12945, + "5": 12945, + "6": 12945, + "7": 12945, + "8": 12945, + "9": 12945, + "10": 12945 + }, + "truth_in_pool": 12944, + "truth_scoreable": 12942, + "error_buckets": { + "covered_same_formula_wrong": 11629, + "correct": 1313, + "truth_absent": 1, + "truth_unscoreable": 2 + }, + "mces": { + "n": 12945, + "min": 0.0, + "median": 15.0, + "mean": 12.37632290459637, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 0, + "candidates": { + "n": 12945, + "min": 65, + "median": 256.0, + "mean": 215.15102356122054, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 11632, + "min": 0.0, + "median": 0.18421052631578946, + "mean": 0.2807343087721318, + "p95": 0.7422680412371134, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 781, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 156, + "reference_identity_conflicts": 5 + }, + "17-64": { + "n": 2852, + "targets": 392, + "key14": 363, + "hits": { + "1": 735, + "3": 1220, + "5": 1509, + "10": 1958, + "20": 2452, + "50": 2831, + "100": 2852, + "200": 2852 + }, + "recall": { + "1": 0.25771388499298736, + "3": 0.4277699859747546, + "5": 0.5291023842917251, + "10": 0.6865357643758766, + "20": 0.8597475455820477, + "50": 0.9926367461430575, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 2852, + "2": 2852, + "3": 2852, + "4": 2852, + "5": 2852, + "6": 2852, + "7": 2852, + "8": 2852, + "9": 2852, + "10": 2852 + }, + "truth_in_pool": 2852, + "truth_scoreable": 2852, + "error_buckets": { + "covered_same_formula_wrong": 2117, + "correct": 735 + }, + "mces": { + "n": 2852, + "min": 0.0, + "median": 6.0, + "mean": 8.710553997194951, + "p95": 19.0, + "max": 32.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2852, + "min": 17, + "median": 40.0, + "mean": 38.79733520336606, + "p95": 61.0, + "max": 64 + }, + "whole_similarity_in_errors": { + "n": 2117, + "min": 0.053763440860215055, + "median": 0.30357142857142855, + "mean": 0.4141476525698945, + "p95": 0.8233766233766215, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 525, + "acyclic_reference_in_errors": 26, + "wrong_with_whole_similarity_ge_08": 206, + "reference_identity_conflicts": 0 + }, + "<=16": { + "n": 1759, + "targets": 256, + "key14": 244, + "hits": { + "1": 819, + "3": 1272, + "5": 1531, + "10": 1748, + "20": 1758, + "50": 1758, + "100": 1758, + "200": 1758 + }, + "recall": { + "1": 0.46560545764639, + "3": 0.7231381466742467, + "5": 0.870380898237635, + "10": 0.9937464468447982, + "20": 0.9994314951677089, + "50": 0.9994314951677089, + "100": 0.9994314951677089, + "200": 0.9994314951677089 + }, + "formula_hits": { + "1": 1758, + "2": 1758, + "3": 1758, + "4": 1758, + "5": 1758, + "6": 1758, + "7": 1758, + "8": 1758, + "9": 1758, + "10": 1758 + }, + "truth_in_pool": 1759, + "truth_scoreable": 1758, + "error_buckets": { + "correct": 819, + "covered_same_formula_wrong": 939, + "truth_unscoreable": 1 + }, + "mces": { + "n": 1758, + "min": 0.0, + "median": 2.0, + "mean": 5.179180887372014, + "p95": 18.0, + "max": 33.0 + }, + "mces_missing": 1, + "candidates": { + "n": 1759, + "min": 1, + "median": 7.0, + "mean": 8.003979533826037, + "p95": 16.0, + "max": 44 + }, + "whole_similarity_in_errors": { + "n": 939, + "min": 0.05454545454545454, + "median": 0.6181818181818182, + "mean": 0.5181346717359564, + "p95": 0.8431868131868129, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 288, + "acyclic_reference_in_errors": 16, + "wrong_with_whole_similarity_ge_08": 146, + "reference_identity_conflicts": 0 + } + }, + "peak_count": { + "51-100": { + "n": 1830, + "targets": 1078, + "key14": 1036, + "hits": { + "1": 315, + "3": 544, + "5": 725, + "10": 934, + "20": 1177, + "50": 1520, + "100": 1712, + "200": 1821 + }, + "recall": { + "1": 0.1721311475409836, + "3": 0.2972677595628415, + "5": 0.39617486338797814, + "10": 0.5103825136612021, + "20": 0.6431693989071038, + "50": 0.8306010928961749, + "100": 0.9355191256830601, + "200": 0.9950819672131147 + }, + "formula_hits": { + "1": 1829, + "2": 1829, + "3": 1829, + "4": 1829, + "5": 1829, + "6": 1829, + "7": 1829, + "8": 1829, + "9": 1829, + "10": 1829 + }, + "truth_in_pool": 1829, + "truth_scoreable": 1828, + "error_buckets": { + "covered_same_formula_wrong": 1513, + "correct": 315, + "truth_absent": 1, + "truth_unscoreable": 1 + }, + "mces": { + "n": 1829, + "min": 0.0, + "median": 15.0, + "mean": 11.102241662110442, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 1830, + "min": 1, + "median": 256.0, + "mean": 187.08743169398906, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1514, + "min": 0.025, + "median": 0.17951028195887214, + "mean": 0.2867949565508393, + "p95": 0.7727272727272727, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 157, + "acyclic_reference_in_errors": 13, + "wrong_with_whole_similarity_ge_08": 52, + "reference_identity_conflicts": 1 + }, + "26-50": { + "n": 3097, + "targets": 1563, + "key14": 1506, + "hits": { + "1": 459, + "3": 881, + "5": 1148, + "10": 1532, + "20": 1953, + "50": 2528, + "100": 2872, + "200": 3075 + }, + "recall": { + "1": 0.14820794317081046, + "3": 0.28446884081369067, + "5": 0.3706813044882144, + "10": 0.49467226348078785, + "20": 0.6306102680012916, + "50": 0.8162738133677753, + "100": 0.927349047465289, + "200": 0.9928963513077171 + }, + "formula_hits": { + "1": 3097, + "2": 3097, + "3": 3097, + "4": 3097, + "5": 3097, + "6": 3097, + "7": 3097, + "8": 3097, + "9": 3097, + "10": 3097 + }, + "truth_in_pool": 3097, + "truth_scoreable": 3095, + "error_buckets": { + "covered_same_formula_wrong": 2636, + "correct": 459, + "truth_unscoreable": 2 + }, + "mces": { + "n": 3097, + "min": 0.0, + "median": 15.0, + "mean": 11.281562802712303, + "p95": 19.0, + "max": 30.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3097, + "min": 1, + "median": 256.0, + "mean": 188.92638036809817, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2638, + "min": 0.025974025974025976, + "median": 0.1827956989247312, + "mean": 0.2824056858194455, + "p95": 0.7580645161290323, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 230, + "acyclic_reference_in_errors": 11, + "wrong_with_whole_similarity_ge_08": 64, + "reference_identity_conflicts": 4 + }, + "11-25": { + "n": 4851, + "targets": 1884, + "key14": 1812, + "hits": { + "1": 766, + "3": 1398, + "5": 1790, + "10": 2416, + "20": 3043, + "50": 3916, + "100": 4509, + "200": 4765 + }, + "recall": { + "1": 0.15790558647701505, + "3": 0.2881880024737168, + "5": 0.36899608328179756, + "10": 0.4980416408987838, + "20": 0.6272933415790559, + "50": 0.8072562358276644, + "100": 0.9294990723562152, + "200": 0.9822716965574109 + }, + "formula_hits": { + "1": 4851, + "2": 4851, + "3": 4851, + "4": 4851, + "5": 4851, + "6": 4851, + "7": 4851, + "8": 4851, + "9": 4851, + "10": 4851 + }, + "truth_in_pool": 4851, + "truth_scoreable": 4851, + "error_buckets": { + "covered_same_formula_wrong": 4085, + "correct": 766 + }, + "mces": { + "n": 4851, + "min": 0.0, + "median": 15.0, + "mean": 11.12255205112348, + "p95": 19.5, + "max": 31.0 + }, + "mces_missing": 0, + "candidates": { + "n": 4851, + "min": 1, + "median": 244.0, + "mean": 168.60296846011133, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4085, + "min": 0.0, + "median": 0.1958762886597938, + "mean": 0.30797534679676186, + "p95": 0.7755102040816326, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 428, + "acyclic_reference_in_errors": 25, + "wrong_with_whole_similarity_ge_08": 132, + "reference_identity_conflicts": 0 + }, + "<=10": { + "n": 6557, + "targets": 1390, + "key14": 1333, + "hits": { + "1": 1114, + "3": 1740, + "5": 2172, + "10": 2845, + "20": 3603, + "50": 4830, + "100": 5784, + "200": 6243 + }, + "recall": { + "1": 0.16989476894921457, + "3": 0.26536525850236387, + "5": 0.3312490468201922, + "10": 0.43388744852829036, + "20": 0.5494890956229983, + "50": 0.7366173554979412, + "100": 0.8821107213664786, + "200": 0.9521122464541711 + }, + "formula_hits": { + "1": 6557, + "2": 6557, + "3": 6557, + "4": 6557, + "5": 6557, + "6": 6557, + "7": 6557, + "8": 6557, + "9": 6557, + "10": 6557 + }, + "truth_in_pool": 6557, + "truth_scoreable": 6557, + "error_buckets": { + "covered_same_formula_wrong": 5443, + "correct": 1114 + }, + "mces": { + "n": 6557, + "min": 0.0, + "median": 15.0, + "mean": 10.955162421839256, + "p95": 19.0, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 6557, + "min": 1, + "median": 152.0, + "mean": 147.86258959890193, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 5443, + "min": 0.03773584905660377, + "median": 0.2222222222222222, + "mean": 0.34253842938872175, + "p95": 0.7948717948717948, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 649, + "acyclic_reference_in_errors": 22, + "wrong_with_whole_similarity_ge_08": 220, + "reference_identity_conflicts": 0 + }, + ">100": { + "n": 1221, + "targets": 572, + "key14": 539, + "hits": { + "1": 213, + "3": 409, + "5": 488, + "10": 634, + "20": 794, + "50": 1014, + "100": 1142, + "200": 1219 + }, + "recall": { + "1": 0.17444717444717445, + "3": 0.33497133497133497, + "5": 0.39967239967239965, + "10": 0.5192465192465192, + "20": 0.6502866502866503, + "50": 0.8304668304668305, + "100": 0.9352989352989353, + "200": 0.9983619983619983 + }, + "formula_hits": { + "1": 1221, + "2": 1221, + "3": 1221, + "4": 1221, + "5": 1221, + "6": 1221, + "7": 1221, + "8": 1221, + "9": 1221, + "10": 1221 + }, + "truth_in_pool": 1221, + "truth_scoreable": 1221, + "error_buckets": { + "correct": 213, + "covered_same_formula_wrong": 1008 + }, + "mces": { + "n": 1221, + "min": 0.0, + "median": 15.0, + "mean": 10.74979524979525, + "p95": 18.0, + "max": 32.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1221, + "min": 1, + "median": 211.0, + "mean": 159.66912366912368, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 1008, + "min": 0.024390243902439025, + "median": 0.20689655172413793, + "mean": 0.3244749907249149, + "p95": 0.7746478873239436, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 130, + "acyclic_reference_in_errors": 10, + "wrong_with_whole_similarity_ge_08": 40, + "reference_identity_conflicts": 0 + } + }, + "precursor_mass": { + "200-400": { + "n": 3780, + "targets": 1043, + "key14": 1023, + "hits": { + "1": 504, + "3": 1003, + "5": 1277, + "10": 1692, + "20": 2207, + "50": 2983, + "100": 3422, + "200": 3754 + }, + "recall": { + "1": 0.13333333333333333, + "3": 0.2653439153439153, + "5": 0.3378306878306878, + "10": 0.44761904761904764, + "20": 0.5838624338624339, + "50": 0.7891534391534392, + "100": 0.9052910052910053, + "200": 0.9931216931216931 + }, + "formula_hits": { + "1": 3780, + "2": 3780, + "3": 3780, + "4": 3780, + "5": 3780, + "6": 3780, + "7": 3780, + "8": 3780, + "9": 3780, + "10": 3780 + }, + "truth_in_pool": 3780, + "truth_scoreable": 3780, + "error_buckets": { + "covered_same_formula_wrong": 3276, + "correct": 504 + }, + "mces": { + "n": 3780, + "min": 0.0, + "median": 15.0, + "mean": 12.419708994708994, + "p95": 18.5, + "max": 30.0 + }, + "mces_missing": 0, + "candidates": { + "n": 3780, + "min": 1, + "median": 256.0, + "mean": 227.85608465608465, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 3276, + "min": 0.0, + "median": 0.16483516483516483, + "mean": 0.19697329806157915, + "p95": 0.46153846153846156, + "max": 0.8461538461538461 + }, + "same_exact_nonempty_scaffold_in_errors": 75, + "acyclic_reference_in_errors": 8, + "wrong_with_whole_similarity_ge_08": 5, + "reference_identity_conflicts": 0 + }, + "400-600": { + "n": 7399, + "targets": 1591, + "key14": 1513, + "hits": { + "1": 848, + "3": 1734, + "5": 2398, + "10": 3303, + "20": 4240, + "50": 5720, + "100": 6632, + "200": 7209 + }, + "recall": { + "1": 0.11461008244357346, + "3": 0.23435599405325044, + "5": 0.3240978510609542, + "10": 0.4464116772536829, + "20": 0.5730504122178672, + "50": 0.7730774428976889, + "100": 0.8963373428841735, + "200": 0.9743208541694823 + }, + "formula_hits": { + "1": 7398, + "2": 7398, + "3": 7398, + "4": 7398, + "5": 7398, + "6": 7398, + "7": 7398, + "8": 7398, + "9": 7398, + "10": 7398 + }, + "truth_in_pool": 7398, + "truth_scoreable": 7395, + "error_buckets": { + "covered_same_formula_wrong": 6547, + "correct": 848, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 7398, + "min": 0.0, + "median": 15.0, + "mean": 11.653419843200865, + "p95": 20.5, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 7399, + "min": 1, + "median": 256.0, + "mean": 192.77902419245845, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 6550, + "min": 0.024390243902439025, + "median": 0.18181818181818182, + "mean": 0.2748371839779918, + "p95": 0.7536231884057971, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 657, + "acyclic_reference_in_errors": 53, + "wrong_with_whole_similarity_ge_08": 63, + "reference_identity_conflicts": 3 + }, + ">600": { + "n": 6377, + "targets": 566, + "key14": 491, + "hits": { + "1": 1515, + "3": 2235, + "5": 2648, + "10": 3366, + "20": 4123, + "50": 5105, + "100": 5965, + "200": 6160 + }, + "recall": { + "1": 0.2375725262662694, + "3": 0.35047828132350634, + "5": 0.415242276932727, + "10": 0.5278344048925827, + "20": 0.6465422612513722, + "50": 0.800533166065548, + "100": 0.9353928179394699, + "200": 0.9659714599341384 + }, + "formula_hits": { + "1": 6377, + "2": 6377, + "3": 6377, + "4": 6377, + "5": 6377, + "6": 6377, + "7": 6377, + "8": 6377, + "9": 6377, + "10": 6377 + }, + "truth_in_pool": 6377, + "truth_scoreable": 6377, + "error_buckets": { + "correct": 1515, + "covered_same_formula_wrong": 4862 + }, + "mces": { + "n": 6377, + "min": 0.0, + "median": 15.0, + "mean": 9.565704876901364, + "p95": 18.5, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 6377, + "min": 1, + "median": 61.0, + "mean": 97.56797867335737, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 4862, + "min": 0.047619047619047616, + "median": 0.44881889763779526, + "mean": 0.4490564453686523, + "p95": 0.8181818181818182, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 862, + "acyclic_reference_in_errors": 20, + "wrong_with_whole_similarity_ge_08": 440, + "reference_identity_conflicts": 2 + } + }, + "instrument": { + "Orbitrap": { + "n": 14723, + "targets": 2735, + "key14": 2652, + "hits": { + "1": 2524, + "3": 4292, + "5": 5413, + "10": 7077, + "20": 8907, + "50": 11500, + "100": 13396, + "200": 14319 + }, + "recall": { + "1": 0.17143245262514434, + "3": 0.29151667459077635, + "5": 0.3676560483597093, + "10": 0.48067649256265704, + "20": 0.6049718128098893, + "50": 0.7810908102968145, + "100": 0.9098689125857502, + "200": 0.9725599402295728 + }, + "formula_hits": { + "1": 14723, + "2": 14723, + "3": 14723, + "4": 14723, + "5": 14723, + "6": 14723, + "7": 14723, + "8": 14723, + "9": 14723, + "10": 14723 + }, + "truth_in_pool": 14722, + "truth_scoreable": 14722, + "error_buckets": { + "covered_same_formula_wrong": 12198, + "correct": 2524, + "truth_absent": 1 + }, + "mces": { + "n": 14723, + "min": 0.0, + "median": 15.0, + "mean": 11.099877742307953, + "p95": 19.0, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 14723, + "min": 1, + "median": 243.0, + "mean": 168.3334238945867, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 12199, + "min": 0.02564102564102564, + "median": 0.19607843137254902, + "mean": 0.3093666221769589, + "p95": 0.7746478873239436, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 1247, + "acyclic_reference_in_errors": 44, + "wrong_with_whole_similarity_ge_08": 395, + "reference_identity_conflicts": 1 + }, + "unknown": { + "n": 409, + "targets": 316, + "key14": 300, + "hits": { + "1": 76, + "3": 131, + "5": 166, + "10": 223, + "20": 281, + "50": 340, + "100": 381, + "200": 405 + }, + "recall": { + "1": 0.18581907090464547, + "3": 0.3202933985330073, + "5": 0.4058679706601467, + "10": 0.5452322738386308, + "20": 0.687041564792176, + "50": 0.8312958435207825, + "100": 0.9315403422982885, + "200": 0.9902200488997555 + }, + "formula_hits": { + "1": 408, + "2": 408, + "3": 408, + "4": 408, + "5": 408, + "6": 408, + "7": 408, + "8": 408, + "9": 408, + "10": 408 + }, + "truth_in_pool": 409, + "truth_scoreable": 407, + "error_buckets": { + "covered_same_formula_wrong": 331, + "correct": 76, + "truth_unscoreable": 2 + }, + "mces": { + "n": 408, + "min": 0.0, + "median": 15.0, + "mean": 10.895833333333334, + "p95": 19.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 409, + "min": 1, + "median": 105.0, + "mean": 125.52078239608802, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 332, + "min": 0.047619047619047616, + "median": 0.2112688098495212, + "mean": 0.34359610913183297, + "p95": 0.8936170212765957, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 29, + "acyclic_reference_in_errors": 7, + "wrong_with_whole_similarity_ge_08": 31, + "reference_identity_conflicts": 2 + }, + "QTOF": { + "n": 2424, + "targets": 695, + "key14": 612, + "hits": { + "1": 267, + "3": 549, + "5": 744, + "10": 1061, + "20": 1382, + "50": 1968, + "100": 2242, + "200": 2399 + }, + "recall": { + "1": 0.11014851485148515, + "3": 0.2264851485148515, + "5": 0.3069306930693069, + "10": 0.4377062706270627, + "20": 0.5701320132013201, + "50": 0.8118811881188119, + "100": 0.9249174917491749, + "200": 0.9896864686468647 + }, + "formula_hits": { + "1": 2424, + "2": 2424, + "3": 2424, + "4": 2424, + "5": 2424, + "6": 2424, + "7": 2424, + "8": 2424, + "9": 2424, + "10": 2424 + }, + "truth_in_pool": 2424, + "truth_scoreable": 2423, + "error_buckets": { + "covered_same_formula_wrong": 2156, + "correct": 267, + "truth_unscoreable": 1 + }, + "mces": { + "n": 2424, + "min": 0.0, + "median": 15.0, + "mean": 10.845709570957096, + "p95": 19.5, + "max": 31.5 + }, + "mces_missing": 0, + "candidates": { + "n": 2424, + "min": 1, + "median": 181.0, + "mean": 156.82673267326732, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 2157, + "min": 0.0, + "median": 0.20909090909090908, + "mean": 0.34341362295756916, + "p95": 0.7764705882352941, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 318, + "acyclic_reference_in_errors": 30, + "wrong_with_whole_similarity_ge_08": 82, + "reference_identity_conflicts": 2 + } + }, + "collision_energy_missing": { + "False": { + "n": 10162, + "targets": 2417, + "key14": 2339, + "hits": { + "1": 1248, + "3": 2491, + "5": 3367, + "10": 4669, + "20": 6069, + "50": 8211, + "100": 9369, + "200": 10090 + }, + "recall": { + "1": 0.12281047037984649, + "3": 0.24512891163156858, + "5": 0.3313324148789608, + "10": 0.45945679984255067, + "20": 0.5972249557173784, + "50": 0.808010234205865, + "100": 0.9219641802794726, + "200": 0.9929147805550088 + }, + "formula_hits": { + "1": 10162, + "2": 10162, + "3": 10162, + "4": 10162, + "5": 10162, + "6": 10162, + "7": 10162, + "8": 10162, + "9": 10162, + "10": 10162 + }, + "truth_in_pool": 10162, + "truth_scoreable": 10162, + "error_buckets": { + "covered_same_formula_wrong": 8914, + "correct": 1248 + }, + "mces": { + "n": 10162, + "min": 0.0, + "median": 15.0, + "mean": 11.746555796103129, + "p95": 19.5, + "max": 32.5 + }, + "mces_missing": 0, + "candidates": { + "n": 10162, + "min": 1, + "median": 256.0, + "mean": 186.76805746900217, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 8914, + "min": 0.0, + "median": 0.1836734693877551, + "mean": 0.2718052792096804, + "p95": 0.7529411764705882, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 833, + "acyclic_reference_in_errors": 38, + "wrong_with_whole_similarity_ge_08": 174, + "reference_identity_conflicts": 0 + }, + "True": { + "n": 7394, + "targets": 974, + "key14": 894, + "hits": { + "1": 1619, + "3": 2481, + "5": 2956, + "10": 3692, + "20": 4501, + "50": 5597, + "100": 6650, + "200": 7033 + }, + "recall": { + "1": 0.21896131998918042, + "3": 0.3355423316202326, + "5": 0.39978360833107923, + "10": 0.4993237760346227, + "20": 0.6087368136326752, + "50": 0.7569651068433866, + "100": 0.8993778739518529, + "200": 0.9511766296997566 + }, + "formula_hits": { + "1": 7393, + "2": 7393, + "3": 7393, + "4": 7393, + "5": 7393, + "6": 7393, + "7": 7393, + "8": 7393, + "9": 7393, + "10": 7393 + }, + "truth_in_pool": 7393, + "truth_scoreable": 7390, + "error_buckets": { + "covered_same_formula_wrong": 5771, + "correct": 1619, + "truth_absent": 1, + "truth_unscoreable": 3 + }, + "mces": { + "n": 7393, + "min": 0.0, + "median": 15.0, + "mean": 10.116393886108481, + "p95": 18.0, + "max": 39.0 + }, + "mces_missing": 1, + "candidates": { + "n": 7394, + "min": 1, + "median": 125.0, + "mean": 136.85718149851232, + "p95": 256.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 5774, + "min": 0.024390243902439025, + "median": 0.27058823529411763, + "mean": 0.38204161032436373, + "p95": 0.8117647058823529, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 761, + "acyclic_reference_in_errors": 43, + "wrong_with_whole_similarity_ge_08": 334, + "reference_identity_conflicts": 5 + } + } + }, + "repeated_structure_performance": { + "repeated_identities": 2657, + "all_spectra_wrong": 2026, + "mixed_correct_and_wrong": 392, + "all_spectra_correct": 239, + "key14_macro_top1": 0.1532850592188919 + }, + "ranking_diagnostics": { + "raw_entry_count": 2909859, + "distinct_identity_count_weighted_by_spectra": 2291126, + "unique_identity_topk_diagnostic_only": { + "1": 0.16330599225336068, + "3": 0.3393711551606288, + "5": 0.4434951013898382, + "10": 0.5846434267486899, + "20": 0.7154818865345182, + "50": 0.8817498291182502, + "100": 0.9516404647983595, + "200": 0.9974367737525632 + }, + "true_formula_restricted_topk_oracle_only": { + "1": 0.16330599225336068, + "3": 0.2832080200501253, + "5": 0.3601617680565049, + "10": 0.4762474367737526, + "20": 0.60207336523126, + "50": 0.7865117338801549, + "100": 0.9124515835042151, + "200": 0.9753360674413306 + }, + "top20_unique_key14": { + "n": 17556, + "min": 0, + "median": 16.0, + "mean": 13.838972431077694, + "p95": 20.0, + "max": 20 + }, + "wrong_top1_score_gap": { + "n": 14685, + "min": 1.2874603271484375e-05, + "median": 2.167851686477661, + "mean": 2.679964055767068, + "p95": 6.889880514144895, + "max": 11.874647617340088 + } + } + }, + "CASMI2022/top10_blind": { + "metrics": { + "n": 500, + "targets": 500, + "key14": 497, + "hits": { + "1": 44, + "3": 94, + "5": 128, + "10": 184, + "20": 233, + "50": 319, + "100": 357, + "200": 390 + }, + "recall": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "formula_hits": { + "1": 417, + "2": 447, + "3": 457, + "4": 463, + "5": 464, + "6": 466, + "7": 467, + "8": 468, + "9": 468, + "10": 468 + }, + "truth_in_pool": 467, + "truth_scoreable": 467, + "error_buckets": { + "covered_same_formula_wrong": 404, + "correct": 44, + "covered_wrong_formula": 19, + "truth_absent": 33 + }, + "mces": { + "n": 498, + "min": 0.0, + "median": 12.0, + "mean": 11.412650602409638, + "p95": 26.07499999999999, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 500, + "min": 0, + "median": 2036.5, + "mean": 3530.84, + "p95": 11555.449999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 454, + "min": 0.0, + "median": 0.20530382859149982, + "mean": 0.30798188829200546, + "p95": 0.7645584947839043, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 65, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 17, + "reference_identity_conflicts": 0 + }, + "strata": { + "adduct": { + "[M+Cl]-": { + "n": 21, + "targets": 21, + "key14": 21, + "hits": { + "1": 1, + "3": 5, + "5": 6, + "10": 8, + "20": 12, + "50": 16, + "100": 17, + "200": 17 + }, + "recall": { + "1": 0.047619047619047616, + "3": 0.23809523809523808, + "5": 0.2857142857142857, + "10": 0.38095238095238093, + "20": 0.5714285714285714, + "50": 0.7619047619047619, + "100": 0.8095238095238095, + "200": 0.8095238095238095 + }, + "formula_hits": { + "1": 17, + "2": 19, + "3": 20, + "4": 20, + "5": 20, + "6": 20, + "7": 20, + "8": 20, + "9": 20, + "10": 20 + }, + "truth_in_pool": 20, + "truth_scoreable": 20, + "error_buckets": { + "covered_same_formula_wrong": 18, + "covered_wrong_formula": 1, + "truth_absent": 1, + "correct": 1 + }, + "mces": { + "n": 21, + "min": 0.0, + "median": 14.0, + "mean": 14.547619047619047, + "p95": 41.0, + "max": 53.0 + }, + "mces_missing": 0, + "candidates": { + "n": 21, + "min": 16, + "median": 2217.0, + "mean": 3099.5238095238096, + "p95": 6957.0, + "max": 16349 + }, + "whole_similarity_in_errors": { + "n": 20, + "min": 0.03296703296703297, + "median": 0.18974358974358974, + "mean": 0.31591891574232034, + "p95": 0.928494623655914, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 3, + "acyclic_reference_in_errors": 1, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "[M+FA-H]-": { + "n": 67, + "targets": 67, + "key14": 67, + "hits": { + "1": 7, + "3": 10, + "5": 18, + "10": 27, + "20": 37, + "50": 48, + "100": 53, + "200": 56 + }, + "recall": { + "1": 0.1044776119402985, + "3": 0.14925373134328357, + "5": 0.26865671641791045, + "10": 0.40298507462686567, + "20": 0.5522388059701493, + "50": 0.7164179104477612, + "100": 0.7910447761194029, + "200": 0.835820895522388 + }, + "formula_hits": { + "1": 59, + "2": 62, + "3": 62, + "4": 62, + "5": 62, + "6": 62, + "7": 62, + "8": 62, + "9": 62, + "10": 62 + }, + "truth_in_pool": 62, + "truth_scoreable": 62, + "error_buckets": { + "covered_same_formula_wrong": 53, + "correct": 7, + "truth_absent": 5, + "covered_wrong_formula": 2 + }, + "mces": { + "n": 66, + "min": 0.0, + "median": 15.0, + "mean": 12.704545454545455, + "p95": 22.875, + "max": 49.0 + }, + "mces_missing": 1, + "candidates": { + "n": 67, + "min": 0, + "median": 304.0, + "mean": 2627.3283582089553, + "p95": 10833.799999999994, + "max": 14504 + }, + "whole_similarity_in_errors": { + "n": 59, + "min": 0.0660377358490566, + "median": 0.31746031746031744, + "mean": 0.35624619561918996, + "p95": 0.6680412371134019, + "max": 0.8064516129032258 + }, + "same_exact_nonempty_scaffold_in_errors": 7, + "acyclic_reference_in_errors": 2, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "[M+H]+": { + "n": 177, + "targets": 177, + "key14": 176, + "hits": { + "1": 13, + "3": 33, + "5": 41, + "10": 55, + "20": 70, + "50": 105, + "100": 114, + "200": 127 + }, + "recall": { + "1": 0.07344632768361582, + "3": 0.1864406779661017, + "5": 0.23163841807909605, + "10": 0.3107344632768362, + "20": 0.3954802259887006, + "50": 0.5932203389830508, + "100": 0.6440677966101694, + "200": 0.7175141242937854 + }, + "formula_hits": { + "1": 147, + "2": 156, + "3": 162, + "4": 167, + "5": 168, + "6": 170, + "7": 171, + "8": 171, + "9": 171, + "10": 171 + }, + "truth_in_pool": 171, + "truth_scoreable": 171, + "error_buckets": { + "covered_same_formula_wrong": 146, + "covered_wrong_formula": 12, + "truth_absent": 6, + "correct": 13 + }, + "mces": { + "n": 177, + "min": 0.0, + "median": 9.0, + "mean": 10.228813559322035, + "p95": 24.599999999999994, + "max": 85.0 + }, + "mces_missing": 0, + "candidates": { + "n": 177, + "min": 1, + "median": 3984.0, + "mean": 4897.220338983051, + "p95": 12699.599999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 164, + "min": 0.0, + "median": 0.2, + "mean": 0.290255980366336, + "p95": 0.7524725274725274, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 30, + "acyclic_reference_in_errors": 14, + "wrong_with_whole_similarity_ge_08": 7, + "reference_identity_conflicts": 0 + }, + "[M+Na]+": { + "n": 60, + "targets": 60, + "key14": 60, + "hits": { + "1": 3, + "3": 9, + "5": 13, + "10": 16, + "20": 24, + "50": 34, + "100": 40, + "200": 42 + }, + "recall": { + "1": 0.05, + "3": 0.15, + "5": 0.21666666666666667, + "10": 0.26666666666666666, + "20": 0.4, + "50": 0.5666666666666667, + "100": 0.6666666666666666, + "200": 0.7 + }, + "formula_hits": { + "1": 47, + "2": 48, + "3": 48, + "4": 49, + "5": 49, + "6": 49, + "7": 49, + "8": 49, + "9": 49, + "10": 49 + }, + "truth_in_pool": 49, + "truth_scoreable": 49, + "error_buckets": { + "correct": 3, + "covered_same_formula_wrong": 44, + "truth_absent": 11, + "covered_wrong_formula": 2 + }, + "mces": { + "n": 60, + "min": 0.0, + "median": 15.0, + "mean": 13.841666666666667, + "p95": 27.0, + "max": 39.5 + }, + "mces_missing": 0, + "candidates": { + "n": 60, + "min": 34, + "median": 705.0, + "mean": 2364.366666666667, + "p95": 9948.699999999999, + "max": 13745 + }, + "whole_similarity_in_errors": { + "n": 57, + "min": 0.022727272727272728, + "median": 0.17647058823529413, + "mean": 0.25474091392031545, + "p95": 0.6976744186046512, + "max": 0.8441558441558441 + }, + "same_exact_nonempty_scaffold_in_errors": 7, + "acyclic_reference_in_errors": 11, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "[M+NH4]+": { + "n": 67, + "targets": 67, + "key14": 67, + "hits": { + "1": 7, + "3": 14, + "5": 21, + "10": 36, + "20": 41, + "50": 48, + "100": 53, + "200": 58 + }, + "recall": { + "1": 0.1044776119402985, + "3": 0.208955223880597, + "5": 0.31343283582089554, + "10": 0.5373134328358209, + "20": 0.6119402985074627, + "50": 0.7164179104477612, + "100": 0.7910447761194029, + "200": 0.8656716417910447 + }, + "formula_hits": { + "1": 59, + "2": 59, + "3": 60, + "4": 60, + "5": 60, + "6": 60, + "7": 60, + "8": 60, + "9": 60, + "10": 60 + }, + "truth_in_pool": 60, + "truth_scoreable": 60, + "error_buckets": { + "covered_same_formula_wrong": 53, + "correct": 7, + "truth_absent": 7 + }, + "mces": { + "n": 66, + "min": 0.0, + "median": 12.0, + "mean": 12.090909090909092, + "p95": 28.75, + "max": 73.5 + }, + "mces_missing": 1, + "candidates": { + "n": 67, + "min": 0, + "median": 777.0, + "mean": 2053.2537313432836, + "p95": 7222.799999999996, + "max": 12442 + }, + "whole_similarity_in_errors": { + "n": 59, + "min": 0.07920792079207921, + "median": 0.23170731707317074, + "mean": 0.36403745375192165, + "p95": 0.7994623655913976, + "max": 0.9014084507042254 + }, + "same_exact_nonempty_scaffold_in_errors": 9, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + }, + "[M-H]-": { + "n": 108, + "targets": 108, + "key14": 108, + "hits": { + "1": 13, + "3": 23, + "5": 29, + "10": 42, + "20": 49, + "50": 68, + "100": 80, + "200": 90 + }, + "recall": { + "1": 0.12037037037037036, + "3": 0.21296296296296297, + "5": 0.26851851851851855, + "10": 0.3888888888888889, + "20": 0.4537037037037037, + "50": 0.6296296296296297, + "100": 0.7407407407407407, + "200": 0.8333333333333334 + }, + "formula_hits": { + "1": 88, + "2": 103, + "3": 105, + "4": 105, + "5": 105, + "6": 105, + "7": 105, + "8": 106, + "9": 106, + "10": 106 + }, + "truth_in_pool": 105, + "truth_scoreable": 105, + "error_buckets": { + "covered_same_formula_wrong": 90, + "covered_wrong_formula": 2, + "correct": 13, + "truth_absent": 3 + }, + "mces": { + "n": 108, + "min": 0.0, + "median": 11.0, + "mean": 10.189814814814815, + "p95": 16.62499999999998, + "max": 40.0 + }, + "mces_missing": 0, + "candidates": { + "n": 108, + "min": 3, + "median": 2115.0, + "mean": 3500.564814814815, + "p95": 11608.849999999999, + "max": 19307 + }, + "whole_similarity_in_errors": { + "n": 95, + "min": 0.03636363636363636, + "median": 0.22807017543859648, + "mean": 0.3040679029820148, + "p95": 0.7713442622950819, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 9, + "acyclic_reference_in_errors": 11, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + } + }, + "polarity": { + "negative": { + "n": 196, + "targets": 196, + "key14": 196, + "hits": { + "1": 21, + "3": 38, + "5": 53, + "10": 77, + "20": 98, + "50": 132, + "100": 150, + "200": 163 + }, + "recall": { + "1": 0.10714285714285714, + "3": 0.19387755102040816, + "5": 0.27040816326530615, + "10": 0.39285714285714285, + "20": 0.5, + "50": 0.673469387755102, + "100": 0.7653061224489796, + "200": 0.8316326530612245 + }, + "formula_hits": { + "1": 164, + "2": 184, + "3": 187, + "4": 187, + "5": 187, + "6": 187, + "7": 187, + "8": 188, + "9": 188, + "10": 188 + }, + "truth_in_pool": 187, + "truth_scoreable": 187, + "error_buckets": { + "covered_same_formula_wrong": 161, + "covered_wrong_formula": 5, + "correct": 21, + "truth_absent": 9 + }, + "mces": { + "n": 195, + "min": 0.0, + "median": 13.0, + "mean": 11.51025641025641, + "p95": 22.5, + "max": 53.0 + }, + "mces_missing": 1, + "candidates": { + "n": 196, + "min": 0, + "median": 1494.5, + "mean": 3159.091836734694, + "p95": 11573.25, + "max": 19307 + }, + "whole_similarity_in_errors": { + "n": 174, + "min": 0.03296703296703297, + "median": 0.2628968253968254, + "mean": 0.32312272781419554, + "p95": 0.760783242258652, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 19, + "acyclic_reference_in_errors": 14, + "wrong_with_whole_similarity_ge_08": 6, + "reference_identity_conflicts": 0 + }, + "positive": { + "n": 304, + "targets": 304, + "key14": 302, + "hits": { + "1": 23, + "3": 56, + "5": 75, + "10": 107, + "20": 135, + "50": 187, + "100": 207, + "200": 227 + }, + "recall": { + "1": 0.0756578947368421, + "3": 0.18421052631578946, + "5": 0.24671052631578946, + "10": 0.3519736842105263, + "20": 0.4440789473684211, + "50": 0.6151315789473685, + "100": 0.680921052631579, + "200": 0.7467105263157895 + }, + "formula_hits": { + "1": 253, + "2": 263, + "3": 270, + "4": 276, + "5": 277, + "6": 279, + "7": 280, + "8": 280, + "9": 280, + "10": 280 + }, + "truth_in_pool": 280, + "truth_scoreable": 280, + "error_buckets": { + "covered_same_formula_wrong": 243, + "correct": 23, + "covered_wrong_formula": 14, + "truth_absent": 24 + }, + "mces": { + "n": 303, + "min": 0.0, + "median": 11.0, + "mean": 11.349834983498349, + "p95": 26.94999999999999, + "max": 85.0 + }, + "mces_missing": 1, + "candidates": { + "n": 304, + "min": 0, + "median": 2304.0, + "mean": 3770.5197368421054, + "p95": 11466.849999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 280, + "min": 0.0, + "median": 0.2, + "mean": 0.2985729380175016, + "p95": 0.7620709647495363, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 46, + "acyclic_reference_in_errors": 25, + "wrong_with_whole_similarity_ge_08": 11, + "reference_identity_conflicts": 0 + } + }, + "reference_has_halogen": { + "False": { + "n": 466, + "targets": 466, + "key14": 463, + "hits": { + "1": 40, + "3": 85, + "5": 115, + "10": 169, + "20": 217, + "50": 301, + "100": 338, + "200": 369 + }, + "recall": { + "1": 0.08583690987124463, + "3": 0.18240343347639484, + "5": 0.24678111587982832, + "10": 0.3626609442060086, + "20": 0.4656652360515021, + "50": 0.6459227467811158, + "100": 0.7253218884120172, + "200": 0.7918454935622318 + }, + "formula_hits": { + "1": 409, + "2": 434, + "3": 440, + "4": 442, + "5": 442, + "6": 443, + "7": 444, + "8": 444, + "9": 444, + "10": 444 + }, + "truth_in_pool": 443, + "truth_scoreable": 443, + "error_buckets": { + "covered_same_formula_wrong": 388, + "correct": 40, + "covered_wrong_formula": 15, + "truth_absent": 23 + }, + "mces": { + "n": 466, + "min": 0.0, + "median": 12.0, + "mean": 11.080472103004292, + "p95": 22.875, + "max": 73.5 + }, + "mces_missing": 0, + "candidates": { + "n": 466, + "min": 3, + "median": 2274.0, + "mean": 3706.1223175965665, + "p95": 11676.75, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 426, + "min": 0.0, + "median": 0.2054794520547945, + "mean": 0.3067257229508997, + "p95": 0.758379672536299, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 57, + "acyclic_reference_in_errors": 37, + "wrong_with_whole_similarity_ge_08": 16, + "reference_identity_conflicts": 0 + }, + "True": { + "n": 34, + "targets": 34, + "key14": 34, + "hits": { + "1": 4, + "3": 9, + "5": 13, + "10": 15, + "20": 16, + "50": 18, + "100": 19, + "200": 21 + }, + "recall": { + "1": 0.11764705882352941, + "3": 0.2647058823529412, + "5": 0.38235294117647056, + "10": 0.4411764705882353, + "20": 0.47058823529411764, + "50": 0.5294117647058824, + "100": 0.5588235294117647, + "200": 0.6176470588235294 + }, + "formula_hits": { + "1": 8, + "2": 13, + "3": 17, + "4": 21, + "5": 22, + "6": 23, + "7": 23, + "8": 24, + "9": 24, + "10": 24 + }, + "truth_in_pool": 24, + "truth_scoreable": 24, + "error_buckets": { + "covered_same_formula_wrong": 16, + "truth_absent": 10, + "covered_wrong_formula": 4, + "correct": 4 + }, + "mces": { + "n": 32, + "min": 0.0, + "median": 8.0, + "mean": 16.25, + "p95": 44.599999999999994, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 34, + "min": 0, + "median": 320.0, + "mean": 1128.4411764705883, + "p95": 5468.949999999998, + "max": 8254 + }, + "whole_similarity_in_errors": { + "n": 28, + "min": 0.03296703296703297, + "median": 0.17662337662337663, + "mean": 0.3270935466959715, + "p95": 0.776984126984127, + "max": 0.8913043478260869 + }, + "same_exact_nonempty_scaffold_in_errors": 8, + "acyclic_reference_in_errors": 2, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + } + }, + "reference_rings": { + "5": { + "n": 38, + "targets": 38, + "key14": 38, + "hits": { + "1": 6, + "3": 11, + "5": 16, + "10": 22, + "20": 24, + "50": 30, + "100": 31, + "200": 34 + }, + "recall": { + "1": 0.15789473684210525, + "3": 0.2894736842105263, + "5": 0.42105263157894735, + "10": 0.5789473684210527, + "20": 0.631578947368421, + "50": 0.7894736842105263, + "100": 0.8157894736842105, + "200": 0.8947368421052632 + }, + "formula_hits": { + "1": 34, + "2": 35, + "3": 35, + "4": 35, + "5": 35, + "6": 36, + "7": 36, + "8": 36, + "9": 36, + "10": 36 + }, + "truth_in_pool": 36, + "truth_scoreable": 36, + "error_buckets": { + "covered_same_formula_wrong": 28, + "correct": 6, + "truth_absent": 2, + "covered_wrong_formula": 2 + }, + "mces": { + "n": 38, + "min": 0.0, + "median": 9.0, + "mean": 11.355263157894736, + "p95": 33.8, + "max": 41.0 + }, + "mces_missing": 0, + "candidates": { + "n": 38, + "min": 3, + "median": 586.0, + "mean": 1628.921052631579, + "p95": 6105.55, + "max": 6583 + }, + "whole_similarity_in_errors": { + "n": 32, + "min": 0.03296703296703297, + "median": 0.2505014749262537, + "mean": 0.360261604466741, + "p95": 0.8364285714285714, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 4, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + }, + "8": { + "n": 15, + "targets": 15, + "key14": 15, + "hits": { + "1": 1, + "3": 2, + "5": 5, + "10": 5, + "20": 11, + "50": 13, + "100": 15, + "200": 15 + }, + "recall": { + "1": 0.06666666666666667, + "3": 0.13333333333333333, + "5": 0.3333333333333333, + "10": 0.3333333333333333, + "20": 0.7333333333333333, + "50": 0.8666666666666667, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 15, + "2": 15, + "3": 15, + "4": 15, + "5": 15, + "6": 15, + "7": 15, + "8": 15, + "9": 15, + "10": 15 + }, + "truth_in_pool": 15, + "truth_scoreable": 15, + "error_buckets": { + "covered_same_formula_wrong": 14, + "correct": 1 + }, + "mces": { + "n": 15, + "min": 0.0, + "median": 15.0, + "mean": 14.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 15, + "min": 12, + "median": 109.0, + "mean": 243.26666666666668, + "p95": 825.7999999999981, + "max": 2062 + }, + "whole_similarity_in_errors": { + "n": 14, + "min": 0.13821138211382114, + "median": 0.5607688947138488, + "mean": 0.5340386755200406, + "p95": 0.7846713098729228, + "max": 0.8279569892473119 + }, + "same_exact_nonempty_scaffold_in_errors": 4, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "0": { + "n": 44, + "targets": 44, + "key14": 44, + "hits": { + "1": 5, + "3": 7, + "5": 10, + "10": 12, + "20": 15, + "50": 24, + "100": 26, + "200": 31 + }, + "recall": { + "1": 0.11363636363636363, + "3": 0.1590909090909091, + "5": 0.22727272727272727, + "10": 0.2727272727272727, + "20": 0.3409090909090909, + "50": 0.5454545454545454, + "100": 0.5909090909090909, + "200": 0.7045454545454546 + }, + "formula_hits": { + "1": 34, + "2": 36, + "3": 36, + "4": 36, + "5": 36, + "6": 36, + "7": 36, + "8": 37, + "9": 37, + "10": 37 + }, + "truth_in_pool": 37, + "truth_scoreable": 37, + "error_buckets": { + "correct": 5, + "covered_same_formula_wrong": 31, + "truth_absent": 7, + "covered_wrong_formula": 1 + }, + "mces": { + "n": 43, + "min": 0.0, + "median": 6.0, + "mean": 7.941860465116279, + "p95": 18.9, + "max": 24.0 + }, + "mces_missing": 1, + "candidates": { + "n": 44, + "min": 0, + "median": 4590.5, + "mean": 4975.409090909091, + "p95": 12583.1, + "max": 19307 + }, + "whole_similarity_in_errors": { + "n": 38, + "min": 0.0, + "median": 0.18019480519480519, + "mean": 0.23709364903590371, + "p95": 0.6146511627906975, + "max": 0.7555555555555555 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "3": { + "n": 101, + "targets": 101, + "key14": 101, + "hits": { + "1": 8, + "3": 20, + "5": 24, + "10": 34, + "20": 41, + "50": 66, + "100": 71, + "200": 81 + }, + "recall": { + "1": 0.07920792079207921, + "3": 0.19801980198019803, + "5": 0.2376237623762376, + "10": 0.33663366336633666, + "20": 0.40594059405940597, + "50": 0.6534653465346535, + "100": 0.7029702970297029, + "200": 0.801980198019802 + }, + "formula_hits": { + "1": 85, + "2": 90, + "3": 92, + "4": 94, + "5": 95, + "6": 95, + "7": 95, + "8": 95, + "9": 95, + "10": 95 + }, + "truth_in_pool": 95, + "truth_scoreable": 95, + "error_buckets": { + "covered_same_formula_wrong": 84, + "covered_wrong_formula": 3, + "truth_absent": 6, + "correct": 8 + }, + "mces": { + "n": 101, + "min": 0.0, + "median": 10.0, + "mean": 10.722772277227723, + "p95": 22.0, + "max": 73.5 + }, + "mces_missing": 0, + "candidates": { + "n": 101, + "min": 3, + "median": 3928.0, + "mean": 4899.207920792079, + "p95": 12012.0, + "max": 19909 + }, + "whole_similarity_in_errors": { + "n": 93, + "min": 0.05714285714285714, + "median": 0.20481927710843373, + "mean": 0.30908358450321877, + "p95": 0.718150448585231, + "max": 0.9148936170212766 + }, + "same_exact_nonempty_scaffold_in_errors": 14, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "9": { + "n": 12, + "targets": 12, + "key14": 12, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 2, + "20": 7, + "50": 8, + "100": 12, + "200": 12 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 0.16666666666666666, + "20": 0.5833333333333334, + "50": 0.6666666666666666, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 12, + "2": 12, + "3": 12, + "4": 12, + "5": 12, + "6": 12, + "7": 12, + "8": 12, + "9": 12, + "10": 12 + }, + "truth_in_pool": 12, + "truth_scoreable": 12, + "error_buckets": { + "covered_same_formula_wrong": 12 + }, + "mces": { + "n": 12, + "min": 15.0, + "median": 15.0, + "mean": 15.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 12, + "min": 28, + "median": 59.0, + "mean": 87.75, + "p95": 188.14999999999992, + "max": 236 + }, + "whole_similarity_in_errors": { + "n": 12, + "min": 0.19696969696969696, + "median": 0.5282067782067783, + "mean": 0.5394287409757472, + "p95": 0.7489609181141438, + "max": 0.8064516129032258 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "4": { + "n": 66, + "targets": 66, + "key14": 66, + "hits": { + "1": 6, + "3": 12, + "5": 16, + "10": 29, + "20": 41, + "50": 49, + "100": 55, + "200": 58 + }, + "recall": { + "1": 0.09090909090909091, + "3": 0.18181818181818182, + "5": 0.24242424242424243, + "10": 0.4393939393939394, + "20": 0.6212121212121212, + "50": 0.7424242424242424, + "100": 0.8333333333333334, + "200": 0.8787878787878788 + }, + "formula_hits": { + "1": 56, + "2": 58, + "3": 63, + "4": 65, + "5": 65, + "6": 65, + "7": 65, + "8": 65, + "9": 65, + "10": 65 + }, + "truth_in_pool": 65, + "truth_scoreable": 65, + "error_buckets": { + "covered_wrong_formula": 5, + "covered_same_formula_wrong": 54, + "correct": 6, + "truth_absent": 1 + }, + "mces": { + "n": 66, + "min": 0.0, + "median": 14.5, + "mean": 11.856060606060606, + "p95": 23.875, + "max": 60.5 + }, + "mces_missing": 0, + "candidates": { + "n": 66, + "min": 9, + "median": 1306.0, + "mean": 2700.7272727272725, + "p95": 6009.25, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 60, + "min": 0.06493506493506493, + "median": 0.20478769875939193, + "mean": 0.29211176674190037, + "p95": 0.774175005322546, + "max": 0.9014084507042254 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + }, + "2": { + "n": 104, + "targets": 104, + "key14": 102, + "hits": { + "1": 10, + "3": 17, + "5": 24, + "10": 31, + "20": 40, + "50": 55, + "100": 63, + "200": 71 + }, + "recall": { + "1": 0.09615384615384616, + "3": 0.16346153846153846, + "5": 0.23076923076923078, + "10": 0.2980769230769231, + "20": 0.38461538461538464, + "50": 0.5288461538461539, + "100": 0.6057692307692307, + "200": 0.6826923076923077 + }, + "formula_hits": { + "1": 85, + "2": 93, + "3": 94, + "4": 94, + "5": 94, + "6": 94, + "7": 94, + "8": 94, + "9": 94, + "10": 94 + }, + "truth_in_pool": 94, + "truth_scoreable": 94, + "error_buckets": { + "covered_wrong_formula": 3, + "covered_same_formula_wrong": 81, + "correct": 10, + "truth_absent": 10 + }, + "mces": { + "n": 104, + "min": 0.0, + "median": 11.0, + "mean": 11.83173076923077, + "p95": 24.424999999999997, + "max": 85.0 + }, + "mces_missing": 0, + "candidates": { + "n": 104, + "min": 1, + "median": 3784.5, + "mean": 4744.173076923077, + "p95": 13032.749999999996, + "max": 16154 + }, + "whole_similarity_in_errors": { + "n": 94, + "min": 0.05333333333333334, + "median": 0.1785933346963811, + "mean": 0.23053540835108965, + "p95": 0.5999482401656314, + "max": 0.6666666666666666 + }, + "same_exact_nonempty_scaffold_in_errors": 15, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "7": { + "n": 23, + "targets": 23, + "key14": 22, + "hits": { + "1": 4, + "3": 5, + "5": 7, + "10": 9, + "20": 10, + "50": 16, + "100": 21, + "200": 22 + }, + "recall": { + "1": 0.17391304347826086, + "3": 0.21739130434782608, + "5": 0.30434782608695654, + "10": 0.391304347826087, + "20": 0.43478260869565216, + "50": 0.6956521739130435, + "100": 0.9130434782608695, + "200": 0.9565217391304348 + }, + "formula_hits": { + "1": 22, + "2": 23, + "3": 23, + "4": 23, + "5": 23, + "6": 23, + "7": 23, + "8": 23, + "9": 23, + "10": 23 + }, + "truth_in_pool": 23, + "truth_scoreable": 23, + "error_buckets": { + "covered_same_formula_wrong": 18, + "covered_wrong_formula": 1, + "correct": 4 + }, + "mces": { + "n": 23, + "min": 0.0, + "median": 15.0, + "mean": 14.521739130434783, + "p95": 25.799999999999983, + "max": 53.0 + }, + "mces_missing": 0, + "candidates": { + "n": 23, + "min": 3, + "median": 177.0, + "mean": 266.04347826086956, + "p95": 825.9, + "max": 1056 + }, + "whole_similarity_in_errors": { + "n": 19, + "min": 0.08823529411764706, + "median": 0.20212765957446807, + "mean": 0.3809693371211492, + "p95": 0.8738071895424836, + "max": 0.9027777777777778 + }, + "same_exact_nonempty_scaffold_in_errors": 2, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "6": { + "n": 26, + "targets": 26, + "key14": 26, + "hits": { + "1": 2, + "3": 8, + "5": 8, + "10": 13, + "20": 16, + "50": 20, + "100": 21, + "200": 21 + }, + "recall": { + "1": 0.07692307692307693, + "3": 0.3076923076923077, + "5": 0.3076923076923077, + "10": 0.5, + "20": 0.6153846153846154, + "50": 0.7692307692307693, + "100": 0.8076923076923077, + "200": 0.8076923076923077 + }, + "formula_hits": { + "1": 20, + "2": 21, + "3": 22, + "4": 24, + "5": 24, + "6": 24, + "7": 25, + "8": 25, + "9": 25, + "10": 25 + }, + "truth_in_pool": 25, + "truth_scoreable": 25, + "error_buckets": { + "covered_same_formula_wrong": 20, + "correct": 2, + "covered_wrong_formula": 3, + "truth_absent": 1 + }, + "mces": { + "n": 26, + "min": 0.0, + "median": 13.5, + "mean": 13.076923076923077, + "p95": 39.0, + "max": 48.0 + }, + "mces_missing": 0, + "candidates": { + "n": 26, + "min": 26, + "median": 302.0, + "mean": 1429.076923076923, + "p95": 5413.0, + "max": 8891 + }, + "whole_similarity_in_errors": { + "n": 24, + "min": 0.047619047619047616, + "median": 0.41340537383177567, + "mean": 0.42693891514045973, + "p95": 0.9836956521739129, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 8, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + }, + "1": { + "n": 57, + "targets": 57, + "key14": 57, + "hits": { + "1": 1, + "3": 8, + "5": 11, + "10": 16, + "20": 17, + "50": 25, + "100": 28, + "200": 31 + }, + "recall": { + "1": 0.017543859649122806, + "3": 0.14035087719298245, + "5": 0.19298245614035087, + "10": 0.2807017543859649, + "20": 0.2982456140350877, + "50": 0.43859649122807015, + "100": 0.49122807017543857, + "200": 0.543859649122807 + }, + "formula_hits": { + "1": 40, + "2": 50, + "3": 51, + "4": 51, + "5": 51, + "6": 52, + "7": 52, + "8": 52, + "9": 52, + "10": 52 + }, + "truth_in_pool": 51, + "truth_scoreable": 51, + "error_buckets": { + "covered_same_formula_wrong": 49, + "truth_absent": 6, + "covered_wrong_formula": 1, + "correct": 1 + }, + "mces": { + "n": 56, + "min": 0.0, + "median": 9.25, + "mean": 9.919642857142858, + "p95": 22.625, + "max": 35.0 + }, + "mces_missing": 1, + "candidates": { + "n": 57, + "min": 0, + "median": 4427.0, + "mean": 4730.964912280701, + "p95": 11495.999999999985, + "max": 23013 + }, + "whole_similarity_in_errors": { + "n": 55, + "min": 0.031746031746031744, + "median": 0.1746031746031746, + "mean": 0.22853598375206471, + "p95": 0.4994152046783625, + "max": 0.9 + }, + "same_exact_nonempty_scaffold_in_errors": 16, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "10": { + "n": 10, + "targets": 10, + "key14": 10, + "hits": { + "1": 1, + "3": 3, + "5": 5, + "10": 8, + "20": 8, + "50": 9, + "100": 10, + "200": 10 + }, + "recall": { + "1": 0.1, + "3": 0.3, + "5": 0.5, + "10": 0.8, + "20": 0.8, + "50": 0.9, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 10, + "2": 10, + "3": 10, + "4": 10, + "5": 10, + "6": 10, + "7": 10, + "8": 10, + "9": 10, + "10": 10 + }, + "truth_in_pool": 10, + "truth_scoreable": 10, + "error_buckets": { + "covered_same_formula_wrong": 9, + "correct": 1 + }, + "mces": { + "n": 10, + "min": 0.0, + "median": 15.0, + "mean": 13.5, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 10, + "min": 10, + "median": 28.5, + "mean": 39.8, + "p95": 98.94999999999999, + "max": 103 + }, + "whole_similarity_in_errors": { + "n": 9, + "min": 0.39669421487603307, + "median": 0.5454545454545454, + "mean": 0.5781442780118902, + "p95": 0.8270036581310275, + "max": 0.9247311827956989 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "11": { + "n": 1, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 0, + "20": 0, + "50": 1, + "100": 1, + "200": 1 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 0.0, + "20": 0.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1 + }, + "truth_in_pool": 1, + "truth_scoreable": 1, + "error_buckets": { + "covered_same_formula_wrong": 1 + }, + "mces": { + "n": 1, + "min": 15.0, + "median": 15.0, + "mean": 15.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1, + "min": 70, + "median": 70.0, + "mean": 70, + "p95": 70.0, + "max": 70 + }, + "whole_similarity_in_errors": { + "n": 1, + "min": 0.48333333333333334, + "median": 0.48333333333333334, + "mean": 0.48333333333333334, + "p95": 0.48333333333333334, + "max": 0.48333333333333334 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "13": { + "n": 1, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 1, + "5": 1, + "10": 1, + "20": 1, + "50": 1, + "100": 1, + "200": 1 + }, + "recall": { + "1": 0.0, + "3": 1.0, + "5": 1.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1 + }, + "truth_in_pool": 1, + "truth_scoreable": 1, + "error_buckets": { + "covered_same_formula_wrong": 1 + }, + "mces": { + "n": 1, + "min": 15.0, + "median": 15.0, + "mean": 15.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1, + "min": 7, + "median": 7.0, + "mean": 7, + "p95": 7.0, + "max": 7 + }, + "whole_similarity_in_errors": { + "n": 1, + "min": 1.0, + "median": 1.0, + "mean": 1.0, + "p95": 1.0, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "17": { + "n": 1, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 1, + "20": 1, + "50": 1, + "100": 1, + "200": 1 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1 + }, + "truth_in_pool": 1, + "truth_scoreable": 1, + "error_buckets": { + "covered_same_formula_wrong": 1 + }, + "mces": { + "n": 1, + "min": 15.0, + "median": 15.0, + "mean": 15.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1, + "min": 14, + "median": 14.0, + "mean": 14, + "p95": 14.0, + "max": 14 + }, + "whole_similarity_in_errors": { + "n": 1, + "min": 0.28662420382165604, + "median": 0.28662420382165604, + "mean": 0.28662420382165604, + "p95": 0.28662420382165604, + "max": 0.28662420382165604 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "14": { + "n": 1, + "targets": 1, + "key14": 1, + "hits": { + "1": 0, + "3": 0, + "5": 1, + "10": 1, + "20": 1, + "50": 1, + "100": 1, + "200": 1 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 1.0, + "10": 1.0, + "20": 1.0, + "50": 1.0, + "100": 1.0, + "200": 1.0 + }, + "formula_hits": { + "1": 1, + "2": 1, + "3": 1, + "4": 1, + "5": 1, + "6": 1, + "7": 1, + "8": 1, + "9": 1, + "10": 1 + }, + "truth_in_pool": 1, + "truth_scoreable": 1, + "error_buckets": { + "covered_same_formula_wrong": 1 + }, + "mces": { + "n": 1, + "min": 15.0, + "median": 15.0, + "mean": 15.0, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 1, + "min": 10, + "median": 10.0, + "mean": 10, + "p95": 10.0, + "max": 10 + }, + "whole_similarity_in_errors": { + "n": 1, + "min": 0.36666666666666664, + "median": 0.36666666666666664, + "mean": 0.36666666666666664, + "p95": 0.36666666666666664, + "max": 0.36666666666666664 + }, + "same_exact_nonempty_scaffold_in_errors": 0, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + } + }, + "candidate_size": { + "1025-4096": { + "n": 119, + "targets": 119, + "key14": 117, + "hits": { + "1": 9, + "3": 19, + "5": 29, + "10": 40, + "20": 54, + "50": 75, + "100": 83, + "200": 90 + }, + "recall": { + "1": 0.07563025210084033, + "3": 0.15966386554621848, + "5": 0.24369747899159663, + "10": 0.33613445378151263, + "20": 0.453781512605042, + "50": 0.6302521008403361, + "100": 0.6974789915966386, + "200": 0.7563025210084033 + }, + "formula_hits": { + "1": 96, + "2": 105, + "3": 109, + "4": 111, + "5": 111, + "6": 113, + "7": 114, + "8": 114, + "9": 114, + "10": 114 + }, + "truth_in_pool": 113, + "truth_scoreable": 113, + "error_buckets": { + "covered_same_formula_wrong": 95, + "covered_wrong_formula": 9, + "truth_absent": 6, + "correct": 9 + }, + "mces": { + "n": 119, + "min": 0.0, + "median": 12.0, + "mean": 11.470588235294118, + "p95": 25.14999999999999, + "max": 48.0 + }, + "mces_missing": 0, + "candidates": { + "n": 119, + "min": 1043, + "median": 2305.0, + "mean": 2369.8823529411766, + "p95": 3928.0, + "max": 4014 + }, + "whole_similarity_in_errors": { + "n": 110, + "min": 0.047619047619047616, + "median": 0.1760731319554849, + "mean": 0.2546839065916687, + "p95": 0.6809999999999999, + "max": 0.9148936170212766 + }, + "same_exact_nonempty_scaffold_in_errors": 15, + "acyclic_reference_in_errors": 3, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "65-256": { + "n": 56, + "targets": 56, + "key14": 56, + "hits": { + "1": 5, + "3": 15, + "5": 19, + "10": 26, + "20": 36, + "50": 47, + "100": 55, + "200": 55 + }, + "recall": { + "1": 0.08928571428571429, + "3": 0.26785714285714285, + "5": 0.3392857142857143, + "10": 0.4642857142857143, + "20": 0.6428571428571429, + "50": 0.8392857142857143, + "100": 0.9821428571428571, + "200": 0.9821428571428571 + }, + "formula_hits": { + "1": 49, + "2": 52, + "3": 53, + "4": 54, + "5": 55, + "6": 55, + "7": 55, + "8": 55, + "9": 55, + "10": 55 + }, + "truth_in_pool": 55, + "truth_scoreable": 55, + "error_buckets": { + "covered_same_formula_wrong": 48, + "correct": 5, + "covered_wrong_formula": 2, + "truth_absent": 1 + }, + "mces": { + "n": 56, + "min": 0.0, + "median": 15.0, + "mean": 12.946428571428571, + "p95": 29.375, + "max": 53.0 + }, + "mces_missing": 0, + "candidates": { + "n": 56, + "min": 65, + "median": 136.5, + "mean": 143.33928571428572, + "p95": 240.0, + "max": 256 + }, + "whole_similarity_in_errors": { + "n": 51, + "min": 0.09027777777777778, + "median": 0.5405405405405406, + "mean": 0.5099227086474369, + "p95": 0.8651337247227657, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 11, + "acyclic_reference_in_errors": 1, + "wrong_with_whole_similarity_ge_08": 7, + "reference_identity_conflicts": 0 + }, + "257-1024": { + "n": 86, + "targets": 86, + "key14": 86, + "hits": { + "1": 9, + "3": 18, + "5": 27, + "10": 41, + "20": 51, + "50": 64, + "100": 74, + "200": 79 + }, + "recall": { + "1": 0.10465116279069768, + "3": 0.20930232558139536, + "5": 0.313953488372093, + "10": 0.47674418604651164, + "20": 0.5930232558139535, + "50": 0.7441860465116279, + "100": 0.8604651162790697, + "200": 0.9186046511627907 + }, + "formula_hits": { + "1": 76, + "2": 80, + "3": 80, + "4": 80, + "5": 80, + "6": 80, + "7": 80, + "8": 80, + "9": 80, + "10": 80 + }, + "truth_in_pool": 80, + "truth_scoreable": 80, + "error_buckets": { + "correct": 9, + "covered_same_formula_wrong": 70, + "covered_wrong_formula": 1, + "truth_absent": 6 + }, + "mces": { + "n": 86, + "min": 0.0, + "median": 8.0, + "mean": 9.732558139534884, + "p95": 23.375, + "max": 35.5 + }, + "mces_missing": 0, + "candidates": { + "n": 86, + "min": 258, + "median": 557.5, + "mean": 570.0581395348837, + "p95": 946.75, + "max": 1014 + }, + "whole_similarity_in_errors": { + "n": 77, + "min": 0.0, + "median": 0.2727272727272727, + "mean": 0.35383626591786793, + "p95": 0.7742222222222223, + "max": 0.9014084507042254 + }, + "same_exact_nonempty_scaffold_in_errors": 12, + "acyclic_reference_in_errors": 8, + "wrong_with_whole_similarity_ge_08": 2, + "reference_identity_conflicts": 0 + }, + "4097-16384": { + "n": 173, + "targets": 173, + "key14": 173, + "hits": { + "1": 8, + "3": 20, + "5": 24, + "10": 37, + "20": 47, + "50": 85, + "100": 96, + "200": 117 + }, + "recall": { + "1": 0.046242774566473986, + "3": 0.11560693641618497, + "5": 0.13872832369942195, + "10": 0.2138728323699422, + "20": 0.27167630057803466, + "50": 0.4913294797687861, + "100": 0.5549132947976878, + "200": 0.6763005780346821 + }, + "formula_hits": { + "1": 154, + "2": 166, + "3": 168, + "4": 169, + "5": 169, + "6": 169, + "7": 169, + "8": 169, + "9": 169, + "10": 169 + }, + "truth_in_pool": 169, + "truth_scoreable": 169, + "error_buckets": { + "covered_same_formula_wrong": 155, + "truth_absent": 4, + "covered_wrong_formula": 6, + "correct": 8 + }, + "mces": { + "n": 173, + "min": 0.0, + "median": 10.0, + "mean": 10.38728323699422, + "p95": 18.400000000000006, + "max": 41.0 + }, + "mces_missing": 0, + "candidates": { + "n": 173, + "min": 4137, + "median": 6682.0, + "mean": 7682.606936416185, + "p95": 13830.6, + "max": 16349 + }, + "whole_similarity_in_errors": { + "n": 165, + "min": 0.022727272727272728, + "median": 0.17582417582417584, + "mean": 0.22626985504735223, + "p95": 0.5292356185973205, + "max": 0.6851851851851852 + }, + "same_exact_nonempty_scaffold_in_errors": 20, + "acyclic_reference_in_errors": 20, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "<=64": { + "n": 62, + "targets": 62, + "key14": 61, + "hits": { + "1": 13, + "3": 22, + "5": 29, + "10": 39, + "20": 44, + "50": 46, + "100": 46, + "200": 46 + }, + "recall": { + "1": 0.20967741935483872, + "3": 0.3548387096774194, + "5": 0.46774193548387094, + "10": 0.6290322580645161, + "20": 0.7096774193548387, + "50": 0.7419354838709677, + "100": 0.7419354838709677, + "200": 0.7419354838709677 + }, + "formula_hits": { + "1": 39, + "2": 41, + "3": 43, + "4": 45, + "5": 45, + "6": 45, + "7": 45, + "8": 46, + "9": 46, + "10": 46 + }, + "truth_in_pool": 46, + "truth_scoreable": 46, + "error_buckets": { + "covered_same_formula_wrong": 33, + "correct": 13, + "truth_absent": 16 + }, + "mces": { + "n": 60, + "min": 0.0, + "median": 15.0, + "mean": 15.325, + "p95": 49.57499999999997, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 62, + "min": 0, + "median": 27.0, + "mean": 26.919354838709676, + "p95": 55.84999999999999, + "max": 63 + }, + "whole_similarity_in_errors": { + "n": 47, + "min": 0.06040268456375839, + "median": 0.44525547445255476, + "mean": 0.4329625879092696, + "p95": 0.9181451612903224, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 6, + "acyclic_reference_in_errors": 6, + "wrong_with_whole_similarity_ge_08": 6, + "reference_identity_conflicts": 0 + }, + ">16384": { + "n": 4, + "targets": 4, + "key14": 4, + "hits": { + "1": 0, + "3": 0, + "5": 0, + "10": 1, + "20": 1, + "50": 2, + "100": 3, + "200": 3 + }, + "recall": { + "1": 0.0, + "3": 0.0, + "5": 0.0, + "10": 0.25, + "20": 0.25, + "50": 0.5, + "100": 0.75, + "200": 0.75 + }, + "formula_hits": { + "1": 3, + "2": 3, + "3": 4, + "4": 4, + "5": 4, + "6": 4, + "7": 4, + "8": 4, + "9": 4, + "10": 4 + }, + "truth_in_pool": 4, + "truth_scoreable": 4, + "error_buckets": { + "covered_wrong_formula": 1, + "covered_same_formula_wrong": 3 + }, + "mces": { + "n": 4, + "min": 2.0, + "median": 9.0, + "mean": 10.0, + "p95": 18.799999999999997, + "max": 20.0 + }, + "mces_missing": 0, + "candidates": { + "n": 4, + "min": 19307, + "median": 21461.0, + "mean": 23898, + "p95": 31810.499999999996, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 4, + "min": 0.10344827586206896, + "median": 0.24208333333333332, + "mean": 0.21833230706075532, + "p95": 0.28348214285714285, + "max": 0.2857142857142857 + }, + "same_exact_nonempty_scaffold_in_errors": 1, + "acyclic_reference_in_errors": 1, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + } + }, + "true_formula_size": { + "65-256": { + "n": 112, + "targets": 112, + "key14": 112, + "hits": { + "1": 10, + "3": 20, + "5": 31, + "10": 50, + "20": 68, + "50": 94, + "100": 109, + "200": 109 + }, + "recall": { + "1": 0.08928571428571429, + "3": 0.17857142857142858, + "5": 0.2767857142857143, + "10": 0.44642857142857145, + "20": 0.6071428571428571, + "50": 0.8392857142857143, + "100": 0.9732142857142857, + "200": 0.9732142857142857 + }, + "formula_hits": { + "1": 103, + "2": 108, + "3": 110, + "4": 111, + "5": 111, + "6": 112, + "7": 112, + "8": 112, + "9": 112, + "10": 112 + }, + "truth_in_pool": 112, + "truth_scoreable": 112, + "error_buckets": { + "covered_same_formula_wrong": 97, + "correct": 10, + "covered_wrong_formula": 5 + }, + "mces": { + "n": 112, + "min": 0.0, + "median": 12.0, + "mean": 10.049107142857142, + "p95": 19.44999999999999, + "max": 53.0 + }, + "mces_missing": 0, + "candidates": { + "n": 112, + "min": 93, + "median": 575.0, + "mean": 1225.017857142857, + "p95": 4327.149999999997, + "max": 6551 + }, + "whole_similarity_in_errors": { + "n": 102, + "min": 0.07692307692307693, + "median": 0.3997683993823984, + "mean": 0.4184801040719463, + "p95": 0.7960163652024116, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 21, + "acyclic_reference_in_errors": 2, + "wrong_with_whole_similarity_ge_08": 5, + "reference_identity_conflicts": 0 + }, + "17-64": { + "n": 66, + "targets": 66, + "key14": 65, + "hits": { + "1": 10, + "3": 24, + "5": 35, + "10": 47, + "20": 59, + "50": 64, + "100": 64, + "200": 65 + }, + "recall": { + "1": 0.15151515151515152, + "3": 0.36363636363636365, + "5": 0.5303030303030303, + "10": 0.7121212121212122, + "20": 0.8939393939393939, + "50": 0.9696969696969697, + "100": 0.9696969696969697, + "200": 0.9848484848484849 + }, + "formula_hits": { + "1": 59, + "2": 62, + "3": 63, + "4": 64, + "5": 65, + "6": 66, + "7": 66, + "8": 66, + "9": 66, + "10": 66 + }, + "truth_in_pool": 66, + "truth_scoreable": 66, + "error_buckets": { + "covered_same_formula_wrong": 54, + "covered_wrong_formula": 2, + "correct": 10 + }, + "mces": { + "n": 66, + "min": 0.0, + "median": 15.0, + "mean": 10.492424242424242, + "p95": 15.0, + "max": 33.0 + }, + "mces_missing": 0, + "candidates": { + "n": 66, + "min": 19, + "median": 96.5, + "mean": 251.65151515151516, + "p95": 1195.75, + "max": 1787 + }, + "whole_similarity_in_errors": { + "n": 56, + "min": 0.06779661016949153, + "median": 0.5099690282617112, + "mean": 0.49500474648654935, + "p95": 0.9017507824726134, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 9, + "acyclic_reference_in_errors": 0, + "wrong_with_whole_similarity_ge_08": 8, + "reference_identity_conflicts": 0 + }, + "257-1024": { + "n": 91, + "targets": 91, + "key14": 91, + "hits": { + "1": 8, + "3": 14, + "5": 18, + "10": 28, + "20": 36, + "50": 57, + "100": 68, + "200": 78 + }, + "recall": { + "1": 0.08791208791208792, + "3": 0.15384615384615385, + "5": 0.1978021978021978, + "10": 0.3076923076923077, + "20": 0.3956043956043956, + "50": 0.6263736263736264, + "100": 0.7472527472527473, + "200": 0.8571428571428571 + }, + "formula_hits": { + "1": 81, + "2": 84, + "3": 88, + "4": 90, + "5": 90, + "6": 90, + "7": 91, + "8": 91, + "9": 91, + "10": 91 + }, + "truth_in_pool": 91, + "truth_scoreable": 91, + "error_buckets": { + "covered_same_formula_wrong": 76, + "covered_wrong_formula": 7, + "correct": 8 + }, + "mces": { + "n": 91, + "min": 0.0, + "median": 12.0, + "mean": 10.824175824175825, + "p95": 22.5, + "max": 48.0 + }, + "mces_missing": 0, + "candidates": { + "n": 91, + "min": 367, + "median": 3122.0, + "mean": 4049.3736263736264, + "p95": 10511.0, + "max": 16349 + }, + "whole_similarity_in_errors": { + "n": 83, + "min": 0.0, + "median": 0.19387755102040816, + "mean": 0.26365282738913953, + "p95": 0.6478260869565213, + "max": 0.9 + }, + "same_exact_nonempty_scaffold_in_errors": 7, + "acyclic_reference_in_errors": 10, + "wrong_with_whole_similarity_ge_08": 1, + "reference_identity_conflicts": 0 + }, + "1025-4096": { + "n": 108, + "targets": 108, + "key14": 107, + "hits": { + "1": 5, + "3": 14, + "5": 18, + "10": 22, + "20": 30, + "50": 52, + "100": 59, + "200": 73 + }, + "recall": { + "1": 0.046296296296296294, + "3": 0.12962962962962962, + "5": 0.16666666666666666, + "10": 0.2037037037037037, + "20": 0.2777777777777778, + "50": 0.48148148148148145, + "100": 0.5462962962962963, + "200": 0.6759259259259259 + }, + "formula_hits": { + "1": 94, + "2": 106, + "3": 107, + "4": 108, + "5": 108, + "6": 108, + "7": 108, + "8": 108, + "9": 108, + "10": 108 + }, + "truth_in_pool": 107, + "truth_scoreable": 107, + "error_buckets": { + "covered_wrong_formula": 4, + "covered_same_formula_wrong": 98, + "correct": 5, + "truth_absent": 1 + }, + "mces": { + "n": 108, + "min": 0.0, + "median": 12.0, + "mean": 10.402777777777779, + "p95": 16.14999999999999, + "max": 31.5 + }, + "mces_missing": 0, + "candidates": { + "n": 108, + "min": 1237, + "median": 4467.0, + "mean": 5600.074074074074, + "p95": 13671.299999999994, + "max": 19909 + }, + "whole_similarity_in_errors": { + "n": 103, + "min": 0.05714285714285714, + "median": 0.1728395061728395, + "mean": 0.21763026294837665, + "p95": 0.49112487100103197, + "max": 0.6976744186046512 + }, + "same_exact_nonempty_scaffold_in_errors": 17, + "acyclic_reference_in_errors": 5, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + ">4096": { + "n": 63, + "targets": 63, + "key14": 63, + "hits": { + "1": 0, + "3": 4, + "5": 5, + "10": 10, + "20": 12, + "50": 24, + "100": 29, + "200": 37 + }, + "recall": { + "1": 0.0, + "3": 0.06349206349206349, + "5": 0.07936507936507936, + "10": 0.15873015873015872, + "20": 0.19047619047619047, + "50": 0.38095238095238093, + "100": 0.4603174603174603, + "200": 0.5873015873015873 + }, + "formula_hits": { + "1": 59, + "2": 63, + "3": 63, + "4": 63, + "5": 63, + "6": 63, + "7": 63, + "8": 63, + "9": 63, + "10": 63 + }, + "truth_in_pool": 63, + "truth_scoreable": 63, + "error_buckets": { + "covered_same_formula_wrong": 63 + }, + "mces": { + "n": 63, + "min": 2.0, + "median": 10.0, + "mean": 9.214285714285714, + "p95": 15.0, + "max": 15.0 + }, + "mces_missing": 0, + "candidates": { + "n": 63, + "min": 4656, + "median": 8891.0, + "mean": 9426.111111111111, + "p95": 14810.6, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 63, + "min": 0.03636363636363636, + "median": 0.17543859649122806, + "mean": 0.20492760305224522, + "p95": 0.4808392315470171, + "max": 0.6382978723404256 + }, + "same_exact_nonempty_scaffold_in_errors": 8, + "acyclic_reference_in_errors": 13, + "wrong_with_whole_similarity_ge_08": 0, + "reference_identity_conflicts": 0 + }, + "<=16": { + "n": 60, + "targets": 60, + "key14": 60, + "hits": { + "1": 11, + "3": 18, + "5": 21, + "10": 27, + "20": 28, + "50": 28, + "100": 28, + "200": 28 + }, + "recall": { + "1": 0.18333333333333332, + "3": 0.3, + "5": 0.35, + "10": 0.45, + "20": 0.4666666666666667, + "50": 0.4666666666666667, + "100": 0.4666666666666667, + "200": 0.4666666666666667 + }, + "formula_hits": { + "1": 21, + "2": 24, + "3": 26, + "4": 27, + "5": 27, + "6": 27, + "7": 27, + "8": 28, + "9": 28, + "10": 28 + }, + "truth_in_pool": 28, + "truth_scoreable": 28, + "error_buckets": { + "correct": 11, + "truth_absent": 32, + "covered_same_formula_wrong": 16, + "covered_wrong_formula": 1 + }, + "mces": { + "n": 58, + "min": 0.0, + "median": 17.5, + "mean": 20.28448275862069, + "p95": 50.72499999999998, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 60, + "min": 0, + "median": 32.0, + "mean": 741.05, + "p95": 4477.4, + "max": 12587 + }, + "whole_similarity_in_errors": { + "n": 47, + "min": 0.022727272727272728, + "median": 0.13829787234042554, + "mean": 0.2597659599300504, + "p95": 0.8211872146118717, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 3, + "acyclic_reference_in_errors": 9, + "wrong_with_whole_similarity_ge_08": 3, + "reference_identity_conflicts": 0 + } + }, + "peak_count": { + "unknown": { + "n": 500, + "targets": 500, + "key14": 497, + "hits": { + "1": 44, + "3": 94, + "5": 128, + "10": 184, + "20": 233, + "50": 319, + "100": 357, + "200": 390 + }, + "recall": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "formula_hits": { + "1": 417, + "2": 447, + "3": 457, + "4": 463, + "5": 464, + "6": 466, + "7": 467, + "8": 468, + "9": 468, + "10": 468 + }, + "truth_in_pool": 467, + "truth_scoreable": 467, + "error_buckets": { + "covered_same_formula_wrong": 404, + "correct": 44, + "covered_wrong_formula": 19, + "truth_absent": 33 + }, + "mces": { + "n": 498, + "min": 0.0, + "median": 12.0, + "mean": 11.412650602409638, + "p95": 26.07499999999999, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 500, + "min": 0, + "median": 2036.5, + "mean": 3530.84, + "p95": 11555.449999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 454, + "min": 0.0, + "median": 0.20530382859149982, + "mean": 0.30798188829200546, + "p95": 0.7645584947839043, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 65, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 17, + "reference_identity_conflicts": 0 + } + }, + "precursor_mass": { + "unknown": { + "n": 500, + "targets": 500, + "key14": 497, + "hits": { + "1": 44, + "3": 94, + "5": 128, + "10": 184, + "20": 233, + "50": 319, + "100": 357, + "200": 390 + }, + "recall": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "formula_hits": { + "1": 417, + "2": 447, + "3": 457, + "4": 463, + "5": 464, + "6": 466, + "7": 467, + "8": 468, + "9": 468, + "10": 468 + }, + "truth_in_pool": 467, + "truth_scoreable": 467, + "error_buckets": { + "covered_same_formula_wrong": 404, + "correct": 44, + "covered_wrong_formula": 19, + "truth_absent": 33 + }, + "mces": { + "n": 498, + "min": 0.0, + "median": 12.0, + "mean": 11.412650602409638, + "p95": 26.07499999999999, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 500, + "min": 0, + "median": 2036.5, + "mean": 3530.84, + "p95": 11555.449999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 454, + "min": 0.0, + "median": 0.20530382859149982, + "mean": 0.30798188829200546, + "p95": 0.7645584947839043, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 65, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 17, + "reference_identity_conflicts": 0 + } + }, + "instrument": { + "unknown": { + "n": 500, + "targets": 500, + "key14": 497, + "hits": { + "1": 44, + "3": 94, + "5": 128, + "10": 184, + "20": 233, + "50": 319, + "100": 357, + "200": 390 + }, + "recall": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "formula_hits": { + "1": 417, + "2": 447, + "3": 457, + "4": 463, + "5": 464, + "6": 466, + "7": 467, + "8": 468, + "9": 468, + "10": 468 + }, + "truth_in_pool": 467, + "truth_scoreable": 467, + "error_buckets": { + "covered_same_formula_wrong": 404, + "correct": 44, + "covered_wrong_formula": 19, + "truth_absent": 33 + }, + "mces": { + "n": 498, + "min": 0.0, + "median": 12.0, + "mean": 11.412650602409638, + "p95": 26.07499999999999, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 500, + "min": 0, + "median": 2036.5, + "mean": 3530.84, + "p95": 11555.449999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 454, + "min": 0.0, + "median": 0.20530382859149982, + "mean": 0.30798188829200546, + "p95": 0.7645584947839043, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 65, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 17, + "reference_identity_conflicts": 0 + } + }, + "collision_energy_missing": { + "True": { + "n": 500, + "targets": 500, + "key14": 497, + "hits": { + "1": 44, + "3": 94, + "5": 128, + "10": 184, + "20": 233, + "50": 319, + "100": 357, + "200": 390 + }, + "recall": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "formula_hits": { + "1": 417, + "2": 447, + "3": 457, + "4": 463, + "5": 464, + "6": 466, + "7": 467, + "8": 468, + "9": 468, + "10": 468 + }, + "truth_in_pool": 467, + "truth_scoreable": 467, + "error_buckets": { + "covered_same_formula_wrong": 404, + "correct": 44, + "covered_wrong_formula": 19, + "truth_absent": 33 + }, + "mces": { + "n": 498, + "min": 0.0, + "median": 12.0, + "mean": 11.412650602409638, + "p95": 26.07499999999999, + "max": 85.0 + }, + "mces_missing": 2, + "candidates": { + "n": 500, + "min": 0, + "median": 2036.5, + "mean": 3530.84, + "p95": 11555.449999999995, + "max": 33363 + }, + "whole_similarity_in_errors": { + "n": 454, + "min": 0.0, + "median": 0.20530382859149982, + "mean": 0.30798188829200546, + "p95": 0.7645584947839043, + "max": 1.0 + }, + "same_exact_nonempty_scaffold_in_errors": 65, + "acyclic_reference_in_errors": 39, + "wrong_with_whole_similarity_ge_08": 17, + "reference_identity_conflicts": 0 + } + } + }, + "repeated_structure_performance": { + "repeated_identities": 3, + "all_spectra_wrong": 2, + "mixed_correct_and_wrong": 0, + "all_spectra_correct": 1, + "key14_macro_top1": 0.08651911468812877 + }, + "ranking_diagnostics": { + "raw_entry_count": 1765420, + "distinct_identity_count_weighted_by_spectra": 1765417, + "unique_identity_topk_diagnostic_only": { + "1": 0.088, + "3": 0.188, + "5": 0.256, + "10": 0.368, + "20": 0.466, + "50": 0.638, + "100": 0.714, + "200": 0.78 + }, + "true_formula_restricted_topk_oracle_only": { + "1": 0.092, + "3": 0.198, + "5": 0.272, + "10": 0.386, + "20": 0.482, + "50": 0.65, + "100": 0.73, + "200": 0.798 + }, + "top20_unique_key14": { + "n": 500, + "min": 0, + "median": 20.0, + "mean": 19.436, + "p95": 20.0, + "max": 20 + }, + "wrong_top1_score_gap": { + "n": 423, + "min": 0.0025653839111328125, + "median": 2.649746894836426, + "mean": 3.1367381990581187, + "p95": 7.56394907236098, + "max": 13.233839511871338 + } + } + } + }, + "checks": { + "joined_rows": 35612, + "expected_rows": 35612, + "all_frozen_topk_reproduced": true, + "all_frozen_mces_means_reproduced": true, + "rank_details_available": 35612 + }, + "MSG_view_transitions": { + "(False, False)": 11770, + "(True, False)": 2919, + "(True, True)": 2221, + "(False, True)": 646 + }, + "CASMI_coverage_failure_ids": [ + "casmi_029", + "casmi_049", + "casmi_062", + "casmi_069", + "casmi_070", + "casmi_076", + "casmi_083", + "casmi_097", + "casmi_115", + "casmi_173", + "casmi_176", + "casmi_202", + "casmi_203", + "casmi_214", + "casmi_215", + "casmi_225", + "casmi_275", + "casmi_277", + "casmi_287", + "casmi_288", + "casmi_312", + "casmi_330", + "casmi_344", + "casmi_370", + "casmi_376", + "casmi_378", + "casmi_400", + "casmi_417", + "casmi_425", + "casmi_431", + "casmi_444", + "casmi_445", + "casmi_453" + ], + "chemistry_cache": { + "hits": 58229, + "misses": 12995, + "maxsize": null, + "currsize": 12995 + }, + "CASMI_CSI_comparison": { + "identical_candidate_count_by_sample_verified": 500, + "candidate_total": 1765420, + "CSI_hits": { + "1": 158, + "3": 221, + "5": 246, + "10": 277, + "20": 309, + "50": 338, + "100": 356, + "200": 375 + }, + "paired_top1": { + "(False, True)": 126, + "(False, False)": 330, + "(True, True)": 32, + "(True, False)": 12 + }, + "MCES_common_valid_queries": 475, + "MCES_common_CSI": 10.190526315789473, + "MCES_common_C03_2k": 11.363157894736842, + "CSI_reference_scoreable": 441, + "source_scope": "Same frozen candidate protocol; failed or missing scores count as misses, not a complete-success subset." + }, + "MSG_common_candidate_cross_view_check": { + "queries_with_at_least_two_shared_true_formula_graphs": 16737, + "common_top1_identity_changes": 49, + "queries_with_truth_in_both_shared_sets": 16734, + "truth_rank_changes": 148, + "median_centered_score_absolute_difference": 0.0009707477357652448, + "interpretation": "Most cross-view difficulty is not rank reversal on identical candidate sets. This is not proof of a causal mechanism." + }, + "optimization": { + "baseline": "C03 step_002000.pt, NOT C03 12000", + "baseline_same_formula_error_counts": { + "MSG_Mass": 9452, + "MSG_Formula": 14685, + "CASMI": 404 + }, + "priority_1": "TRAIN-only model-confusion + chemical + random mixed negatives at unchanged MSG63 budget; preserve both views and false-negative exclusion.", + "priority_2": "Keep original final-score InfoNCE once; add a small same-formula strongest-wrong margin, and conditional CE only in multi-formula Mass views.", + "priority_3": "Separate zero-initialized reverse atom/peak residual ablation, reusing the original cosine matrix. It is not validated atom-fragment correspondence.", + "priority_4": "Later separate natural full-pool/large-pool training ablation; no Test/CASMI pool truncation or truth insertion.", + "do_not_infer": "No improvement has yet been measured. Static chemical hard negatives, larger pools, longer training and lower total loss are not guaranteed gains.", + "selection": "Predeclare full MSG Validation structure Top1 harmonic mean, report Mass and Formula separately with MCES; never select training negatives from Test/CASMI.", + "status": "Helpers staged and unit-tested; formal trainer integration and bound TRAIN teacher-score mining remain pending.", + "server_directory": "/root/xj/SpecPartition-MS/code/c03_isomer_refinement_20261109", + "unit_tests_local": 18, + "unit_tests_server": 18, + "real_train_candidate_acceptance": { + "status": "passed_train_candidate_safety_only", + "checkpoint_sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "real_train_queries": 8, + "real_train_views": 16, + "sampled_negative_draws": 1008, + "heldout_raw_labels_or_candidate_files_read": false, + "heldout_registry_read_for_exclusion": true, + "parent_model_forward_executed": false, + "teacher_model_scores_available": false, + "model_hard_draws_use_logged_random_fallback": true, + "student_training_started": false, + "existing_services_changed": false, + "pending": [ + "Integrate helper in a separate trainer", + "Prepare TRAIN-only bound teacher-score index", + "Real student GPU-gradient acceptance before launching the matched arms" + ], + "results": [ + { + "record_id": "088643ef8bffa3d3:1", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 56, + "repeated_key14_draws": 7, + "same_formula_draws": 41, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:1", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 53, + "repeated_key14_draws": 10, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 46, + "repeated_key14_draws": 17, + "same_formula_draws": 18, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 43, + "repeated_key14_draws": 20, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:1000", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 52, + "repeated_key14_draws": 11, + "same_formula_draws": 19, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:1000", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 53, + "repeated_key14_draws": 10, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:10000", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 55, + "repeated_key14_draws": 8, + "same_formula_draws": 28, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:10000", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 55, + "repeated_key14_draws": 8, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100000", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 51, + "repeated_key14_draws": 12, + "same_formula_draws": 23, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100000", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 47, + "repeated_key14_draws": 16, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100002", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 52, + "repeated_key14_draws": 11, + "same_formula_draws": 23, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100002", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 46, + "repeated_key14_draws": 17, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100011", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 46, + "repeated_key14_draws": 17, + "same_formula_draws": 19, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100011", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 17, + "repeated_key14_draws": 46, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100017", + "view": "mass", + "negative_draws": 63, + "negative_unique_key14": 52, + "repeated_key14_draws": 11, + "same_formula_draws": 20, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + }, + { + "record_id": "088643ef8bffa3d3:100017", + "view": "formula", + "negative_draws": 63, + "negative_unique_key14": 51, + "repeated_key14_draws": 12, + "same_formula_draws": 63, + "source_counts": { + "random_fallback": 32, + "chemical_same_formula": 16, + "random": 15 + }, + "replacement": true, + "raw_pool_changed": false, + "masked_reason": null + } + ] + }, + "source_local_match": "Existing verified C03 scorer is mean_over_peaks(max_over_atoms cosine); current BidirectionalRanker does not override local_scores.", + "verified_server_model_files": { + "model_v03.py": "3190e02255bee6e1f6176406e6fade1155760d34a8ac578804f4ad564d13c014", + "model_v122.py": "bdb2033ca6a265ea04bafae821a3f503bec747b34e2f158bebda02c34409d750" + }, + "config_sha256": "6067770be2499841b128b7e1e1d6a26cefdd28b6dfba567c6e232132ae168bef" + }, + "limitations": [ + "One frozen checkpoint, not a trained improvement comparison.", + "CASMI formula metrics rerank fixed SIRIUS Top10 formulas; not independent open-formula prediction.", + "Raw official candidate aliases continue consuming ranks. Unique-identity ranks are diagnostics only.", + "Reference-formula restriction is an oracle filtering of stored scores, not a deployable result or a rerun under known formulas.", + "Five MSG Test reference-identity metadata conflicts are retained in frozen v1; they do not change Top1 under the raw-SMILES check.", + "MCES includes threshold/lower-bound and time-limited cases. Missing predictions remain missing.", + "Candidate-size, adduct, peak-count associations are descriptive and confounded, not controlled effects.", + "Evaluation examples and similarity-to-reference values are never training negatives or inference features." + ], + "source_files": [ + { + "file": "casmi_mces.json.gz", + "sha256": "66dc5e18bf6ee87330e68f2e7274c36d452ab2d1d6dc9d589fdfa8d7bd6b4140", + "bytes": 70339 + }, + { + "file": "casmi_summary.json.gz", + "sha256": "41bf5a23d62048f093df239f4e2d3df67fe42b09263a1761dec21d0d10a64e3d", + "bytes": 92416 + }, + { + "file": "csi_input.json.gz", + "sha256": "28296c0ca150ae1f619cc43db026c8b9c038fecb24eaea56ed0a5ad3fa52554f", + "bytes": 63695 + }, + { + "file": "examples_and_overlap.json.gz", + "sha256": "241454ec8c79970763de4937eb07daec0ce0c773f409666edb6caea0d55ea07e", + "bytes": 303720 + }, + { + "file": "msg_mces.json.gz", + "sha256": "92c3aa0ee42748acfc80c0c9e308344f2b3224dfaebd2353fd6d3fe633dc0a87", + "bytes": 1415575 + }, + { + "file": "msg_summary.json.gz", + "sha256": "c9d7c3bfae8160b1632717e40d9e806dacb6de6bdc246fcd1165e56aa1af7565", + "bytes": 1431042 + }, + { + "file": "rank_audit.json.gz", + "sha256": "f8dc3cc7bffb9695799fee313e498dc0b241f9baca7f137e90df60168cf48146", + "bytes": 2346495 + } + ] +} diff --git a/code/snapshot/root/code/ceir_r1_20261109/refresh_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/refresh_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..5682a2736b72fd37a1c7af2cd8eebb4f6c32dfac --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/refresh_ceir.py @@ -0,0 +1,21 @@ +"""Managed asynchronous Train-only refresh at the 1000th continuation update.""" +import json +import subprocess +import sys +import time +from runtime_ceir import * + + +def run(): + path=OUT/'main/step_003000.pt' + while not path.exists(): + if (OUT/'main/COMPLETE.json').exists():return + save(CACHE/'refresh_status.json',dict(phase='waiting_for_main_update_3000',unix_time=time.time())) + time.sleep(15) + if (OUT/'main/step_004000.pt').exists():return + save(CACHE/'refresh_request.json',dict(checkpoint=str(path),sha256=sha(path),source_update=3000, + allowed_splits=['MSG_Train','MSP_libraries','MS2_SAN_JSONL'],maximum_initial_teacher_age=2000,unix_time=time.time())) + subprocess.run([sys.executable,'-u',str(HERE/'prepare_ceir.py'),'mining','--teacher-checkpoint',str(path)],check=True,cwd=HERE) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r1_20261109/runtime_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/runtime_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..3109bced5635502530b2444a8026a4cc9f1647f0 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/runtime_ceir.py @@ -0,0 +1,159 @@ +"""Isolated CEIR runtime. Original sources, datasets and services are read-only.""" +import contextlib +import fcntl +import hashlib +import importlib.util +import json +import os +from pathlib import Path +import random +import shutil +import subprocess +import sys +import time + +HERE = Path(__file__).resolve().parent +PLAN = json.loads((HERE / 'plan.json').read_text()) +ROOT = Path(os.environ.get('SPECPARTITION_ROOT', '/workspace/xj/SpecPartition-MS')) +OUT = Path(os.environ.get('CEIR_OUTPUT', '/root/xj/SpecPartition-MS/runs/ceir_r1_20261109')) +CACHE = OUT / 'prepared' +SEED = 20261103 # resume the actual parent's query order, not a new source epoch +SOURCE_UPDATE = 2000 +TARGET_UPDATE = 4000 +sys.path.insert(0, str(ROOT / 'rebuild/hierarchical_training_20261103')) +import runtime_hier as parent_runtime +SPEC, PARENT_RESOLVED, _, LEGACY = parent_runtime.bootstrap('C03_both_fine') +LEGACY.C.update(threads=1, workers=1, spectrum_chunk=16, graph_chunk=32, + local_chunk=32, pool_micro_views=1, validation_batch_views=4, + max_atoms_per_microbatch=4000) +from runtime09 import readonly, save, sha + + +def load_module(name, path): + spec = importlib.util.spec_from_file_location(name, path) + module = importlib.util.module_from_spec(spec) + sys.modules[name] = module + spec.loader.exec_module(module) + return module + + +def code_manifest(): + # macOS AppleDouble metadata is not source code and is never a binding input. + files = sorted(p for suffix in ('*.py','*.conf') for p in HERE.glob(suffix) if not p.name.startswith('.')) + [HERE/'plan.json'] + return {p.name: sha(p) for p in files} + + +def source_state(): + import torch + path = Path(PLAN['parent']['checkpoint']) + if sha(path) != PLAN['parent']['sha256']: + raise RuntimeError('Not the fixed C03 2k checkpoint') + state = torch.load(path, map_location='cpu', weights_only=False) + if state['progress']['update'] != SOURCE_UPDATE: + raise RuntimeError('Wrong source update') + data_binding = LEGACY.bind() + if state['binding']['data'] != data_binding: + raise RuntimeError('Original immutable training input binding changed') + return state + + +def pilot_plans(): + from sampling import epoch_plans, plan_hash + state = source_state(); progress = state['progress']; del state + epoch, offset = progress['epoch'], progress['next_step'] + result=[]; epochs=[] + while len(result) < TARGET_UPDATE-SOURCE_UPDATE: + pp=epoch_plans(epoch, SEED) + original = ROOT/'runs/hierarchical_intra_modal_20261103/C03_both_fine'/('seed_%d'%SEED)/('sampler_epoch_%02d.json'%epoch) + digest=plan_hash(pp) + if original.exists() and json.loads(original.read_text())['sha256'] != digest: + raise RuntimeError('Parent sampler hash mismatch') + epochs.append(dict(epoch=epoch,sha256=digest,steps=len(pp))) + result.extend(pp[offset:offset+TARGET_UPDATE-SOURCE_UPDATE-len(result)]) + epoch+=1;offset=0 + h=hashlib.sha256(json.dumps(result,separators=(',',':'),sort_keys=True).encode()).hexdigest() + return result, dict(sha256=h,epochs=epochs,steps=len(result),source_update=SOURCE_UPDATE,target_update=TARGET_UPDATE) + + +def run_dir(arm): + if arm not in ('main','control'):raise ValueError('Unknown CEIR arm') + p=OUT/arm;p.mkdir(parents=True,exist_ok=True);return p + + +def gpu_info(): + result=subprocess.run(['nvidia-smi','--query-gpu=memory.free,utilization.gpu', + '--format=csv,noheader,nounits'],capture_output=True,text=True,check=True) + free,util=result.stdout.strip().splitlines()[0].split(',') + return dict(free_mib=int(free),utilization=int(util)) + + +@contextlib.contextmanager +def gpu_work(directory, phase, minimum_free_mib=5500): + """Only new CEIR jobs share these slots; never acquire/alter old jobs' locks.""" + locks=OUT/'gpu_slots';locks.mkdir(parents=True,exist_ok=True) + streams=[(locks/('slot_%d.lock'%i)).open('a+') for i in range(2)] + held=None + try: + while held is None: + info=gpu_info() + if info['free_mib'] >= minimum_free_mib: + for stream in streams: + try:fcntl.flock(stream,fcntl.LOCK_EX|fcntl.LOCK_NB);held=stream;break + except BlockingIOError:pass + if held is None: + save(Path(directory)/'resource_status.json',dict(phase=phase,state='waiting_for_spare_GPU_memory',**info,unix_time=time.time())) + time.sleep(5) + save(Path(directory)/'resource_status.json',dict(phase=phase,state='GPU_work',**info,unix_time=time.time())) + yield + finally: + import torch + if torch.cuda.is_initialized():torch.cuda.empty_cache() + if held is not None:fcntl.flock(held,fcntl.LOCK_UN) + for stream in streams:stream.close() + + +def setup_gpu(): + import torch + torch.set_num_threads(1);torch.set_float32_matmul_precision('high') + torch.use_deterministic_algorithms(True) + torch.cuda.set_per_process_memory_fraction(.11) + LEGACY.seed_all(SEED) + + +def restore_rng(state): + import numpy as np + import torch + torch.set_rng_state(state['torch_rng']);torch.cuda.set_rng_state_all(state['cuda_rng']) + np.random.set_state(state['numpy_rng']);random.setstate(state['python_rng']) + + +def bind(): + dependencies={} + for base in (LEGACY.V09/'src/specpartition_ms',LEGACY.R2/'src/specpartition_ms', + ROOT/'rebuild/hierarchical_training_20261103',ROOT/'rebuild/intra_modal_extension'): + for file in sorted(base.glob('*.py')):dependencies[str(file)]=sha(file) + return dict(plan_sha256=sha(HERE/'plan.json'),code=code_manifest(), + parent_sha256=PLAN['parent']['sha256'],data=LEGACY.bind(), + dependency_sources=dependencies, + prepared_asset_manifest_sha256=sha(CACHE/'ASSET_MANIFEST.json') if (CACHE/'ASSET_MANIFEST.json').exists() else None, + workload=json.loads((CACHE/'workload.json').read_text())['binding']) + + +def check_disk(): + if shutil.disk_usage(OUT).free < 8*2**30: + raise RuntimeError('CEIR output filesystem reserve <8GiB; no old files deleted') + + +def log_event(path, value): + value=dict(unix_time=time.time(),**value) + with Path(path).open('a') as f:f.write(json.dumps(value,allow_nan=False)+'\n') + + +def checkpoint(path, model, optimizer, progress, binding): + import numpy as np + import torch + path=Path(path);tmp=path.with_suffix(path.suffix+'.tmp') + torch.save(dict(model=model.state_dict(),optimizer=optimizer.state_dict(),progress=progress, + binding=binding,torch_rng=torch.get_rng_state(),cuda_rng=torch.cuda.get_rng_state_all(), + numpy_rng=np.random.get_state(),python_rng=random.getstate(),architecture='CEIR_R1'),tmp) + tmp.replace(path) diff --git a/code/snapshot/root/code/ceir_r1_20261109/sampling_ledger_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/sampling_ledger_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..5bc37c1945acd0609cfa11b9bf263850d9b2cfda --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/sampling_ledger_ceir.py @@ -0,0 +1,47 @@ +"""Append-only teacher-version decisions, including prefetched/replayed batches.""" +import hashlib +import json +from pathlib import Path +import sqlite3 +import uuid + + +class SamplingLedger: + def __init__(self,path,binding): + self.path=Path(path);self.path.parent.mkdir(parents=True,exist_ok=True) + marker=self.path.with_suffix('.binding.json') + old=json.loads(marker.read_text()) if marker.exists() else None + if old is not None and not self.path.exists():raise RuntimeError('Sampling ledger was lost; refuse a different replay') + self.db=sqlite3.connect(self.path,timeout=60) + self.db.execute('PRAGMA journal_mode=WAL') + self.db.execute('CREATE TABLE IF NOT EXISTS metadata(key TEXT PRIMARY KEY,body TEXT)') + self.db.execute('CREATE TABLE IF NOT EXISTS pins(record_id TEXT,kind TEXT,seed INTEGER,source_update INTEGER,row_sha256 TEXT,PRIMARY KEY(record_id,kind,seed))') + found=self.db.execute("SELECT body FROM metadata WHERE key='binding'").fetchone() + if found is None: + if old is not None:raise RuntimeError('Sampling ledger metadata was lost') + self.metadata=dict(schema_version=1,ledger_uuid=uuid.uuid4().hex,binding=binding) + self.db.execute('INSERT INTO metadata VALUES (?,?)',('binding',json.dumps(self.metadata,sort_keys=True))) + self.db.commit() + else:self.metadata=json.loads(found[0]) + if self.metadata['binding']!=binding or self.metadata['schema_version']!=1:raise RuntimeError('Sampling ledger binding changed') + if old is not None and old!=self.metadata:raise RuntimeError('Sampling ledger identity changed') + if old is None: + temporary=marker.with_suffix('.tmp');temporary.write_text(json.dumps(self.metadata,indent=2)+'\n');temporary.replace(marker) + + def select(self,record_id,kind,seed,load_version,choose): + key=(record_id,kind,int(seed)) + pinned=self.db.execute('SELECT source_update,row_sha256 FROM pins WHERE record_id=? AND kind=? AND seed=?',key).fetchone() + if pinned is not None: + version,digest=pinned;body=load_version(version) + if body is None or hashlib.sha256(body.encode()).hexdigest()!=digest: + raise RuntimeError('A pinned teacher row disappeared or changed') + else: + version,body=choose() + if body is None:raise RuntimeError('No prepared teacher row for sampling') + digest=hashlib.sha256(body.encode()).hexdigest() + self.db.execute('INSERT INTO pins VALUES (?,?,?,?,?)',(*key,version,digest)) + return version,body + + def commit(self):self.db.commit() + + def close(self):self.db.close() diff --git a/code/snapshot/root/code/ceir_r1_20261109/test_comparison_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/test_comparison_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..cfd0a699990c097cbd40fa344434d57d07d9e2a7 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/test_comparison_ceir.py @@ -0,0 +1,46 @@ +import gzip +import json +from pathlib import Path +import tempfile +import unittest +from comparison_ceir import build,paired_mces,write + + +class ComparisonTests(unittest.TestCase): + def fixture(self,out,update,arm,score,binding='same'): + directory=out/arm/('validation_update_%06d'%update);directory.mkdir(parents=True) + metric=dict(spectra=19429,structure={'1':{'micro':score}},formula={'1':{'micro':.7}}) + (directory/'metrics.json').write_text(json.dumps(dict(mass=metric,formula=metric,binding={'runtime':binding}))) + with gzip.open(directory/'MCES_per_spectrum.json.gz','wt') as f: + json.dump([dict(identifier=str(i),view=v,distance=10.) for v in ('mass','formula') for i in range(19429)],f) + return directory + + def test_no_metrics_cannot_be_complete(self): + with tempfile.TemporaryDirectory() as d: + r=build(d);self.assertFalse(r['complete']);self.assertIsNone(r['recommended_main_checkpoint_update']) + + def test_matched_improvement_and_no_automatic_extra_training(self): + with tempfile.TemporaryDirectory() as d: + out=Path(d) + for update in (3000,4000): + for arm,p in [('main',.3),('control',.2)]:self.fixture(out,update,arm,p) + r=write(out);self.assertTrue(r['complete']);self.assertEqual(r['recommended_main_checkpoint_update'],4000) + self.assertAlmostEqual(r['pairs']['3000']['structure_delta_pp']['mass']['1'],10.) + self.assertFalse(r['additional_training_authorized']) + + def test_missing_mces_not_zero_and_guardrail_blocked(self): + with tempfile.TemporaryDirectory() as d: + out=Path(d);a=self.fixture(out,3000,'main',.3);b=self.fixture(out,3000,'control',.2) + with gzip.open(a/'MCES_per_spectrum.json.gz','wt') as f: + json.dump([dict(identifier=str(i),view=v,distance=None) for v in ('mass','formula') for i in range(19429)],f) + r=paired_mces(a,b) + self.assertIsNone(r['mass']['main_common_mean']);self.assertEqual(r['mass']['main_missing'],19429) + self.assertFalse(build(out)['pairs']['3000']['all_guardrails_passed']) + + def test_changed_data_binding_refused(self): + with tempfile.TemporaryDirectory() as d: + out=Path(d);self.fixture(out,3000,'main',.3,'one');self.fixture(out,3000,'control',.2,'two') + with self.assertRaises(RuntimeError):build(out) + + +if __name__=='__main__':unittest.main() diff --git a/code/snapshot/root/code/ceir_r1_20261109/test_evidence_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/test_evidence_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..70c24ab1472e1c73af3be953baec0546268d3d53 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/test_evidence_ceir.py @@ -0,0 +1,46 @@ +import unittest +from types import SimpleNamespace +import numpy as np +from evidence_ceir import annotate,encode,decode,counts,MASSES,ELEMENTS,ELECTRON,query_key + + +def query(mz,adduct='[M+H]+'): + return SimpleNamespace(peaks=((mz,100.),(mz/2,20.)),precursor_mz=mz,adduct=adduct,collision_energy=None,instrument=None) + + +class EvidenceTests(unittest.TestCase): + def test_protonated_precursor_count_and_electron_mass(self): + mass=counts('CH4')@MASSES+MASSES[ELEMENTS.index('H')]-ELECTRON + result=annotate(query(mass),'CH4') + self.assertTrue(result['available']);self.assertGreaterEqual(result['matched'],1) + np.testing.assert_allclose(result['features'][0,:13],np.log1p(counts('CH5')),atol=1e-6) + + def test_negative_ion_mass(self): + mass=counts('C2H6O')@MASSES-MASSES[ELEMENTS.index('H')]+ELECTRON + result=annotate(query(mass,'[M-H]-'),'C2H6O') + self.assertTrue(result['available']);self.assertGreaterEqual(result['matched'],1) + self.assertEqual(result['features'][0,29],-.5) + + def test_sodium_retention(self): + mass=counts('C2H6O')@MASSES+MASSES[ELEMENTS.index('Na')]-ELECTRON + result=annotate(query(mass,'[M+Na]+'),'C2H6O') + self.assertGreaterEqual(result['matched'],1) + self.assertGreater(result['features'][0,ELEMENTS.index('Na')],0.) + + def test_unknown_adduct_is_mask_not_coercion(self): + result=annotate(query(100.,'[M+K]+'),'C2H6O') + self.assertFalse(result['available']);self.assertFalse(result['valid'].any()) + + def test_wire_roundtrip_and_no_identity(self): + result=annotate(query(31.018),'C2H6O');restored=decode(encode(result)) + np.testing.assert_allclose(restored['features'],result['features'],atol=.002) + np.testing.assert_array_equal(restored['valid'],result['valid']) + self.assertEqual(restored['available'],result['available']) + + def test_peak_order_invariance(self): + q=query(47.049);r=query(47.049);r.peaks=tuple(reversed(r.peaks)) + self.assertEqual(query_key(q),query_key(r)) + np.testing.assert_array_equal(annotate(q,'C2H6O')['features'],annotate(r,'C2H6O')['features']) + + +if __name__=='__main__':unittest.main() diff --git a/code/snapshot/root/code/ceir_r1_20261109/test_sampling_ledger_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/test_sampling_ledger_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..9f72b2b395d0b4239cf21dec9844a9a6a520e605 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/test_sampling_ledger_ceir.py @@ -0,0 +1,35 @@ +from pathlib import Path +import tempfile +import unittest +from sampling_ledger_ceir import SamplingLedger + + +class LedgerTests(unittest.TestCase): + def test_newly_available_teacher_does_not_change_replayed_query(self): + with tempfile.TemporaryDirectory() as d: + path=Path(d)/'sampling.sqlite';banks={2000:'old'} + ledger=SamplingLedger(path,{'parent':'fixed'}) + self.assertEqual(ledger.select('r','mass',4,banks.get,lambda:(2000,banks[2000])),(2000,'old')) + ledger.commit();identity=ledger.metadata['ledger_uuid'];ledger.close() + banks[3000]='new';ledger=SamplingLedger(path,{'parent':'fixed'}) + self.assertEqual(ledger.metadata['ledger_uuid'],identity) + self.assertEqual(ledger.select('r','mass',4,banks.get,lambda:(3000,banks[3000])),(2000,'old')) + self.assertEqual(ledger.select('next','mass',5,banks.get,lambda:(3000,banks[3000])),(3000,'new')) + ledger.close() + + def test_modified_pinned_bank_row_is_refused(self): + with tempfile.TemporaryDirectory() as d: + ledger=SamplingLedger(Path(d)/'sampling.sqlite',{'parent':'fixed'}) + ledger.select('r','mass',4,lambda v:'old',lambda:(2000,'old'));ledger.commit() + with self.assertRaises(RuntimeError):ledger.select('r','mass',4,lambda v:'changed',lambda:(2000,'changed')) + ledger.close() + + def test_missing_ledger_or_changed_parent_is_refused(self): + with tempfile.TemporaryDirectory() as d: + path=Path(d)/'sampling.sqlite';ledger=SamplingLedger(path,{'parent':'fixed'});ledger.close() + with self.assertRaises(RuntimeError):SamplingLedger(path,{'parent':'different'}) + path.unlink() + with self.assertRaises(RuntimeError):SamplingLedger(path,{'parent':'fixed'}) + + +if __name__=='__main__':unittest.main() diff --git a/code/snapshot/root/code/ceir_r1_20261109/train_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/train_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..5a39e1f0d75663e6ca67167bc6b834cfc2e25ea2 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/train_ceir.py @@ -0,0 +1,113 @@ +"""Full-state continuation: two independent arms, exactly 2,000 new updates.""" +import argparse +import fcntl +import json +import math +import os +from pathlib import Path +import time +import traceback +import uuid + +from runtime_ceir import * + + +def wait_ready(directory): + while not (OUT/'READY.json').exists(): + save(directory/'status.json',dict(phase='waiting_for_all_R1_data_and_GPU_acceptance',training_started=False,unix_time=time.time())) + time.sleep(10) + ready=json.loads((OUT/'READY.json').read_text()) + if ready['binding']!=bind() or not ready['real_GPU_acceptance_complete']:raise RuntimeError('Ready binding changed') + + +def train(arm): + import torch + from torch.utils.data import DataLoader + from data_ceir import Dataset + from model_ceir import make_model_optimizer + from objectives_ceir import train_step + from validation_ceir import evaluate + directory=run_dir(arm);lock=(directory/'train.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + wait_ready(directory);setup_gpu();binding=bind();plans=json.loads((CACHE/'workload.json').read_text())['plans'] + if (directory/'COMPLETE.json').exists():return + own=directory/'last.pt' + with gpu_work(directory,'restore_C03_state'): + model,opt,progress,parent_lr=make_model_optimizer(arm,own if own.exists() else None) + if own.exists(): + loaded=torch.load(own,map_location='cpu',weights_only=False) + if loaded['binding']!=binding:raise RuntimeError('Resume code/data/plan binding changed') + del loaded + else:checkpoint(own,model,opt,progress,binding) + save(directory/'provenance.json',dict(parent=PLAN['parent'],source_update=SOURCE_UPDATE,target_update=TARGET_UPDATE, + parameters=sum(p.numel() for p in model.parameters()),old_optimizer_registered_parameters=len(opt.param_groups[0]['params']), + optimizer_groups=len(opt.param_groups),binding=binding,arm=arm,formal_training_started=True, + GPU_memory_fraction=.11,effective_MS_batches_preserved=True,source_cursor_continued=True, + original_sources_and_services_modified=False,teacher_index_source_update=SOURCE_UPDATE, + teacher_index_max_age_at_endpoint=2000)) + attempt=uuid.uuid4().hex + resumed_at=progress['update'] + log_event(directory/'events.jsonl',dict(event='resumed',attempt_id=attempt,update=resumed_at,parent_lr=parent_lr, + log_replay_policy='preserve_all_attempts_last_occurrence_per_update_for_analysis')) + save(directory/'status.json',dict(phase='restored_ready_to_continue',training_started=progress['update']>SOURCE_UPDATE, + update=progress['update'],new_updates=progress['update']-SOURCE_UPDATE,target_update=TARGET_UPDATE,unix_time=time.time())) + if progress.get('sampler_ledger_uuid'): + marker=directory/'sampling_decisions.binding.json' + if not marker.exists() or not (directory/'sampling_decisions.sqlite').exists() or json.loads(marker.read_text())['ledger_uuid']!=progress['sampler_ledger_uuid']: + raise RuntimeError('Cannot resume without the original sampling ledger') + if progress['update'] in (3000,4000) and progress['update'] not in progress.get('validated_updates',[]): + evaluate(model,arm,progress['update']);progress.setdefault('validated_updates',[]).append(progress['update']) + with gpu_work(directory,'resume_pending_validation_checkpoint'):checkpoint(own,model,opt,progress,binding) + # A separate DataLoader generator does not perturb molecular augmentation RNG. + while progress['update']=TARGET_UPDATE:break + last_loop_end=time.monotonic() + save(directory/'COMPLETE.json',dict(complete=True,update=TARGET_UPDATE,new_updates=2000,validated_updates=progress['validated_updates'], + new_exposures=progress['new_exposures'],checkpoint=str(directory/'step_004000.pt'),MCES='asynchronous_pending_or_result_file',unix_time=time.time())) + save(directory/'status.json',dict(phase='completed',update=TARGET_UPDATE,new_updates=2000,training_started=True,unix_time=time.time())) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--arm',choices=['main','control'],required=True);args=p.parse_args() + try:train(args.arm) + except Exception: + directory=run_dir(args.arm);save(directory/'failure.json',dict(traceback=traceback.format_exc(),unix_time=time.time(),resume_from_last_checkpoint=True));raise diff --git a/code/snapshot/root/code/ceir_r1_20261109/training.supervisor.conf b/code/snapshot/root/code/ceir_r1_20261109/training.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..ee0cb8b5c7fc7683bb9b4be800a7c5fecfa6fcff --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/training.supervisor.conf @@ -0,0 +1,76 @@ +[program:specpartition-ceir-r1-gate-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u pipeline_ceir.py +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=true +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/pipeline.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/pipeline_error.log +stdout_logfile_maxbytes=50MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-r1-main-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u train_ceir.py --arm main +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/main.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/main_error.log +stdout_logfile_maxbytes=50MB +stdout_logfile_backups=4 +stderr_logfile_maxbytes=30MB + +[program:specpartition-ceir-r1-refresh-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u refresh_ceir.py +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/refresh.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/refresh_error.log +stdout_logfile_maxbytes=30MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-r1-control-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u train_ceir.py --arm control +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/control.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/control_error.log +stdout_logfile_maxbytes=50MB +stdout_logfile_backups=4 +stderr_logfile_maxbytes=30MB + +[program:specpartition-ceir-r1-mces-20261109] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_20261109 +command=/usr/bin/nice -n 19 /root/xj/SpecPartition-MS/evaluations/mces_all_20261106/.venv/bin/python -u mces_ceir.py +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1" +autostart=false +autorestart=unexpected +startsecs=5 +startretries=3 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/mces.log +stderr_logfile=/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/logs/mces_error.log +stdout_logfile_maxbytes=30MB +stderr_logfile_maxbytes=20MB diff --git a/code/snapshot/root/code/ceir_r1_20261109/validate_plan.py b/code/snapshot/root/code/ceir_r1_20261109/validate_plan.py new file mode 100644 index 0000000000000000000000000000000000000000..b5b378c0cce67b1246fff8362f31eb7e0053923c --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/validate_plan.py @@ -0,0 +1,123 @@ +"""Validate the design contract and emit resolved ablations, never launch jobs. + +These checks validate a proposal. They are not student model, GPU, source-data +integrity, training-completion, or literature-performance reproduction tests. +""" +import copy +import argparse +import hashlib +import json +from pathlib import Path + + +ROOT = Path(__file__).resolve().parent +WORKSPACE = ROOT.parents[1] + + +def validate(c): + checks = [] + + def require(name, condition): + if not condition: + raise ValueError(name) + checks.append(name) + + require('fixed C03 2k parent', c['parent']['source_update'] == 2000 and + c['parent']['sha256'] == '8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6') + require('training counts reconcile', sum(c['data']['reference_release_spectra'].values()) == c['data']['reference_release_total'] == 643587) + require('all and only Train mining sources', set(c['data']['negative_mining_allowed_splits']) == {'MSG_Train','MSP_libraries','MS2_SAN_JSONL'}) + require('both MSG views', c['data']['official_MSG_Mass_Formula_both_each_step']) + require('no injection or external writes', not c['data']['truth_injection'] and not c['new_training_started'] and not c['existing_services_changed']) + require('MSG budget', sum(c['sampling']['MSG_mix'].values()) == c['sampling']['MSG_negative_draws_per_view'] == 63) + require('odata budget', sum(c['sampling']['odata_mix'].values()) == c['sampling']['odata_negative_draws'] == 128) + require('replacement and false-negative safety', c['sampling']['with_replacement'] and c['sampling']['same_key14_never_negative']) + require('pool CE once', c['loss']['final_score_pool_InfoNCE_once'] and not c['loss']['local_path_additional_duplicate_pool_CE'] and not c['loss']['composition_evidence_additional_duplicate_CE']) + require('conditional CE not duplicated', c['loss']['conditional_structure']['requires_cross_formula_negative'] and not c['loss']['conditional_structure']['enabled_for_Formula_or_true_formula_odata']) + require('structure identity not formula equality', c['loss']['same_formula_is_not_structure_positive'] and not c['loss']['coarse_formula_positive_loss_on_main_retrieval_embedding']) + ev = c['model']['new_modules']['composition_evidence'] + require('evidence heads dimension', ev['evidence_dim'] % ev['heads'] == 0) + require('raw MS retained', ev['retain_full_raw_peak_path'] and c['model']['raw_peak_limit'] == 256) + require('new evidence reaches structure path', 'formula_conditioned_peak_tokens_for_structure_matching' in ev['outputs']) + require('all actual MSG formulas', ev['formulas_in_MSG'] == 'all_actual_distinct_pool_formulas_not_Top10_truncated') + require('safe Mass inputs', c['model']['no_reference_formula_in_Mass_inference'] and c['model']['no_reference_SMILES_or_similarity_in_inference'] and not c['model']['SIRIUS_scores_ranks_CSI_features']) + require('no extra heavy teacher prerequisite R1', not c['model']['new_modules']['fragment_simulator']['enabled'] and not c['model']['new_modules']['synthetic_structure_expansion']['enabled']) + require('one block denominator', c['efficiency']['single_softmax_denominator_across_blocks'] and c['efficiency']['do_not_detach_trainable_student_embeddings']) + require('Validation only selection', c['selection']['split'] == 'MSG_Validation_full' and not c['selection']['Test_CASMI_used_for_selection']) + require('CASMI frozen complete pool', c['evaluation']['CASMI_frozen_candidates'] == 1765420 and c['evaluation']['CASMI_candidate_limit'] is None and not c['evaluation']['CASMI_truth_injection']) + require('coverage denominator', c['evaluation']['CASMI_truth_coverage'] == 467 and c['evaluation']['CASMI_n'] == 500) + require('no reinterpretation of formula scope', c['evaluation']['CASMI_formula_scope'] == 'rerank_fixed_SIRIUS_Top10_not_open_formula_generation') + require('not a training command', not c['readiness']['config_is_training_entrypoint']) + require('no slot/CID shortcuts', c['input_leakage_checks']['stable_hash_candidate_shuffle_without_reference'] and not c['input_leakage_checks']['CID_original_position_PubChem_order_as_features']) + require('no negative-mode validation overclaim', not c['input_leakage_checks']['MSG_Validation_claimed_negative_mode_development_set'] and c['input_leakage_checks']['new_negative_development_split_must_audit_parent_training_exposure']) + require('no competitive-CE denominator dilution', c['loss']['competitive_CE_requires_distinct_negative'] and c['loss']['means_and_effective_counts_use_actual_eligible_queries']) + require('fixed formula coverage ceiling retained', c['evaluation']['CASMI_frozen_formula_truth_coverage'] == 468 and c['evaluation']['CASMI_formula_Top10_cannot_improve_by_reranking_same_at_most10_formulas']) + return checks + + +def main(): + parser=argparse.ArgumentParser() + parser.add_argument('--diagnosis',type=Path) + args=parser.parse_args() + c = json.loads((ROOT / 'plan.json').read_text()) + checks = validate(c) + reference=ROOT/'reference/diagnosis.json' + diagnosis=args.diagnosis or (reference if reference.exists() else WORKSPACE/'analysis_outputs/c03_2k_badcase_20261109/diagnosis.json') + diag = json.loads(diagnosis.read_text()) + require_hash = diag['checkpoint_sha256'] == c['parent']['sha256'] + if not require_hash: + raise ValueError('Diagnosis references a different baseline') + for name, view in diag['views'].items(): + m = view['metrics'] + if sum(m['error_buckets'].values()) != m['n']: + raise ValueError('Error buckets do not reconcile: ' + name) + matrix = [] + for arm in c['experiment']['ablation_sequence']: + resolved = copy.deepcopy(c) + resolved['arm'] = arm + if arm == 'control': + resolved['sampling']['MSG_mix'] = {'model': 0, 'chemical': 0, 'random': 63} + resolved['sampling']['odata_mix'] = {'model': 0, 'chemical': 0, 'random': 128} + for key in ('reverse_local', 'fingerprint', 'composition_evidence'): + resolved['model']['new_modules'][key]['enabled'] = False + for key in ('identity_balanced_occurrence_reduction', 'conditional_structure', 'same_formula_gap', 'fingerprint_auxiliary'): + resolved['loss'][key]['enabled'] = False + elif arm == 'minus_hard_mixture': + resolved['sampling']['MSG_mix'] = {'model': 0, 'chemical': 0, 'random': 63} + resolved['sampling']['odata_mix'] = {'model': 0, 'chemical': 0, 'random': 128} + elif arm == 'minus_extra_isomer_losses': + resolved['loss']['conditional_structure']['enabled'] = False + resolved['loss']['same_formula_gap']['enabled'] = False + elif arm == 'minus_reverse_local': + resolved['model']['new_modules']['reverse_local']['enabled'] = False + elif arm == 'minus_fingerprint': + resolved['model']['new_modules']['fingerprint']['enabled'] = False + resolved['loss']['fingerprint_auxiliary']['enabled'] = False + elif arm == 'minus_composition_evidence': + resolved['model']['new_modules']['composition_evidence']['enabled'] = False + elif arm == 'minus_identity_balancing': + resolved['loss']['identity_balanced_occurrence_reduction']['enabled'] = False + elif arm != 'main_R1': + raise ValueError('Unknown arm: ' + arm) + validate(resolved) + matrix.append(resolved) + (ROOT / 'ablation_matrix.json').write_text(json.dumps(matrix, ensure_ascii=False, indent=2) + '\n') + gate_names = ('formal_trainer_integration','Train_only_bound_teacher_index', + 'composition_annotation_adapter_and_cache','identity_balanced_losses_integrated', + 'new_parameter_optimizer_groups_integrated','real_student_GPU_forward_backward', + 'resume_and_parent_logit_parity_acceptance') + pending = [k for k in gate_names if not c['readiness'][k]] + report = {'scope': 'local design/config consistency only', + 'diagnosis_file_sha256': hashlib.sha256(diagnosis.read_bytes()).hexdigest(), + 'config_sha256': hashlib.sha256((ROOT / 'plan.json').read_bytes()).hexdigest(), + 'checks_passed': len(checks), 'checks': checks, + 'diagnosis_buckets_reconciled': 3, 'resolved_ablation_arms': len(matrix), + 'training_ready': not pending, 'pending_implementation_gates': pending, + 'performance_improvement_measured': False, 'GPU_acceptance_performed': False, + 'new_training_started': False, 'server_state_inspected_or_modified': False} + (ROOT / 'validation.json').write_text(json.dumps(report, ensure_ascii=False, indent=2) + '\n') + print(json.dumps({k: report[k] for k in ('checks_passed','diagnosis_buckets_reconciled', + 'resolved_ablation_arms','training_ready','pending_implementation_gates')}, ensure_ascii=False)) + + +if __name__ == '__main__': + main() diff --git a/code/snapshot/root/code/ceir_r1_20261109/validation.json b/code/snapshot/root/code/ceir_r1_20261109/validation.json new file mode 100644 index 0000000000000000000000000000000000000000..f8c61c96e4ac51c7f594e2afcd2e988ab5147e07 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/validation.json @@ -0,0 +1,51 @@ +{ + "scope": "local design/config consistency only", + "diagnosis_file_sha256": "1a031037a7eda329034dc82343ddf22593eb6e09f64edfd5d1b406fb2eb06dcb", + "config_sha256": "f2f6c2a9a196271653151f9905b4a31a9b292a22c7238da04c216415a800f757", + "checks_passed": 27, + "checks": [ + "fixed C03 2k parent", + "training counts reconcile", + "all and only Train mining sources", + "both MSG views", + "no injection or external writes", + "MSG budget", + "odata budget", + "replacement and false-negative safety", + "pool CE once", + "conditional CE not duplicated", + "structure identity not formula equality", + "evidence heads dimension", + "raw MS retained", + "new evidence reaches structure path", + "all actual MSG formulas", + "safe Mass inputs", + "no extra heavy teacher prerequisite R1", + "one block denominator", + "Validation only selection", + "CASMI frozen complete pool", + "coverage denominator", + "no reinterpretation of formula scope", + "not a training command", + "no slot/CID shortcuts", + "no negative-mode validation overclaim", + "no competitive-CE denominator dilution", + "fixed formula coverage ceiling retained" + ], + "diagnosis_buckets_reconciled": 3, + "resolved_ablation_arms": 8, + "training_ready": false, + "pending_implementation_gates": [ + "formal_trainer_integration", + "Train_only_bound_teacher_index", + "composition_annotation_adapter_and_cache", + "identity_balanced_losses_integrated", + "new_parameter_optimizer_groups_integrated", + "real_student_GPU_forward_backward", + "resume_and_parent_logit_parity_acceptance" + ], + "performance_improvement_measured": false, + "GPU_acceptance_performed": false, + "new_training_started": false, + "server_state_inspected_or_modified": false +} diff --git a/code/snapshot/root/code/ceir_r1_20261109/validation_ceir.py b/code/snapshot/root/code/ceir_r1_20261109/validation_ceir.py new file mode 100644 index 0000000000000000000000000000000000000000..51415c2f3c662ad0ebb0d762eab7236c9a8cc4c8 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_20261109/validation_ceir.py @@ -0,0 +1,135 @@ +"""Complete unchanged official Validation pools and inspectable ranked scores.""" +from collections import defaultdict +from dataclasses import replace +import gzip +import hashlib +import json +import time +import torch +from runtime_ceir import * +from data09 import loads +from objectives_ceir import amp +from specpartition_ms.chemistry import canonical_formula,formula_vector + +KS=(1,3,5,10,20,50,100,200) +FKS=tuple(range(1,11))+(20,50,100,200) + + +def metric(rows,field,ks): + result={} + for k in ks: + hit=[r[field] is not None and r[field]<=k for r in rows] + targets=defaultdict(list);identities=defaultdict(list) + for r,h in zip(rows,hit):targets[r['target']].append(h);identities[r['reference_identity']].append(h) + result[str(k)]=dict(hits=sum(hit),denominator=len(rows),micro=sum(hit)/len(rows), + target_macro=sum(sum(v)/len(v) for v in targets.values())/len(targets), + key14_macro=sum(sum(v)/len(v) for v in identities.values())/len(identities)) + return result + + +def evaluate(model,arm,update,maximum_targets=None): + dest=run_dir(arm)/('validation_update_%06d'%update) + if maximum_targets is not None:dest=run_dir(arm)/'acceptance_validation_probe' + dest.mkdir(parents=True,exist_ok=True) + evaluation_binding=dict(runtime=bind(),arm=arm,update=update,maximum_targets=maximum_targets, + source_checkpoint_sha256=sha(run_dir(arm)/('step_%06d.pt'%update)) + if maximum_targets is None else PLAN['parent']['sha256']) + protocol_path=dest/'protocol_binding.json' + if protocol_path.exists() and json.loads(protocol_path.read_text())!=evaluation_binding: + raise RuntimeError('Refusing to mix Validation predictions from different code/data/checkpoints') + save(protocol_path,evaluation_binding) + if (dest/'metrics.json').exists():return json.loads((dest/'metrics.json').read_text()) + model.eval();model.install_evidence(True) + db=readonly(LEGACY.PREP/'validation.sqlite');summary=[];started=time.monotonic() + targets=[r[0] for r in db.execute('SELECT DISTINCT target FROM spectra ORDER BY target')] + if maximum_targets is not None:targets=targets[:maximum_targets] + for ti,target in enumerate(targets): + output=dest/(hashlib.sha256(target.encode()).hexdigest()+'.json.gz') + if output.exists(): + with gzip.open(output,'rt') as f:summary.extend(json.load(f)['rows']) + continue + pools={kind:json.loads(db.execute('SELECT body FROM pools WHERE target=? AND view=?',(target,kind)).fetchone()[0]) for kind in ('mass','formula')} + aliases={s:db.execute('SELECT graph_key,identity,formula,error FROM aliases WHERE smiles=?',(s,)).fetchone() for s in set(sum(pools.values(),[]))} + graphs={} + for key,identity,formula,error in aliases.values(): + if key is not None and key not in graphs:graphs[key]=loads(db.execute('SELECT body FROM graphs WHERE graph_key=?',(key,)).fetchone()[0]) + keys=sorted(graphs);mols=[graphs[k] for k in keys];positions={k:i for i,k in enumerate(keys)} + data=[loads(r[0]) for r in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier',(target,))];rows=[];ranked={} + with gpu_work(dest,'full_Validation_target'),torch.inference_mode(),amp(): + _,atoms,zm=model.encode_molecules(mols) + for start in range(0,len(data),4): + block=data[start:start+4];tokens,qs,_=model.spectrum.forward_batch([r['query'] for r in block]) + views=[];qvalues=[];pvalues=[] + for i,r in enumerate(block): + for kind in ('mass','formula'): + fs=set() + for s in pools[kind]: + f=aliases[s][2] + if f: + try:formula_vector(f);fs.add(canonical_formula(f)) + except ValueError:pass + q=replace(r['query'],formula_candidates=tuple(sorted(fs))) + views.append((i,kind,q));qvalues.append(qs[i]);pvalues.append(tokens[i]) + formula_scores,contexts=model.formula_batch(torch.stack(qvalues),[x[2] for x in views],pvalues,True) + for vi,(i,kind,q) in enumerate(views): + r=block[i];selected=sorted({aliases[s][0] for s in pools[kind] if aliases[s][0] is not None}) + index=[positions[k] for k in selected];scores={} + if index: + values,_,_=model.score_encoded(qs[i],tokens[i],q,[graphs[k] for k in selected],[atoms[j] for j in index],zm[index],formula_scores[vi],contexts[vi]) + scores=dict(zip(selected,values.float().cpu().tolist())) + expanded=[dict(smiles=s,identity=aliases[s][1],formula=aliases[s][2],score=scores.get(aliases[s][0]),scoreable=aliases[s][0] in scores) for s in pools[kind]] + expanded.sort(key=lambda c:(not c['scoreable'],-c['score'] if c['scoreable'] else 0,c['identity'] or '',c['smiles'])) + rank=next((j+1 for j,c in enumerate(expanded) if c['scoreable'] and c['identity']==r['identity']),None) + fv=formula_scores[vi].float().cpu().tolist();order=sorted(range(len(fv)),key=lambda j:(-fv[j],q.formula_candidates[j])) + try:truth=canonical_formula(r['formula']);formula_vector(truth) + except ValueError:truth=None + frank=next((j+1 for j,k in enumerate(order) if q.formula_candidates[k]==truth),None) + row=dict(identifier=r['identifier'],target=target,view=kind,reference_identity=r['identity'],reference_formula=truth, + rank=rank,formula_rank=frank,candidate_count=len(expanded),formula_count=len(fv), + unscoreable=sum(not c['scoreable'] for c in expanded),adduct=q.adduct, + polarity='negative' if q.adduct.endswith('-') else 'positive', + peak_count=len(q.peaks),instrument=q.instrument,collision_energy=q.collision_energy, + same_formula_candidates=sum(c['formula']==truth for c in expanded), + reference_present_in_original_pool=any(c['identity']==r['identity'] for c in expanded), + reference_scoreable=any(c['scoreable'] and c['identity']==r['identity'] for c in expanded), + top1_smiles=expanded[0]['smiles'] if expanded and expanded[0]['scoreable'] else None) + rows.append(row);ranked[r['identifier']+'/'+kind]=dict(candidates=expanded, + formulas=[dict(formula=q.formula_candidates[j],score=fv[j],rank=k+1) for k,j in enumerate(order)]) + temporary=Path(str(output)+'.tmp') + with gzip.open(temporary,'wt',compresslevel=3) as f:json.dump(dict(rows=rows,ranked=ranked),f,separators=(',',':')) + temporary.replace(output);summary.extend(rows) + save(dest/'status.json',dict(targets=ti+1,total=len(targets),spectral_views=len(summary),seconds=time.monotonic()-started,updated_unix=time.time())) + check_disk() + metrics={} + for kind in ('mass','formula'): + rr=[r for r in summary if r['view']==kind] + if maximum_targets is None and (len(rr)!=19429 or len({r['identifier'] for r in rr})!=19429):raise RuntimeError('Validation denominator mismatch') + metrics[kind]=dict(spectra=len(rr),structure=metric(rr,'rank',KS),formula=metric(rr,'formula_rank',FKS), + unscoreable_candidates=sum(r['unscoreable'] for r in rr), + original_pool_reference_coverage=sum(r['reference_present_in_original_pool'] for r in rr), + scoreable_reference_coverage=sum(r['reference_scoreable'] for r in rr),strata={}) + strata=metrics[kind]['strata'] + grouping={ + 'adduct':lambda r:r['adduct'], + 'polarity':lambda r:r['polarity'], + 'instrument':lambda r:r['instrument'] or 'missing', + 'collision_energy_missing':lambda r:str(r['collision_energy'] is None), + 'peak_count':lambda r:'1-20' if r['peak_count']<=20 else ('21-50' if r['peak_count']<=50 else ('51-100' if r['peak_count']<=100 else '101+')), + 'candidate_count':lambda r:'1-64' if r['candidate_count']<=64 else ('65-128' if r['candidate_count']<=128 else '129+'), + 'same_formula_count':lambda r:'0' if not r['same_formula_candidates'] else ('1' if r['same_formula_candidates']==1 else ('2-32' if r['same_formula_candidates']<=32 else '33+')), + } + for name,key in grouping.items(): + grouped=defaultdict(list) + for row in rr:grouped[key(row)].append(row) + strata[name]={str(k):dict(spectra=len(v),structure=metric(v,'rank',KS),formula=metric(v,'formula_rank',FKS)) for k,v in sorted(grouped.items())} + with gzip.open(dest/'per_spectrum_summary.json.gz','wt',compresslevel=3) as f:json.dump(summary,f,separators=(',',':')) + metrics.update(update=update,protocol='full_official_raw_entry_rank_2D_connectivity_no_truth_injection', + formula_scope='distinct_official_pool_formulas_not_open_generation',full_Validation=maximum_targets is None, + binding=evaluation_binding, + secondary_exact_metrics='not_computed_in_this_pilot_primary_is_key14', + MCES='queued_asynchronous_not_zero_filled',seconds=time.monotonic()-started) + save(dest/'metrics.json',metrics) + if maximum_targets is None: + x=metrics['mass']['structure']['1']['micro'];y=metrics['formula']['structure']['1']['micro'];h=2*x*y/max(x+y,1e-12) + save(dest/'selection.json',dict(selection_score=h,criterion='harmonic_mean_Mass_Formula_Top1',MCES_guardrail_pending=True)) + db.close();model.install_evidence(False);model.train();return metrics diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/config.json b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/config.json new file mode 100644 index 0000000000000000000000000000000000000000..d8a18bc8028603021f58eb091815161f254ee4c8 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/config.json @@ -0,0 +1,28 @@ +{ + "experiment": "ceir_r1_test_comparison_20261110", + "root": "/workspace/xj/SpecPartition-MS", + "r1_code": "/root/xj/SpecPartition-MS/code/ceir_r1_20261109", + "r1_output": "/root/xj/SpecPartition-MS/runs/ceir_r1_20261109", + "output": "/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110", + "parent_checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "parent_sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "primary_update": 3000, + "fixed_endpoint_update": 4000, + "datasets": ["msg_test", "casmi2022"], + "annotation_workers": 4, + "annotation_formula_cache": 128, + "annotation_query_chunk": 64, + "spectrum_batch": 16, + "graph_chunk": 32, + "local_chunk": 32, + "maximum_gpu_workers": 2, + "gpu_memory_fraction": 0.24, + "minimum_free_gpu_mib": 4000, + "minimum_output_disk_gib": 8, + "candidate_limit": null, + "truth_injection": false, + "test_used_for_selection": false, + "training_or_optimizer_updates": false, + "baseline_policy": "reuse_hash_bound_C03_step_002000_predictions_and_MCES", + "mces": {"package": "myopic-mces", "version": "1.0.0", "pulp": "2.9.0", "threshold": 15, "solver_threads": 1, "time_limit_seconds": 5, "workers": 4} +} diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/evaluation_runtime.py b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/evaluation_runtime.py new file mode 100644 index 0000000000000000000000000000000000000000..dff2bbd87a2a1c8b8edfd079724ec4cbdf73c4b6 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/evaluation_runtime.py @@ -0,0 +1,140 @@ +"""Isolated evaluation release; unique name avoids legacy `common` imports.""" +import contextlib +import fcntl +import hashlib +import json +import os +from pathlib import Path +import shutil +import subprocess +import sys +import time + +HERE=Path(__file__).resolve().parent +C=json.loads((HERE/'config.json').read_text()) +ROOT=Path(C['root']);OUT=Path(C['output']);R1=Path(C['r1_output']) +PREP=ROOT/'data/derived/post_training_evaluation_20261103' +sys.path.insert(0,C['r1_code']) +import runtime_ceir as runtime +from evidence_ceir import EvidenceStore,query_key,RULE +from runtime09 import readonly,sha,save +from data09 import loads + +MODELS={f'{arm}_{update:06d}':dict(arm=arm,update=update,checkpoint=str(R1/arm/f'step_{update:06d}.pt')) + for arm in ('main','control') for update in (3000,4000)} + + +def own_code(): + return {p.name:sha(p) for p in sorted([*HERE.glob('*.py'),HERE/'config.json'])} + + +def check_disk(): + OUT.mkdir(parents=True,exist_ok=True) + if shutil.disk_usage(OUT).free=C['minimum_free_gpu_mib']: + for f in files: + try:fcntl.flock(f,fcntl.LOCK_EX|fcntl.LOCK_NB);held=f;break + except BlockingIOError:pass + if held is None: + save(Path(directory)/'resource_status.json',dict(state='waiting_for_evaluation_GPU_slot',unix_time=time.time())) + time.sleep(2) + yield + finally: + import torch + if torch.cuda.is_initialized():torch.cuda.empty_cache() + if held is not None:fcntl.flock(held,fcntl.LOCK_UN) + for f in files:f.close() + + +def make_model(name): + import torch + from model_ceir import CEIRRanker + frozen=json.loads((OUT/'FROZEN.json').read_text());item=frozen['models'][name] + if sha(item['checkpoint'])!=item['sha256']:raise RuntimeError('Frozen checkpoint changed') + torch.set_num_threads(1);torch.set_float32_matmul_precision('high');torch.use_deterministic_algorithms(True) + torch.cuda.set_per_process_memory_fraction(C['gpu_memory_fraction']);runtime.LEGACY.seed_all(20261103) + state=torch.load(item['checkpoint'],map_location='cpu',weights_only=False) + if state.get('architecture')!='CEIR_R1' or state['progress']['update']!=item['update']: + raise RuntimeError('Checkpoint architecture/update mismatch') + if state['binding']!=frozen['r1_binding']:raise RuntimeError('Training checkpoint code/data binding mismatch') + model=CEIRRanker(runtime.LEGACY.C,item['arm']);model.load_state_dict(state['model'],strict=True) + del state + model.graph_chunk=C['graph_chunk'];model.local_chunk=C['local_chunk'] + if item['arm']=='main': + paths=[OUT/'prepared'/(d+'_composition.sqlite') for d in C['datasets']] + for dataset in C['datasets']: + marker=json.loads((OUT/'prepared'/(dataset+'_composition_READY.json')).read_text()) + if marker['rule']!=RULE or marker['inputs']!=frozen['inputs'][dataset]:raise RuntimeError('Inference evidence binding mismatch') + model.evidence=EvidenceStore(paths) + model=model.to(runtime.LEGACY.C['device']).eval() + return model,item + + +def amp(): + import torch + return torch.autocast('cuda',dtype=torch.bfloat16,enabled=runtime.LEGACY.C['bf16']) diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/infer.py b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/infer.py new file mode 100644 index 0000000000000000000000000000000000000000..3ff0fbeb626aa19b9c7d01396045c9fc43c981dd --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/infer.py @@ -0,0 +1,240 @@ +"""Complete frozen pools scored by the actual CEIR model, not its C03 subset.""" +from collections import defaultdict +from dataclasses import replace +import fcntl +import gzip +import hashlib +import json +import math +from pathlib import Path +import sys +import time +import torch +from evaluation_runtime import * + +sys.path.insert(0,str(ROOT/'rebuild/post_training_evaluation_20261103')) +import evaluate as original +from eval_runtime import digest,supported_formula + + +def gzip_save(path,obj): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True);tmp=Path(str(path)+'.tmp') + with gzip.open(tmp,'wt',compresslevel=3) as f:json.dump(obj,f,separators=(',',':'),ensure_ascii=False,allow_nan=False) + tmp.replace(path) + + +def score_group(model,db,data,pools,aliases,formulas): + from specpartition_ms.chemistry import ADDUCTS + values=[{v:{} for v in pools} for _ in data];formula_values=[{v:[] for v in pools} for _ in data] + errors=[None if r['query'].adduct in ADDUCTS else 'unsupported_adduct:'+r['query'].adduct for r in data] + encoded={};queries={};fs={};contexts={} + with torch.inference_mode(),amp(): + valid=[i for i,e in enumerate(errors) if e is None] + for start in range(0,len(valid),C['spectrum_batch']): + ids=valid[start:start+C['spectrum_batch']] + tokens,qs,_=model.spectrum.forward_batch([data[i]['query'] for i in ids]) + for j,i in enumerate(ids):encoded[i]=(qs[j],tokens[j]) + view_indices=[(i,v) for i in valid for v in pools] + for start in range(0,len(view_indices),C['spectrum_batch']): + block=view_indices[start:start+C['spectrum_batch']] + qlist=[replace(data[i]['query'],formula_candidates=formulas[v]) for i,v in block] + qq=torch.stack([encoded[i][0] for i,v in block]);pp=[encoded[i][1] for i,v in block] + batch_scores,batch_context=model.formula_batch(qq,qlist,pp,True) + for j,(i,v) in enumerate(block): + if not bool(torch.isfinite(batch_scores[j]).all()):raise RuntimeError('Nonfinite formula score') + queries[i,v]=qlist[j];fs[i,v]=batch_scores[j];contexts[i,v]=batch_context[j] + keys=sorted({a[0] for a in aliases.values() if a[0]}) + molecules=[loads(db.execute('SELECT body FROM graphs WHERE graph_key=?',(k,)).fetchone()[0]) for k in keys] + positions={key:i for i,key in enumerate(keys)} + if molecules: + _,atoms,zm=model.encode_molecules(molecules) + for i in valid: + q,peaks=encoded[i] + for view,pool in pools.items(): + selected=sorted({aliases[s][0] for s in pool if aliases[s][0]}) + ids=[positions[k] for k in selected] + if not ids:continue + # Includes reverse local, learned fingerprint and chemical + # composition residuals in main; control retains its own path. + score,_,_=model.score_encoded(q,peaks,queries[i,view],[molecules[j] for j in ids], + [atoms[j] for j in ids],zm[ids],fs[i,view],contexts[i,view]) + numeric=score.float().cpu().tolist() + if not all(math.isfinite(s) for s in numeric):raise RuntimeError('Nonfinite final structure score') + values[i][view]=dict(zip(selected,numeric)) + for i in valid: + for view in pools:formula_values[i][view]=fs[i,view].float().cpu().tolist() + return values,formula_values,errors + + +def single_query_diagnostic(name): + """Actual GPU check against the existing encode_batch reference path.""" + model,item=make_model(name);db=readonly(PREP/'msg_test.sqlite') + target=db.execute('SELECT DISTINCT target FROM spectra ORDER BY target LIMIT 1').fetchone()[0] + pools,aliases,fs,_=universe(db,target,'msg_test') + pools={v:p[:16] for v,p in pools.items()} + subset={s:aliases[s] for p in pools.values() for s in p} + data=[loads(b) for b, in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier LIMIT 2',(target,))] + scores,formulas,errors=score_group(model,db,data,pools,subset,fs) + maximum=0.;checks=0 + with torch.inference_mode(),amp(): + for i,row in enumerate(data): + if errors[i]:continue + for view,pool in pools.items(): + keys=sorted({aliases[s][0] for s in pool if aliases[s][0]}) + mols=tuple(loads(db.execute('SELECT body FROM graphs WHERE graph_key=?',(k,)).fetchone()[0]) for k in keys) + q=replace(row['query'],candidates=mols,formula_candidates=fs[view]) + enc=model.encode_batch([q])[0][0] + ref={(m.identity,m.smiles):s for m,s in zip(q.candidates,enc.base.float().cpu().tolist())} + for key,m in zip(keys,mols): + maximum=max(maximum,abs(scores[i][view][key]-ref[m.identity,m.smiles]));checks+=1 + if maximum>0.005:raise RuntimeError('GPU inference reference parity exceeded 0.005: '+str(maximum)) + db.close();return dict(passed=True,checkpoint=item,comparisons=checks,max_abs_score_difference=maximum, + tolerance=0.005,probe_only_not_full_Test=True,spectrum_batch=C['spectrum_batch'], + graph_chunk=C['graph_chunk'],local_chunk=C['local_chunk'],training_steps=0, + peak_allocated_mib=torch.cuda.max_memory_allocated()/2**20,unix_time=time.time()) + + +def probe(name): + """Compare to frozen Validation scores with the SAME batch/graph arithmetic. + + A scalar-query forward changes BF16 padding/GEMM shapes and is not a + bitwise reference for the batched Validation inference protocol. + """ + from evidence_ceir import EvidenceStore + model,item=make_model(name) + if item['arm']=='main':model.evidence=EvidenceStore([runtime.CACHE/'validation_composition.sqlite']) + db=readonly(runtime.LEGACY.PREP/'validation.sqlite') + target=db.execute('SELECT DISTINCT target FROM spectra ORDER BY target LIMIT 1').fetchone()[0] + pools={view:json.loads(db.execute('SELECT body FROM pools WHERE target=? AND view=?',(target,view)).fetchone()[0]) + for view in ('mass','formula')} + aliases={s:tuple(db.execute('SELECT graph_key,identity,formula,error FROM aliases WHERE smiles=?',(s,)).fetchone()) + for s in set(s for pool in pools.values() for s in pool)} + aliases={s:(a[0],a[1],a[2],None,None,a[3]) for s,a in aliases.items()} + formulas={v:tuple(sorted({supported_formula(aliases[s][2]) for s in pool}-{None})) for v,pool in pools.items()} + data=[loads(b) for b, in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier LIMIT 4',(target,))] + scores,fs,errors=score_group(model,db,data,pools,aliases,formulas) + reference=R1/item['arm']/('validation_update_%06d'%item['update'])/(hashlib.sha256(target.encode()).hexdigest()+'.json.gz') + with gzip.open(reference,'rt') as f:prior=json.load(f) + maximum=0.;formula_maximum=0.;checks=0 + for i,row in enumerate(data): + if errors[i]:raise RuntimeError('Unexpected error on Validation parity input') + for view,pool in pools.items(): + old=prior['ranked'][row['identifier']+'/'+view] + expected={entry['smiles']:entry['score'] for entry in old['candidates']} + for smiles in pool: + actual=scores[i][view].get(aliases[smiles][0]);before=expected[smiles] + if (actual is None)!=(before is None):raise RuntimeError('Validation scoreability parity mismatch') + if actual is not None:maximum=max(maximum,abs(actual-before));checks+=1 + expected_formula={entry['formula']:entry['score'] for entry in old['formulas']} + for formula,value in zip(formulas[view],fs[i][view]): + formula_maximum=max(formula_maximum,abs(value-expected_formula[formula])) + if maximum>1e-5 or formula_maximum>1e-5: + raise RuntimeError('Frozen Validation parity failed: '+str((maximum,formula_maximum))) + db.close() + return dict(passed=True,checkpoint=item,reference_prediction=str(reference),reference_sha256=sha(reference), + validation_queries=len(data),candidate_score_comparisons=checks,max_abs_score_difference=maximum, + max_abs_formula_difference=formula_maximum,tolerance=1e-5, + same_graph_union_and_same_spectrum_batch_as_saved_Validation=True, + probe_only_not_Test_results=True,training_steps=0,unix_time=time.time()) + + +def evaluate(name,dataset): + directory=OUT/'inference'/name/dataset;directory.mkdir(parents=True,exist_ok=True) + lock=(directory/'job.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + bound=dict(model=json.loads((OUT/'FROZEN.json').read_text())['models'][name], + frozen_release_sha256=sha(OUT/'FROZEN.json'),dataset=dataset,inputs=inputs(dataset), + candidate_limit=None,truth_injection=False,ranking='original_raw_entry_rank', + spectrum_batch=C['spectrum_batch'],graph_chunk=C['graph_chunk'],local_chunk=C['local_chunk'], + score='actual_CEIRRanker.formula_batch_and_score_encoded',posthoc_MCES_enabled=True) + path=directory/'binding.json' + if path.exists() and json.loads(path.read_text())!=bound:raise RuntimeError('Refusing incompatible inference resume') + save(path,bound);binding_id=digest(bound) + if (directory/'COMPLETE.json').exists():return + with gpu_slot(directory):model,frozen=make_model(name) + db=readonly(PREP/(dataset+'.sqlite')) + targets=[r[0] for r in db.execute('SELECT DISTINCT target FROM spectra ORDER BY target')] + started=time.monotonic();summary=[] + for ti,target in enumerate(targets): + filename=hashlib.sha256(target.encode()).hexdigest()+'.json.gz';output=directory/'per_target'/filename + if output.exists(): + with gzip.open(output,'rt') as f:prior=json.load(f) + if prior['binding_id']!=binding_id:raise RuntimeError('Target prediction binding changed') + summary.extend(prior['rows']);continue + data=[loads(r[0]) for r in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier',(target,))] + pools,aliases,fs,source=universe(db,target,dataset) + with gpu_slot(directory):values,fvalues,errors=score_group(model,db,data,pools,aliases,fs) + rows=[];predictions=[] + for i,r in enumerate(data): + ref=db.execute('SELECT canonical,fullkey FROM aliases WHERE smiles=?',(r['reference_smiles'],)).fetchone() + if ref is None:raise RuntimeError('Reference evaluation alias missing') + for view,pool in pools.items(): + scores,order=original.rank_entries(pool,aliases,values[i][view]) + def match_rank(column,value): + return next((j+1 for j,k in enumerate(order) if scores[k] is not None and value is not None and aliases[pool[k]][column]==value),None) + rank=match_rank(1,r['identity']);truth=supported_formula(r['formula']);fv=fvalues[i][view] + order_f=sorted(range(len(fv)),key=lambda j:(-fv[j],fs[view][j])) + frank=next((j+1 for j,k in enumerate(order_f) if fs[view][k]==truth),None) + rows.append(dict(identifier=r['identifier'],target=target,view=view,reference_identity=r['identity'], + reference_smiles=r['reference_smiles'],reference_formula=r['formula'],reference_formula_supported=truth is not None, + formula_rank=frank,formula_count=len(fs[view]),reference_formula_in_pool=truth is not None and truth in fs[view], + rank=rank,canonical_rank=match_rank(3,ref[0]),inchikey_rank=match_rank(4,ref[1]), + reference_in_pool=any(aliases[s][1]==r['identity'] for s in pool), + reference_scoreable_in_pool=any(aliases[s][1]==r['identity'] and scores[j] is not None for j,s in enumerate(pool)), + candidate_count=len(pool),unscoreable=sum(s is None for s in scores),query_error=errors[i], + adduct=r['query'].adduct,polarity='negative' if r['query'].adduct.endswith('-') else 'positive', + top1_smiles=pool[order[0]] if order and scores[order[0]] is not None else None, + peak_count=len(r['query'].peaks),instrument=r['query'].instrument,collision_energy=r['query'].collision_energy, + same_formula_candidates=sum(aliases[s][2]==truth for s in pool), + recall_at_k={str(k):rank is not None and rank<=k for k in original.KS}, + formula_recall_at_k={str(k):frank is not None and frank<=k for k in original.FKS},extra=r['extra'])) + predictions.append(dict(identifier=r['identifier'],view=view,scores_in_raw_pool_order=scores, + ranked_raw_pool_indices=order,formulas=list(fs[view]),formula_scores=fv,ranked_formula_indices=order_f)) + pool_file=OUT/'shared_pools'/dataset/filename;pool_file.parent.mkdir(parents=True,exist_ok=True) + with pool_file.with_suffix('.lock').open('a+') as shared_lock: + fcntl.flock(shared_lock,fcntl.LOCK_EX) + if not pool_file.exists(): + gzip_save(pool_file,dict(target=target,pools={view:[dict(smiles=s,graph_key=aliases[s][0],key14=aliases[s][1], + formula=aliases[s][2],canonical_smiles=aliases[s][3],full_inchikey=aliases[s][4],error=aliases[s][5]) for s in pool] + for view,pool in pools.items()},source=source,candidate_order_sha256={v:digest(p) for v,p in pools.items()})) + gzip_save(output,dict(binding_id=binding_id,target=target,static_candidate_file=str(pool_file), + candidate_order_sha256={v:digest(p) for v,p in pools.items()},rows=rows,predictions=predictions)) + summary.extend(rows);check_disk() + save(directory/'status.json',dict(phase='inference',targets=ti+1,total_targets=len(targets),spectral_views=len(summary), + seconds=time.monotonic()-started,unix_time=time.time())) + if ti%25==0:print(json.dumps(dict(model=name,dataset=dataset,targets=ti+1,total=len(targets))),flush=True) + db.close();expected=17556 if dataset=='msg_test' else 500 + result=dict(model=name,dataset=dataset,checkpoint=frozen,binding_id=binding_id,views={}, + protocol='official_raw_entry_ranking' if dataset=='msg_test' else 'frozen_blind_top10_pubchem_10ppm_full_pool', + formula_scope='supported_distinct_official_pool_formulas' if dataset=='msg_test' else 'reranking_frozen_SIRIUS_top10_formulas_not_independent_prediction', + no_test_checkpoint_selection=True,mces='authorized_separate_posthoc_job',seconds=time.monotonic()-started) + for view in sorted({r['view'] for r in summary}): + rr=[r for r in summary if r['view']==view] + if len(rr)!=expected or len({r['identifier'] for r in rr})!=expected:raise RuntimeError('Incomplete/duplicate test denominator') + result['views'][view]=original.aggregate(rr) + for key in ('adduct','polarity'): + result['views'][view]['by_'+key]={k:original.aggregate([r for r in rr if r[key]==k]) for k in sorted({r[key] for r in rr})} + if dataset=='casmi2022': + if sum(r['candidate_count'] for r in rr)!=1765420:raise RuntimeError('CASMI full pool count changed') + result['views'][view]['frozen_reference_covered']=sum(r['extra']['frozen_reference_covered'] for r in rr) + gzip_save(directory/'per_spectrum_summary.json.gz',summary);save(directory/'metrics.json',result) + save(directory/'COMPLETE.json',dict(complete=True,model=name,dataset=dataset,metrics_sha256=sha(directory/'metrics.json'),unix_time=time.time())) + del model;torch.cuda.empty_cache() + + +def run(arm): + OUT.mkdir(parents=True,exist_ok=True) + while not (OUT/'FROZEN.json').exists():time.sleep(2) + if arm=='main': + while not (OUT/'prepared/COMPLETE.json').exists():time.sleep(5) + acceptance=OUT/(arm+'_GPU_ACCEPTANCE.json') + if not acceptance.exists(): + with gpu_slot(OUT):value=probe(f'{arm}_003000') + save(acceptance,value) + for update in (3000,4000): + for dataset in C['datasets']:evaluate(f'{arm}_{update:06d}',dataset) + save(OUT/(arm+'_INFERENCE_COMPLETE.json'),dict(complete=True,updates=[3000,4000],datasets=C['datasets'],unix_time=time.time())) + + +if __name__=='__main__': + import argparse + p=argparse.ArgumentParser();p.add_argument('--arm',choices=['main','control'],required=True);a=p.parse_args();run(a.arm) diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/mces.py b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/mces.py new file mode 100644 index 0000000000000000000000000000000000000000..5b005d3296bb41c1b3205a3aa9bff3b1b155c07a --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/mces.py @@ -0,0 +1,115 @@ +"""Fixed-protocol post-hoc MCES with a private copy of the existing pair cache.""" +from concurrent.futures import ProcessPoolExecutor +import gzip +import hashlib +import importlib.util +import json +import math +from pathlib import Path +import sqlite3 +import statistics +import sys +import time + +HERE=Path(__file__).resolve().parent;C=json.loads((HERE/'config.json').read_text());OUT=Path(C['output']) +OLD=Path('/root/xj/SpecPartition-MS/evaluations/mces_all_20261106') +spec=importlib.util.spec_from_file_location('frozen_mces_baseline_engine',OLD/'evaluate_all.py') +old=importlib.util.module_from_spec(spec);sys.modules[spec.name]=old;spec.loader.exec_module(old) + + +def save(path,obj): + path=Path(path);path.parent.mkdir(parents=True,exist_ok=True);tmp=Path(str(path)+'.tmp') + if str(path).endswith('.gz'): + with gzip.open(tmp,'wt',compresslevel=3) as f:json.dump(obj,f,separators=(',',':'),allow_nan=False) + else:tmp.write_text(json.dumps(obj,indent=2,allow_nan=False)+'\n') + tmp.replace(path) + + +def digest(path): + h=hashlib.sha256() + with Path(path).open('rb') as f: + for b in iter(lambda:f.read(1024*1024),b''):h.update(b) + return h.hexdigest() + + +def initialize(): + folder=OUT/'mces';folder.mkdir(parents=True,exist_ok=True) + if not (folder/'pairs.sqlite').exists(): + source=sqlite3.connect('file:'+str(OLD/'pairs.sqlite')+'?mode=ro',uri=True) + target=sqlite3.connect(folder/'pairs.sqlite');source.backup(target);target.close();source.close() + save(folder/'CACHE_SOURCE.json',dict(source=str(OLD/'pairs.sqlite'),copied_readonly=True,source_modified=False, + protocol_id=old.PROTOCOL_ID,unix_time=time.time())) + provenance=old.provenance(folder) + if provenance['packages']['myopic-mces']!=C['mces']['version'] or provenance['packages']['pulp']!=C['mces']['pulp']: + raise RuntimeError('MCES dependency mismatch') + original=json.loads((OLD/'provenance.json').read_text()) + if original['protocol_id']!=old.PROTOCOL_ID or provenance['module_sha256']!=original['module_sha256']: + raise RuntimeError('MCES baseline engine mismatch') + return old.connect(folder) + + +def compute(directory,db): + with gzip.open(directory/'per_spectrum_summary.json.gz','rt') as f:rows=json.load(f) + inputs=[];todo={} + for row in rows: + truth=old.identity(row['reference_smiles']);prediction=old.identity(row.get('top1_smiles'));key=None + if truth and prediction: + key=hashlib.sha256(json.dumps([old.PROTOCOL_ID,truth[0],prediction[0]],separators=(',',':')).encode()).hexdigest() + found=db.execute('SELECT status FROM pairs WHERE id=?',(key,)).fetchone() + if found is None or found[0]!='completed': + todo[key]=(key,truth[0],prediction[0]) + db.execute('INSERT OR IGNORE INTO pairs(id,s1,s2,priority) VALUES (?,?,?,0)',todo[key]) + inputs.append((row,key)) + db.commit();tasks=list(todo.values());done=0;started=time.monotonic() + with ProcessPoolExecutor(max_workers=C['mces']['workers']) as pool: + for start in range(0,len(tasks),128): + for key,status,value,mode,seconds,detail in pool.map(old.worker,tasks[start:start+128],chunksize=1): + db.execute('UPDATE pairs SET status=?,distance=?,mode=?,seconds=?,detail=?,attempts=attempts+1 WHERE id=?', + (status,value,mode,seconds,detail,key));done+=1 + db.commit();save(directory/'MCES_status.json',dict(processed_new_pairs=done,total_new_pairs=len(tasks), + seconds=time.monotonic()-started,unix_time=time.time())) + result={};details=[] + for view in sorted({r['view'] for r in rows}): + valid=[];missing=0;modes={};unresolved=0 + selected=[(r,k) for r,k in inputs if r['view']==view] + for row,key in selected: + hit=db.execute('SELECT status,distance,mode,detail FROM pairs WHERE id=?',(key,)).fetchone() if key else None + value=hit[1] if hit and hit[0]=='completed' else None + meta=json.loads(hit[3]) if hit and hit[3] else {} + if value is None:missing+=1 + else: + if not math.isfinite(value) or value<0:raise RuntimeError('Invalid cached MCES') + valid.append(value);modes[str(hit[2])]=modes.get(str(hit[2]),0)+1 + timed=any(s['status'] not in (1,-1) or (s['status']==1 and s['solution_status'] not in (1,2)) for s in meta.get('solver_states',[])) + unresolved+=timed + details.append(dict(identifier=row['identifier'],view=view,distance=value,mode=hit[2] if hit else None, + solver_unresolved=timed,detail=meta,missing_reason='missing_prediction' if not key else ('solver_failure' if value is None else None))) + result[view]=dict(n=len(selected),valid=len(valid),missing=missing,valid_mean=statistics.mean(valid) if valid else None, + full_mean=statistics.mean(valid) if valid and not missing else None,modes=modes,solver_unresolved=unresolved) + save(directory/'MCES_per_spectrum.json.gz',details) + save(directory/'MCES.json',dict(complete=True,protocol=old.PROTOCOL,protocol_id=old.PROTOCOL_ID, + views=result,approximation_and_timeout_modes_preserved=True,predictions_modified=False,unix_time=time.time())) + + +def run(): + OUT.mkdir(parents=True,exist_ok=True) + while not (OUT/'FROZEN.json').exists():time.sleep(2) + db=initialize() + names=[f'{arm}_{u:06d}' for arm in ('main','control') for u in (3000,4000)] + while True: + pending=[] + for name in names: + for dataset in C['datasets']: + directory=OUT/'inference'/name/dataset + if not (directory/'MCES.json').exists(): + pending.append(str(directory)) + if (directory/'COMPLETE.json').exists():compute(directory,db) + all_complete=all((OUT/'inference'/name/d/'MCES.json').exists() for name in names for d in C['datasets']) + save(OUT/'MCES_progress.json',dict(complete=all_complete,pending=pending,unix_time=time.time())) + if all_complete: + save(OUT/'ALL_INFERENCE_AND_MCES_COMPLETE.json',dict(complete=True,models=names,datasets=C['datasets'],unix_time=time.time())) + db.close();return + time.sleep(5) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/parallel-models.supervisor.conf b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/parallel-models.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..94508989fb1eed3fa84a99e4b6d81fb145fa5e4f --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/parallel-models.supervisor.conf @@ -0,0 +1,55 @@ +[program:specpartition-ceir-test-main3k-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u -c "from infer import evaluate; evaluate('main_003000','msg_test'); evaluate('main_003000','casmi2022')" +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main_003000.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main_003000_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-main4k-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u -c "from infer import evaluate; evaluate('main_004000','msg_test'); evaluate('main_004000','casmi2022')" +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main_004000.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main_004000_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-control3k-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u -c "from infer import evaluate; evaluate('control_003000','msg_test'); evaluate('control_003000','casmi2022')" +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control_003000.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control_003000_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-control4k-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u -c "from infer import evaluate; evaluate('control_004000','msg_test'); evaluate('control_004000','casmi2022')" +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control_004000.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control_004000_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/prepare.py b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/prepare.py new file mode 100644 index 0000000000000000000000000000000000000000..1ada4cb22a4dc46840c74adbd59b8645250c75f6 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/prepare.py @@ -0,0 +1,78 @@ +"""Input-only Test annotations. Does not read reference SMILES/formula fields.""" +from collections import Counter +from concurrent.futures import ProcessPoolExecutor +import json +import multiprocessing +import sqlite3 +import time +import zlib +from evaluation_runtime import * +from evidence_ceir import annotate,encode + + +def initialize_worker(): + from functools import lru_cache + from rdkit import RDLogger + import evidence_ceir + RDLogger.DisableLog('rdApp.*') + evidence_ceir.library=lru_cache(maxsize=C['annotation_formula_cache'])(evidence_ceir.library.__wrapped__) + + +def worker(task): + q,formulas=task;key=query_key(q) + return [(key,f,encode(annotate(q,f))) for f in formulas] + + +def tasks(dataset): + db=readonly(PREP/(dataset+'.sqlite')) + for target, in db.execute('SELECT DISTINCT target FROM spectra ORDER BY target'): + _,_,formulas,_=universe(db,target,dataset) + fs=tuple(sorted(set(f for values in formulas.values() for f in values))) + for body, in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier',(target,)): + # Only this label-free query object and official/frozen formula union + # enter annotation; reference identity and reference formula are unused. + yield loads(body)['query'],fs + db.close() + + +def prepare(): + OUT.mkdir(parents=True,exist_ok=True);check_disk();frozen=freeze() + dest=OUT/'prepared';dest.mkdir(exist_ok=True) + with ProcessPoolExecutor(max_workers=C['annotation_workers'],initializer=initialize_worker,mp_context=multiprocessing.get_context('spawn')) as pool: + for dataset in C['datasets']: + marker=dest/(dataset+'_composition_READY.json') + if marker.exists(): + old=json.loads(marker.read_text()) + if old['inputs']!=frozen['inputs'][dataset] or old['rule']!=RULE:raise RuntimeError('Annotation binding changed') + continue + db=sqlite3.connect(dest/(dataset+'_composition.sqlite'));db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS evidence(query_key TEXT,formula TEXT,body BLOB,PRIMARY KEY(query_key,formula))') + scanned=0;needed=0;reason=Counter();started=time.monotonic();pending=iter(tasks(dataset));done=False + while not done: + chunk=[] + for _ in range(C['annotation_query_chunk']): + try:q,fs=next(pending) + except StopIteration:done=True;break + key=query_key(q);scanned+=1 + missing=[f for f in fs if db.execute('SELECT 1 FROM evidence WHERE query_key=? AND formula=?',(key,f)).fetchone() is None] + needed+=len(fs) + if missing:chunk.append((q,missing)) + for result in pool.map(worker,chunk,chunksize=2): + for key,f,blob in result: + db.execute('INSERT OR IGNORE INTO evidence VALUES (?,?,?)',(key,f,blob)) + meta=json.loads(zlib.decompress(blob));reason[meta['reason']]+=1 + db.commit();check_disk() + save(dest/'status.json',dict(dataset=dataset,queries_scanned=scanned,total_queries=17556 if dataset=='msg_test' else 500, + reason=dict(reason),seconds=time.monotonic()-started,unix_time=time.time())) + print(json.dumps(dict(dataset=dataset,queries=scanned,annotation_requests=needed,seconds=time.monotonic()-started)),flush=True) + expected=17556 if dataset=='msg_test' else 500 + if scanned!=expected:raise RuntimeError('Annotation query denominator mismatch') + count=db.execute('SELECT COUNT(*) FROM evidence').fetchone()[0] + db.execute('PRAGMA wal_checkpoint(TRUNCATE)');db.close() + save(marker,dict(complete=True,rule=RULE,inputs=frozen['inputs'][dataset],queries=scanned, + unique_pairs=count,annotation_requests=needed,reasons_generated_this_attempt=dict(reason), + labels_used=False,reference_structure_used=False,original_pools_unchanged=True,unix_time=time.time())) + save(dest/'COMPLETE.json',dict(complete=True,datasets=C['datasets'],labels_used=False,unix_time=time.time())) + + +if __name__=='__main__':prepare() diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/supervisor.conf b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..67f4b8d6bb528cbc89182768467ffaa150b56b2e --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/supervisor.conf @@ -0,0 +1,55 @@ +[program:specpartition-ceir-test-prepare-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u prepare.py +environment=CUDA_VISIBLE_DEVICES="",OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/prepare.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/prepare_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-control-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u infer.py --arm control +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/control_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-main-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u infer.py --arm main +environment=OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1",CUBLAS_WORKSPACE_CONFIG=":4096:8" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/main_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB + +[program:specpartition-ceir-test-mces-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110 +command=/usr/bin/nice -n 19 /root/xj/SpecPartition-MS/evaluations/mces_all_20261106/.venv/bin/python -u mces.py +environment=CUDA_VISIBLE_DEVICES="",OMP_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",MKL_NUM_THREADS="1",PYTHONDONTWRITEBYTECODE="1" +autostart=false +autorestart=false +startsecs=5 +stopasgroup=true +killasgroup=true +stdout_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/mces.log +stderr_logfile=/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/logs/mces_error.log +stdout_logfile_maxbytes=20MB +stderr_logfile_maxbytes=20MB diff --git a/code/snapshot/root/code/ceir_r1_test_comparison_20261110/test_logic.py b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/test_logic.py new file mode 100644 index 0000000000000000000000000000000000000000..78184d85350271f3d7d5accc22570fa63f4cead1 --- /dev/null +++ b/code/snapshot/root/code/ceir_r1_test_comparison_20261110/test_logic.py @@ -0,0 +1,41 @@ +import json +from dataclasses import replace +from types import SimpleNamespace +import unittest +import numpy as np +from evaluation_runtime import C,MODELS +from evidence_ceir import annotate,query_key + + +class EvaluationTests(unittest.TestCase): + def test_exact_model_set_before_Test(self): + self.assertEqual(set(MODELS),{'main_003000','main_004000','control_003000','control_004000'}) + + def test_no_candidate_truncation_or_truth_injection(self): + self.assertIsNone(C['candidate_limit']);self.assertFalse(C['truth_injection']) + self.assertFalse(C['test_used_for_selection']);self.assertFalse(C['training_or_optimizer_updates']) + + def test_primary_checkpoint_is_preselected(self): + self.assertEqual(C['primary_update'],3000);self.assertEqual(C['fixed_endpoint_update'],4000) + self.assertEqual(len(C['parent_sha256']),64) + + def test_annotation_does_not_use_reference_fields(self): + q=SimpleNamespace(peaks=((50.,1.),(80.,.5)),precursor_mz=123.4,adduct='[M+H]+',collision_energy=None,instrument=None) + before=annotate(q,'C6H12O6');key=query_key(q) + q.reference_smiles='invalid_truth_must_not_be_read';q.reference_formula='C9999';q.identity='not_a_feature' + after=annotate(q,'C6H12O6') + self.assertEqual(query_key(q),key) + np.testing.assert_array_equal(before['features'],after['features']) + np.testing.assert_array_equal(before['valid'],after['valid']) + + def test_raw_aliases_still_consume_ranking_positions(self): + import sys + from pathlib import Path + sys.path.insert(0,str(Path(C['root'])/'rebuild/post_training_evaluation_20261103')) + from evaluate import rank_entries + aliases={'a':('g','same'),'b':('g','same'),'c':('h','other'),'d':(None,'missing')} + scores,order=rank_entries(['a','b','c','d'],aliases,{'g':3.,'h':2.}) + self.assertEqual(order,[0,1,2,3]);self.assertIsNone(scores[3]) + + +if __name__=='__main__':unittest.main() diff --git a/code/snapshot/root/code/ceir_r2_20261110/METHOD.md b/code/snapshot/root/code/ceir_r2_20261110/METHOD.md new file mode 100644 index 0000000000000000000000000000000000000000..e9b339e9a0f5a80dc3a2b80cfadd9573571aa079 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/METHOD.md @@ -0,0 +1,133 @@ +# CEIR-R2: C03-preserving chemical and connected-fragment evidence + +## Authority and scope + +Independent continuation of C03 `step_002000.pt`, SHA256 +`8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6`. +Old data, pools, checkpoints, code and services are read-only. Formal training +requires completed offline preparation and real GPU acceptance. Temporary +preflight updates never count as scientific continuation steps. + +Four arms start from exactly the same old parameters, optimizer moments and RNG: + +| Arm | Negative draws | New learned evidence | +| --- | --- | --- | +| A0 | Actual original C03 random sampling with replacement | None | +| A1 | Random distinct negative key14 where available | None | +| A2 | Same frozen draws as A1 | Seven chemical count distributions | +| A3 | Same frozen draws as A1 | A2 plus connected-fragment intensity and peak matching | + +The independent-identity sampler is a training-only draw intervention. It does +not deduplicate or alter the raw candidate records. A0 keeps the original draw +distribution. Small pools in A1/A2/A3 use all available independent negatives; +their realized budget and original A0 repeated draws are reported, not claimed +to be identical physical compute. Positives must already exist in the original +eligible pool. No Test/CASMI structure may become a training negative. + +## Preserved supervision + +The actual C03 active objective and weights are retained: formula CE, its +configured hard-formula gap and element supervision; grouped MS-to-molecule and +molecule-to-multiple-MS contrastive objectives; fine MS-MS and stochastic +molecule-molecule auxiliaries; and one final-score candidate-pool softmax CE for +each o_data, MSG Mass and MSG Formula view. Different MS of the same connectivity +are not negatives. MSG uses both official views, not a merged candidate pool. +Parent batches and data cursor are replayed verbatim; some steps have an empty +o_data group at the parent epoch boundary. Therefore the manifest, not a claim +that every step has 288 records, defines exposure. + +All arms receive the same engineering correction: reinstall the molecular +dropout hook during activation recomputation. Zero-weight coarse losses are not +evaluated, but their head zero gradients are retained for AdamW semantics. +There is no duplicate same-pool CE, R1 conditional CE, R1 fingerprint auxiliary, +R1 teacher-mining index, SIRIUS score or CSI score in this release. + +## A2: chemical count evidence + +The spectrum representation predicts seven 33-class distributions (0–31, +overflow 32): OH, carbonyl, ether SMARTS matches, aromatic rings, aliphatic rings, +heterocycles and components. SMARTS match counts are descriptors, not a claim +that overlapping functional-group definitions are independent observations. +Each candidate is evaluated against those distributions. The candidate count +log-probability averaged across traits, centered on the uniform distribution, +is a learned residual to the unchanged parent score. The last classifier layer +is initialized to zero, so the initial residual is exactly zero. The scale is +nonzero to avoid R1's tiny-gate/dead-gradient problem. + +Reference counts are training targets only. They are not passed to inference. +The count auxiliary is averaged by independent reference connectivity, with a +maximum weight 0.05 after a 100-step ramp. + +## A3: connected cut hypotheses, not oracle fragments + +At most 32 connected proper subgraphs are constructed per candidate from +deterministically selected non-ring single-bond cuts and pairs of ring cuts. +Their atom membership, cut boundaries, original atom/H masses and masks are +precomputed. Their representations pool the **current trainable GNN** atom +features; old GNN embeddings are not cached as student features. + +A candidate-and-adduct/CE/instrument-conditioned intensity head predicts five +hydrogen-shift hypotheses and up to two ion-retention templates per subgraph. +It cannot read the observed spectrum when reconstructing it. Exact observed +peak locations provide a deterministic matching mask and a discriminative +fragment–peak alignment branch. Unexplained predicted intensity contributes to +the reconstruction denominator, preventing all unmatched hypotheses from being +silently discarded. The final residual readout is zero-initialized. + +These are approximate fragmentation hypotheses, not guaranteed chemical +products or supervised fragment annotations. Hypothesis matching uses +`max(20 ppm, 0.02 Da)`; this is **not** the candidate generation tolerance. +The original candidate precursor 10 ppm checks and frozen pools are unchanged. +Double-charge and unsupported fragment structures retain the complete parent +score and count branch; they are not removed. Spectrum supervision is applied +only where the positive hypothesis mask explains at least 5% of non-precursor +intensity and input mass QC passes. The eligibility count is logged. A record +appearing in MSG Mass and Formula gets this auxiliary once, not twice. + +## Joint objective and numerical controls + +`L = L_actual_C03 + ramp * (0.05 L_count + 0.05 L_spectrum)` +with each new term enabled only for its arm. Final pool CE is computed on the +actual final score, once. Formula learning is not frozen or replaced. + +Backbone learning rate is 0.3 times the parent's saved learning rate; new heads +use 1e-4. A common 100-step ramp and predeclared 2k cosine continuation schedule +apply. The initial pilot ends at cumulative 3,000 (+1,000) updates. All 2k +prospective candidate ledgers are prepared so a Validation-authorized paired +extension will not introduce an on-the-fly sampling change. + +Training chunks: spectrum 16, graph 256/local 128, 8 candidate views per microbatch; +effective source batches and original candidate budgets are not reduced. +Validation uses spectrum batch 16 and graph/local chunk 32 in every arm, +including a freshly evaluated C03 baseline. BF16 weighted-local rounding is +preserved before zero-initialized FP32 residuals are added. + +The configuration is chosen from a real mixed-batch engineering probe, not a +claim of production-wide speedup: A0 was 3.56s at graph128/views4 and 2.43s at +graph256/views8; A3 was 7.27s and 5.66s respectively. Peak allocated memory was +about 1.8 GiB with the selected tile in that batch. Larger views16 did not help +A3, so it was not adopted. BF16 grouping and molecular dropout chunk shapes can +change numerical trajectories; all formal arms use the same selected setting. + +The preflight found that raw asset alias strings can retain stereo while the +parent's graph reparses non-stereo canonical SMILES. An independent canonical +feature table aligns exactly to the parent atom order. Partial raw R2 features +remain as audit evidence; they are not selected by training. No original data +or candidate identity was removed or changed in this repair. + +## Acceptance and decision rules + +Verify chemical sanity, original A0 draw equivalence, all-identity safety, +initial C03 score parity, candidate permutation invariance, active old/new +gradients, finite joint objectives and full-state resume reproducibility on a +real mixed 288-query batch. Complete official Validation at cumulative 3,000; +the stable-hash 128-target probes at 2,250/2,500 are diagnostics, not final +reported benchmark performance. + +Select by the harmonic mean of full-Validation Mass/Formula Top1, with each +view's Top1 degradation limited to 0.2 percentage points and MCES checked. +Preserve all arms, including negative results. Report Top1/3/5/10/20/50/100/200, +pool formula Top1–10 and MCES using unchanged denominators and missing-value +policy. Test/CASMI cannot select a checkpoint. Prior Test/CASMI badcases have +informed this design, so those sets are development-exposed, not pristine final +holdouts. No improvement is promised before results exist. diff --git a/code/snapshot/root/code/ceir_r2_20261110/acceptance_r2.py b/code/snapshot/root/code/ceir_r2_20261110/acceptance_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..ae6a690554758dd5a796ed2aff77f28349b7b035 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/acceptance_r2.py @@ -0,0 +1,102 @@ +"""Real GPU, initial-score, gradient and exact full-state resume acceptance.""" +import argparse +import gc +import json +import time +import traceback +import uuid +from dataclasses import replace +from runtime_r2 import * + + +def run(provisional=False): + import torch + from data_r2 import Dataset + from model_r2_new import make_model_optimizer + from objectives_r2 import train_step + from objectives_r2 import chemical_loss + from prepare_ceir import load_teacher + from test_features_r2 import run as feature_tests + feature_tests();setup_gpu() + if provisional: + info=json.loads((PREP/'PROBE_READY.json').read_text());index=info['index'];feature_path=PREP/'probe.sqlite';bind=dict(provisional=True,code=code_manifest()) + else: + if not (PREP/'READY.json').exists():raise RuntimeError('Full R2 data preparation incomplete') + info=json.loads((PREP/'PROBE_READY.json').read_text());index=info['index'];feature_path=PREP/'assets.sqlite';bind=binding() + if any((run_dir(a)/'last.pt').exists() for a in C['arms']):raise RuntimeError('Do not revise acceptance after formal continuation begins') + for arm in C['arms']: + directory=run_dir(arm);history=directory/'acceptance_history' + probe=directory/'probe_002000_0001' + if (probe/'protocol.json').exists() and json.loads((probe/'protocol.json').read_text())['binding']!=bind: + history.mkdir(exist_ok=True);probe.replace(history/('probe_before_fix_'+uuid.uuid4().hex)) + report=directory/'GPU_ACCEPTANCE.json' + if report.exists() and json.loads(report.read_text())['binding']!=bind: + history.mkdir(exist_ok=True);report.replace(history/('GPU_before_fix_'+uuid.uuid4().hex+'.json')) + results=[] + for arm in C['arms']: + directory=run_dir(arm);batch=Dataset(arm,index,index+1,feature_path)[0] + if len(batch['rows'])!=288:raise RuntimeError('Not a real complete joint batch') + with gpu_work(directory,'provisional_GPU_probe' if provisional else 'full_GPU_acceptance'): + model,opt,progress,parent_lr=make_model_optimizer(arm);model.install_features(feature_path) + old_steps=[float(s['step']) for s in opt.state.values() if 'step' in s] + q=next(p['query'] for r in batch['rows'] for p in r['pools']);model.eval();parent=load_teacher() + parent.graph_chunk=model.graph_chunk;parent.local_chunk=model.local_chunk + with torch.inference_mode(),amp(): + expected=parent.encode_batch([q])[0][0].base.float();actual=model.encode_batch([q])[0][0].base.float() + parity=(expected-actual).abs().max().item() + if parity>3e-4:raise RuntimeError('Initial parent score parity failed '+str(parity)) + perm=list(reversed(range(len(q.candidates)))) + shuffled=replace(q,candidates=tuple(q.candidates[i] for i in perm)) + permuted=model.encode_batch([shuffled])[0][0].base.float() + error=(permuted-actual[perm]).abs().max().item() + if error>3e-4:raise RuntimeError('Candidate permutation leak '+str(error)) + del parent;gc.collect();torch.cuda.empty_cache();restore_rng(parent_state());model.train();torch.cuda.reset_peak_memory_stats() + metrics=[train_step(model,opt,batch,C['source_update']+i) for i in range(2 if arm in ('A2','A3') else 1)] + if metrics[-1]['backbone_gradient_norm']<=0:raise RuntimeError('No backbone gradient') + if arm in ('A2','A3') and metrics[-1]['chemical_gradient_norm']<=0:raise RuntimeError('No chemical head gradient') + if arm=='A3' and (metrics[-1]['fragment_gradient_norm']<=0 or not metrics[-1]['spectrum_valid']):raise RuntimeError('No actual fragment supervision tested') + isolated={} + if arm in ('A2','A3'): + _,qcheck,_=model.spectrum.forward_batch([r['query'] for r in batch['rows'][:8]]) + count=chemical_loss(model,qcheck.float(),batch['rows'][:8]) + grad=torch.autograd.grad(count,model.spectrum.peak[0].weight)[0] + isolated['count_to_spectrum_encoder_norm']=float(grad.float().norm()) + if isolated['count_to_spectrum_encoder_norm']<=0:raise RuntimeError('Count auxiliary does not reach the spectrum encoder') + if arm=='A3': + candidate=next(p for r in batch['rows'] for p in r['pools'] if p['spectrum_eligible']) + with amp():encoded=model.encode_batch([candidate['query']])[0][0] + grad=torch.autograd.grad(encoded.r2_spectrum[0][candidate['positive_index']],model.graph.atom.weight)[0] + isolated['spectrum_reconstruction_to_graph_encoder_norm']=float(grad.float().norm()) + if isolated['spectrum_reconstruction_to_graph_encoder_norm']<=0:raise RuntimeError('Reconstruction auxiliary does not reach the graph encoder') + path=directory/'acceptance_temporary.pt';temporary_progress=dict(progress,update=C['source_update']+len(metrics),new_updates=len(metrics)) + checkpoint(path,model,opt,temporary_progress,bind) + before=train_step(model,opt,batch,temporary_progress['update'],False)['loss'] + del model,opt;gc.collect();torch.cuda.empty_cache() + model,opt,loaded,_=make_model_optimizer(arm,path);model.install_features(feature_path) + after=train_step(model,opt,batch,loaded['update'],False)['loss'];resume=abs(before-after) + if resume>3e-4:raise RuntimeError('Full-state RNG/optimizer resume mismatch '+str(resume)) + result=dict(complete=True,provisional=provisional,arm=arm,queries=len(batch['rows']),initial_logit_max_error=parity, + candidate_permutation_max_error=error,resume_loss_abs_error=resume,parameters=sum(p.numel() for p in model.parameters()), + original_optimizer_state_entries=len(old_steps),metrics=metrics,binding=bind,formal_updates=0, + old_optimizer_step_max=max(old_steps),isolated_auxiliary_gradients=isolated,data_ledger_sha256=batch['ledger_sha256'],unix_time=time.time()) + save(directory/('PROVISIONAL_GPU.json' if provisional else 'GPU_ACCEPTANCE.json'),result);results.append(result) + print(json.dumps(dict(arm=arm,parity=parity,resume=resume,parameters=result['parameters'],seconds=metrics[-1]['step_compute_seconds'],peak_mib=metrics[-1]['peak_allocated_mib'])),flush=True) + del model,opt;gc.collect();torch.cuda.empty_cache() + if not provisional: + # Validation adapter is exercised separately before training is admitted. + from validate_r2 import evaluate + for arm in ('A0','A3'): + with gpu_work(run_dir(arm),'Validation_entrypoint_acceptance'): + model,opt,_,_=make_model_optimizer(arm);del opt + val=evaluate(model,arm,C['source_update'],maximum_targets=1) + if any(not val[v]['spectra'] for v in ('mass','formula')):raise RuntimeError('Empty Validation acceptance') + del model;gc.collect();torch.cuda.empty_cache() + save(OUT/'TRAIN_READY.json',dict(complete=True,binding=binding(),all_four_arms_real_GPU_verified=True, + full_preparation_complete=True,formal_updates=0,unix_time=time.time())) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--provisional',action='store_true');a=p.parse_args() + try:run(a.provisional) + except Exception: + save(OUT/('PROVISIONAL_GPU_FAILURE.json' if a.provisional else 'GPU_FAILURE.json'),dict(traceback=traceback.format_exc(),unix_time=time.time()));raise diff --git a/code/snapshot/root/code/ceir_r2_20261110/analyze_r2.py b/code/snapshot/root/code/ceir_r2_20261110/analyze_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..33eda18105733d369c12faa1938d2208d24508c7 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/analyze_r2.py @@ -0,0 +1,76 @@ +"""Independent row-level reaggregation and Validation-only selection.""" +from collections import defaultdict +import gzip +import json +from pathlib import Path +import statistics +import time +from runtime_r2 import * + + +def rows(directory): + with gzip.open(Path(directory)/'per_spectrum_summary.json.gz','rt') as f:return json.load(f) + + +def aggregate(directory): + original=json.loads((Path(directory)/'metrics.json').read_text());rr=rows(directory);out={} + for view in ('mass','formula'): + selected=[r for r in rr if r['view']==view] + if len(selected)!=19429 or len({r['identifier'] for r in selected})!=19429:raise RuntimeError('Wrong Validation population') + out[view]={} + for field,kind,ks in [('rank','structure',(1,3,5,10,20,50,100,200)),('formula_rank','formula',(*range(1,11),20,50,100,200))]: + out[view][kind]={} + for k in ks: + hits=sum(r[field] is not None and r[field]<=k for r in selected);value=hits/len(selected) + if abs(value-original[view][kind][str(k)]['micro'])>1e-12:raise RuntimeError('Independent aggregate disagrees') + out[view][kind][str(k)]=dict(hits=hits,n=len(selected),value=value) + mces=json.loads((Path(directory)/'MCES.json').read_text());out['MCES']=mces['views'] + x=out['mass']['structure']['1']['value'];y=out['formula']['structure']['1']['value'];out['harmonic_Top1']=2*x*y/(x+y) + return out + + +def selection(): + baseline=aggregate(run_dir('A0')/'validation_002000') + arms={a:aggregate(run_dir(a)/'validation_003000') for a in C['arms']};control=arms['A0'];decisions={} + tolerance=C['validation_degradation_tolerance_pp']/100 + for arm,current in arms.items(): + structural=all(current[v]['structure']['1']['value']>=baseline[v]['structure']['1']['value']-tolerance for v in ('mass','formula')) + mces=all(current['MCES'][v]['valid']==baseline['MCES'][v]['valid'] and + current['MCES'][v]['valid_mean']<=baseline['MCES'][v]['valid_mean']+.1 for v in ('mass','formula')) + improvement=current['harmonic_Top1']>max(baseline['harmonic_Top1'],control['harmonic_Top1']) + decisions[arm]=dict(each_view_Top1_guard=structural,MCES_guard=mces,harmonic_improves_parent_and_continuation=improvement, + passes=structural and mces and improvement,harmonic_gain_vs_parent_pp=100*(current['harmonic_Top1']-baseline['harmonic_Top1']), + harmonic_gain_vs_A0_pp=100*(current['harmonic_Top1']-control['harmonic_Top1'])) + passed=[a for a,d in decisions.items() if a!='A0' and d['passes']] + recommended=max(passed,key=lambda a:arms[a]['harmonic_Top1']) if passed else None + result=dict(complete=True,baseline=baseline,arms=arms,guardrails=decisions,recommended_arm=recommended, + measured_improvement=bool(recommended),test_used_for_selection=False, + rule='full_Validation_harmonic_Top1_each_view_0.2pp_and_MCES_0.1_guard', + extension_automatically_started=False,development_exposure=C['test_development_exposure'],unix_time=time.time()) + save(OUT/'SELECTION.json',result) + return result + + +def write_test_comparison(): + selection_result=json.loads((OUT/'SELECTION.json').read_text());dest=OUT/'test';models=json.loads((dest/'FROZEN.json').read_text())['models'] + result=dict(complete=True,Validation_selection=selection_result['recommended_arm'],Test_used_for_selection=False, + development_exposure=C['test_development_exposure'],models={}) + for name in models: + result['models'][name]={} + for dataset in ('msg_test','casmi2022'): + directory=dest/'inference'/name/dataset + if not (directory/'COMPLETE.json').exists() or not (directory/'MCES.json').exists():raise RuntimeError('Test/MCES incomplete') + metric=json.loads((directory/'metrics.json').read_text());raw=rows(directory) + expected=17556 if dataset=='msg_test' else 500 + for view in {r['view'] for r in raw}: + rr=[r for r in raw if r['view']==view] + if len(rr)!=expected or len({r['identifier'] for r in rr})!=expected:raise RuntimeError('Test population mismatch') + result['models'][name][dataset]=dict(metrics=metric,MCES=json.loads((directory/'MCES.json').read_text())) + save(OUT/'ALL_RESULTS.json',result) + return result + + +if __name__=='__main__': + import argparse + p=argparse.ArgumentParser();p.add_argument('--test',action='store_true');a=p.parse_args() + write_test_comparison() if a.test else selection() diff --git a/code/snapshot/root/code/ceir_r2_20261110/audit_r2.py b/code/snapshot/root/code/ceir_r2_20261110/audit_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..0c711538c6e32292ba37d0d3e047f2a1f736ad41 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/audit_r2.py @@ -0,0 +1,66 @@ +"""Scoped independent checks before formal data/GPU admission.""" +from collections import Counter +import hashlib +import json +import time +from runtime_r2 import * +from data09 import Reader +import features_r2 as features + + +def run(): + ready=json.loads((PREP/'READY.json').read_text()) + if not ready.get('exact_parent_literal_alignment',{}).get('complete'):raise RuntimeError('Exact parent literal key alignment is incomplete') + if ready['feature_code_sha256']!=sha(HERE/'features_r2.py'):raise RuntimeError('Prepared feature code differs') + parent_state();db=readonly(PREP/'assets.sqlite');reader=Reader();plans=json.loads((OLD.CACHE/'workload.json').read_text())['plans'][:C['manifest_updates']] + if db.execute('PRAGMA quick_check').fetchall()!=[('ok',)]:raise RuntimeError('Prepared SQLite integrity check failed') + if db.execute('SELECT count(*) FROM canonical_features WHERE feature IS NULL OR feature_sha IS NULL').fetchone()[0]:raise RuntimeError('Incomplete static candidate cache') + safety_count=0 + for identity, in db.execute('SELECT identity FROM graph_metadata'): + if identity in reader.forbidden:raise RuntimeError('Heldout structure in training-negative scope') + safety_count+=1 + hashes={};stats={};expected_rows=Counter();actual_rows=Counter() + for _,_,groups in plans: + for source,ids in groups.items():expected_rows[source]+=len(ids) + for mode in ('replacement','unique'): + hashes[mode]=[];totals=Counter() + for index,(blob,) in enumerate(db.execute('SELECT body FROM batches WHERE mode=? ORDER BY idx',(mode,))): + plan=features.loads(blob);epoch,step,groups=plans[index] + expected=[rid for ids in groups.values() for rid in ids] + if [r['rid'] for r in plan['rows']]!=expected or plan['epoch']!=epoch or plan['step']!=step:raise RuntimeError('Candidate ledger data cursor drift') + hashes[mode].append(hashlib.sha256(blob).hexdigest());totals['queries']+=len(expected) + for r in plan['rows']: + for p in r['pools']: + if p['reference_injected'] or len(p['graphs'])!=p['negative_draws']+1:raise RuntimeError('Candidate count or injection mismatch') + if mode=='unique' and p['negative_draws']!=p['unique_negative_key14']:raise RuntimeError('Distinct-identity sampler contains repeats') + totals['draws']+=p['negative_draws'];totals['unique_draws']+=p['unique_negative_key14'];totals[p['kind']+'_pools']+=1 + if len(hashes[mode])!=len(plans):raise RuntimeError('Wrong sampler ledger count') + stats[mode]=dict(totals) + # An independently executed original Reader, not the materializer helper. + checks=Counter();sample_indices=sorted({0,1,17,999,len(plans)-1}) + for index in sample_indices: + epoch,step,groups=plans[index] + frozen=features.loads(db.execute('SELECT body FROM batches WHERE mode=? AND idx=?',('replacement',index)).fetchone()[0]) + position=0 + for source,ids in groups.items(): + for j,rid in enumerate(ids): + seed=C['seed']+epoch*100000000+step*10000+j+(1000000 if source=='msg' else 0) + original=reader.sample(rid,seed,source=='odata' and j<16);stored=frozen['rows'][position];position+=1 + if tuple(original['formulas'])!=tuple(stored['formulas']) or len(original['pools'])!=len(stored['pools']):raise RuntimeError('A0 original formula/pool selection mismatch') + for old,new in zip(original['pools'],stored['pools']): + actual=[(m.identity,m.smiles) for m in old['query'].candidates] + expected=[db.execute('SELECT identity,smiles FROM graph_metadata WHERE graph_hash=?',(g,)).fetchone() for g in new['graphs']] + if actual!=expected or tuple(old['query'].formula_candidates)!=tuple(new['formulas']):raise RuntimeError('A0 original negative draws mismatch') + checks['pool_views']+=1;checks['candidate_draws']+=len(actual) + checks['queries']+=1 + save(PREP/'ledger_hashes.json',hashes) + result=dict(complete=True,parent_sha256=C['parent_sha256'],workload_sha256=sha(OLD.CACHE/'workload.json'), + prepared_database_sha256=sha(PREP/'assets.sqlite'),ledger_hashes_sha256=sha(PREP/'ledger_hashes.json'), + all_prepared_graphs_checked_against_heldout_key14=safety_count,all_steps_cursor_verified=len(plans),sampling=stats, + original_A0_sampler_parity=dict(sampled_steps=sample_indices,checks=dict(checks),mismatches=0, + scope='five actual continuation steps, not a full sampler equivalence proof'), + source_exposures=dict(expected_rows),Test_and_CASMI_labels_used=False,original_files_modified=False,unix_time=time.time()) + save(PREP/'DATA_ACCEPTANCE.json',result);db.close();print(json.dumps(result),flush=True) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/benchmark.supervisor.conf b/code/snapshot/root/code/ceir_r2_20261110/benchmark.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..19fef28e218b477226223529873cb015b6a66e4d --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/benchmark.supervisor.conf @@ -0,0 +1,12 @@ +[program:specpartition-r2-benchmark-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r2_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u /root/xj/SpecPartition-MS/code/ceir_r2_20261110/benchmark_r2.py +environment=PROC_NAME="specpartition-r2-benchmark-20261110",OMP_NUM_THREADS="1",MKL_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",CUBLAS_WORKSPACE_CONFIG=":4096:8",PYTHONUNBUFFERED="1" +autostart=false +autorestart=false +startsecs=2 +stopasgroup=true +killasgroup=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/code/snapshot/root/code/ceir_r2_20261110/benchmark_r2.py b/code/snapshot/root/code/ceir_r2_20261110/benchmark_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..90b4ce90e02c76fb031cc90efa864b7772b7b30e --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/benchmark_r2.py @@ -0,0 +1,29 @@ +"""Real mixed-batch engineering benchmark, no formal optimizer updates.""" +import gc +import json +import torch +from runtime_r2 import * +from data_r2 import Dataset +from model_r2_new import make_model_optimizer +from objectives_r2 import train_step + + +def run(): + setup_gpu();index=json.loads((PREP/'PROBE_READY.json').read_text())['index'];results=[] + for arm in ('A0','A3'): + batch=Dataset(arm,index,index+1,PREP/'probe.sqlite')[0] + with gpu_work(OUT,'engineering_benchmark'): + model,opt,_,_=make_model_optimizer(arm);model.install_features(PREP/'probe.sqlite');model.train() + for graphs,views,threshold in [(128,4,6000),(256,8,12000),(256,16,16000)]: + model.graph_chunk=graphs;LEGACY.C['graph_chunk']=graphs;LEGACY.C['pool_micro_views']=views + model.activation_checkpoint_atom_threshold=threshold;restore_rng(parent_state());torch.cuda.empty_cache();torch.cuda.reset_peak_memory_stats() + metrics=train_step(model,opt,batch,2000,False) + row=dict(arm=arm,graph_chunk=graphs,micro_views=views,threshold=threshold, + seconds=metrics['step_compute_seconds'],peak_mib=metrics['peak_allocated_mib'],loss=metrics['loss']) + results.append(row);print(json.dumps(row),flush=True) + del model,opt;gc.collect();torch.cuda.empty_cache() + save(OUT/'ENGINEERING_BENCHMARK.json',dict(complete=True,formal_optimizer_updates=0, + caution='BF16 grouping and stochastic dropout draws can change numerical trajectories; same setting is used in all formal arms',results=results)) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/canonical_cache_r2.py b/code/snapshot/root/code/ceir_r2_20261110/canonical_cache_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..e1b562e89f8ca4d12c1e9683f9c0a49f0a16e989 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/canonical_cache_r2.py @@ -0,0 +1,110 @@ +"""Recoverable canonical-key migration of this release's partial static cache. + +Original sources and raw R2 rows remain untouched. The trainable parent graph +canonicalizes without stereo and reparses; reproduce its atom numbering here. +""" +from collections import Counter +from concurrent.futures import ProcessPoolExecutor +import hashlib +import json +import multiprocessing +import sqlite3 +import time +from rdkit import Chem +from runtime_r2 import * +import features_r2 as features + + +def canonicalize(smiles): + mol=Chem.MolFromSmiles(smiles) + if mol is None:raise RuntimeError('Invalid already-accepted candidate') + Chem.RemoveStereochemistry(mol) + return Chem.MolToSmiles(mol,canonical=True,isomericSmiles=False) + + +def normalize(task): + raw,smiles,scope,blob,digest=task;canonical=canonicalize(smiles);fk=features.key(canonical) + return raw,fk,canonical,scope,blob if smiles==canonical else None,digest if smiles==canonical else None + + +def generate(smiles): + body=features.dumps(features.build(smiles)) + return features.key(smiles),body,hashlib.sha256(body).hexdigest() + + +def align_parent_literals(db): + """Canonicalization is not always idempotent for explicit stereo H. + + Parent Molecule.smiles is saved before its final reparse. Retain that exact + valid string as the feature key; parse it to reproduce the saved atom order. + This changes no compound identity or candidate membership. + """ + marker=PREP/'PARENT_LITERAL_ALIGNMENT.json' + if marker.exists():return json.loads(marker.read_text()) + rare=db.execute('SELECT m.feature_key,m.smiles,c.canonical_key FROM molecules m JOIN canonical_aliases c ON c.raw_key=m.feature_key WHERE c.raw_key!=c.canonical_key').fetchall() + for raw,smiles,canonical in rare: + fk,body,digest=generate(smiles) + db.execute('INSERT OR IGNORE INTO canonical_features VALUES (?,?,?,?,?)',(fk,smiles,'exact_parent_literal',body,digest)) + changed={r[2] for r in rare};pending=[gh for gh,fk in db.execute('SELECT graph_hash,feature_key FROM graph_metadata') if fk in changed] + from data09 import Reader + reader=Reader();fixed=0 + for gh in pending: + mol=reader.molecule(gh);fk,body,digest=generate(mol.smiles) + value=features.loads(body) + if value['layout']!=features.layout(mol.mol):raise RuntimeError('Exact parent SMILES cannot reproduce atom layout') + db.execute('INSERT OR IGNORE INTO canonical_features VALUES (?,?,?,?,?)',(fk,mol.smiles,'exact_parent_literal',body,digest)) + db.execute('UPDATE graph_metadata SET feature_key=?,smiles=? WHERE graph_hash=?',(fk,mol.smiles,gh));fixed+=1 + uncovered=db.execute("SELECT count(*) FROM molecules m LEFT JOIN canonical_features f ON f.feature_key=m.feature_key WHERE m.scope='validation' AND f.feature_key IS NULL").fetchone()[0] + if uncovered:raise RuntimeError('Not all actual Validation Molecule.smiles have exact literal feature keys') + db.commit();result=dict(complete=True,non_idempotent_raw_aliases=len(rare),training_graph_aliases_verified=fixed, + uncovered_actual_Validation_graph_strings=0,original_candidate_identities_modified=False) + save(marker,result) + prior=PREP/'DATA_ACCEPTANCE.json' + if prior.exists():prior.replace(PREP/('DATA_ACCEPTANCE.before_literal_alignment_%d.json'%int(time.time()))) + return result + + +def run(): + db=sqlite3.connect(PREP/'assets.sqlite');db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS canonical_features(feature_key TEXT PRIMARY KEY,smiles TEXT,scope TEXT,feature BLOB,feature_sha TEXT)') + db.execute('CREATE INDEX IF NOT EXISTS canonical_pending ON canonical_features(feature_key) WHERE feature IS NULL') + db.execute('CREATE TABLE IF NOT EXISTS canonical_aliases(raw_key TEXT PRIMARY KEY,canonical_key TEXT,smiles TEXT)') + marker=PREP/'CANONICAL_IDENTITIES_READY.json';started=time.monotonic();done=0 + ctx=multiprocessing.get_context('spawn') + with ProcessPoolExecutor(max_workers=C['prepare_workers'],mp_context=ctx) as workers: + if not marker.exists(): + # A monotonically increasing raw key cursor avoids repeatedly + # scanning 3M processed rows, and resumes without losing evidence. + state=PREP/'canonical_cursor.json';after=json.loads(state.read_text())['last_key'] if state.exists() else '' + while True: + rows=db.execute('SELECT feature_key,smiles,scope,feature,feature_sha FROM molecules WHERE feature_key>? ORDER BY feature_key LIMIT 1024',(after,)).fetchall() + if not rows:break + for raw,fk,smiles,scope,blob,digest in workers.map(normalize,rows,chunksize=16): + db.execute('INSERT OR IGNORE INTO canonical_features VALUES (?,?,?,?,?)',(fk,smiles,scope,blob,digest)) + db.execute('INSERT OR IGNORE INTO canonical_aliases VALUES (?,?,?)',(raw,fk,smiles));done+=1 + db.commit();after=rows[-1][0];save(state,dict(last_key=after)) + save(PREP/'status.json',dict(phase='parent_graph_canonical_identity_alignment',rows_this_attempt=done,seconds=time.monotonic()-started,unix_time=time.time())) + if done%16384==0:disk_check() + db.execute('UPDATE graph_metadata SET feature_key=(SELECT c.canonical_key FROM canonical_aliases c WHERE c.raw_key=graph_metadata.feature_key),smiles=(SELECT c.smiles FROM canonical_aliases c WHERE c.raw_key=graph_metadata.feature_key) WHERE EXISTS (SELECT 1 FROM canonical_aliases c WHERE c.raw_key=graph_metadata.feature_key)') + db.commit();save(marker,dict(complete=True,raw_aliases=db.execute('SELECT count(*) FROM canonical_aliases').fetchone()[0],original_raw_rows_preserved=True)) + made=0 + while True: + rows=db.execute('SELECT smiles FROM canonical_features WHERE feature IS NULL ORDER BY feature_key LIMIT 512').fetchall() + if not rows:break + for fk,body,digest in workers.map(generate,[r[0] for r in rows],chunksize=8): + db.execute('UPDATE canonical_features SET feature=?,feature_sha=? WHERE feature_key=?',(body,digest,fk));made+=1 + db.commit();save(PREP/'status.json',dict(phase='canonical_connected_fragment_features',features_this_attempt=made,seconds=time.monotonic()-started,unix_time=time.time())) + if made%8192==0:disk_check() + literal=align_parent_literals(db) + missing=db.execute('SELECT count(*) FROM canonical_features WHERE feature IS NULL OR feature_sha IS NULL').fetchone()[0] + if missing:raise RuntimeError('Canonical feature cache incomplete') + total=db.execute('SELECT count(*) FROM canonical_features').fetchone()[0] + if db.execute('SELECT count(*) FROM graph_metadata WHERE feature_key IS NULL OR smiles IS NULL').fetchone()[0]:raise RuntimeError('Missing canonical graph mapping') + db.execute('PRAGMA wal_checkpoint(TRUNCATE)');db.close() + save(PREP/'READY.json',dict(complete=True,feature_version=features.VERSION,feature_code_sha256=sha(HERE/'features_r2.py'),feature_rows=total, + canonical_identity_alignment=json.loads(marker.read_text()),exact_parent_literal_alignment=literal,sampling=json.loads((PREP/'SAMPLING_READY.json').read_text()), + validation=json.loads((PREP/'VALIDATION_STRUCTURES_READY.json').read_text()),original_graph_store_modified=False, + partial_raw_feature_rows_preserved_for_audit=True,prepared_database_bytes=(PREP/'assets.sqlite').stat().st_size)) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/config.json b/code/snapshot/root/code/ceir_r2_20261110/config.json new file mode 100644 index 0000000000000000000000000000000000000000..57deb16bba3cf8554e467db17fe066a376f75517 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/config.json @@ -0,0 +1,46 @@ +{ + "release": "CEIR_R2_20261110", + "root": "/workspace/xj/SpecPartition-MS", + "source_r1": "/root/xj/SpecPartition-MS/code/ceir_r1_20261109", + "output": "/root/xj/SpecPartition-MS/runs/ceir_r2_20261110", + "parent_checkpoint": "/workspace/xj/SpecPartition-MS/runs/hierarchical_intra_modal_20261103/C03_both_fine/seed_20261103/step_002000.pt", + "parent_sha256": "8a2982f3821fad501ba4f39ac8b1495affeb0c1b09051f2103317f36027d48b6", + "arms": ["A0", "A1", "A2", "A3"], + "source_update": 2000, + "pilot_target_update": 3000, + "extension_target_update": 4000, + "manifest_updates": 2000, + "seed": 20261103, + "feature_version": "connected_cuts_r2_v1", + "fragment_count": 32, + "count_classes": 33, + "chem_weight": 0.05, + "spectrum_weight": 0.05, + "fragment_tolerance_ppm": 20.0, + "fragment_tolerance_floor_da": 0.02, + "fragment_hydrogen_shifts": [-2, -1, 0, 1, 2], + "minimum_fragment_coverage": 0.05, + "prepare_workers": 16, + "spectrum_chunk": 16, + "graph_chunk": 256, + "local_chunk": 128, + "pool_micro_views": 8, + "max_atoms_per_microbatch": 12000, + "gpu_memory_fraction": 0.42, + "minimum_free_gpu_mib": 5500, + "gpu_slots": 2, + "minimum_output_disk_gib": 8, + "backbone_lr_multiplier": 0.3, + "new_head_lr": 0.0001, + "lr_ramp_updates": 100, + "save_interval": 100, + "validation_updates": [2250, 2500, 3000], + "validation_spectrum_batch": 16, + "validation_graph_chunk": 32, + "validation_local_chunk": 32, + "validation_selection": "full_Validation_harmonic_Mass_Formula_Top1_with_each_view_and_MCES_guardrails", + "validation_degradation_tolerance_pp": 0.2, + "test_used_for_model_selection": false, + "test_development_exposure": "previous Test/CASMI badcases informed this design; not an untouched final holdout", + "original_assets_read_only": true +} diff --git a/code/snapshot/root/code/ceir_r2_20261110/data_r2.py b/code/snapshot/root/code/ceir_r2_20261110/data_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..001a165ebf5112baaa4fd47bee8f9e84b4314113 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/data_r2.py @@ -0,0 +1,51 @@ +"""Frozen draw ledger: no PubChem, RDKit parsing, or pool JSON in training.""" +from collections import Counter +from dataclasses import replace +import time +from runtime_r2 import * +import features_r2 as features +from data09 import Reader + + +class Dataset: + def __init__(self,arm,start=0,stop=None,feature_path=None): + self.arm=arm;self.start=start;self.stop=C['manifest_updates'] if stop is None else stop + self.reader=None;self.db=None;self.features=None;self.feature_path=feature_path + self.ledger_hashes=None + + def __len__(self):return self.stop-self.start + + def __getitem__(self,index): + started=time.monotonic() + if self.reader is None: + self.reader=Reader();self.db=readonly(PREP/'assets.sqlite') + self.features=features.FeatureStore(self.feature_path or PREP/'assets.sqlite') + if self.feature_path is None:self.ledger_hashes=json.loads((PREP/'ledger_hashes.json').read_text()) + mode='replacement' if self.arm=='A0' else 'unique' + offset=self.start+index + ledger=self.db.execute('SELECT body FROM batches WHERE mode=? AND idx=?',(mode,offset)).fetchone() + if ledger is None:raise RuntimeError('Missing immutable R2 sampler batch') + digest=hashlib.sha256(ledger[0]).hexdigest() + if self.ledger_hashes is not None and digest!=self.ledger_hashes[mode][offset]:raise RuntimeError('Sampler ledger changed after acceptance') + plan=features.loads(ledger[0]);rows=[] + for selected in plan['rows']: + original=self.reader.db.execute('SELECT body FROM samples WHERE record_id=?',(selected['rid'],)).fetchone() + row=loads(original[0]);ref=self.reader.molecule(selected['ref']) + if ref.identity!=row['identity'] or ref.identity in self.reader.forbidden:raise RuntimeError('Unsafe reference') + row['ref']=ref;row['formulas']=tuple(selected['formulas']);row['pools']=[] + row['query']=replace(row['query'],formula_candidates=row['formulas']) + feature=self.features.get(ref.smiles) + if feature['layout']!=features.layout(ref.mol):raise RuntimeError('Reference atom layout changed') + row['chemical_counts']=feature['counts'] + for p in selected['pools']: + mols=tuple(self.reader.molecule(g) for g in p['graphs']) + if mols[0].identity!=ref.identity or any(m.identity==ref.identity for m in mols[1:]):raise RuntimeError('Missing positive or false negative') + if any(m.identity in self.reader.forbidden for m in mols):raise RuntimeError('Heldout negative') + kind=p['kind'];q=replace(row['query'],candidates=mols,formula_candidates=tuple(p['formulas']), + candidate_view='odata_oracle' if kind=='odata' else 'msg_'+kind) + eligible=bool(row['mass_ok'] and features.supported_positive(q,self.features.get(mols[0].smiles))) + row['pools'].append(dict(**p,query=q,positive_index=0,truth_identity=ref.identity, + truth_formula=row['formula'],record_id=row['record_id'],quality_eligible=bool(row['mass_ok']),spectrum_eligible=eligible)) + rows.append(row) + return dict(epoch=plan['epoch'],step=plan['step'],rows=rows,mode=mode,manifest_index=offset, + ledger_sha256=digest,data_seconds=time.monotonic()-started) diff --git a/code/snapshot/root/code/ceir_r2_20261110/features_r2.py b/code/snapshot/root/code/ceir_r2_20261110/features_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..bfe91cf8f49cdc5ed3c4a98594f3146a2943a17c --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/features_r2.py @@ -0,0 +1,133 @@ +"""Versioned label-free static candidate descriptors and connected cut hypotheses.""" +from functools import lru_cache +import hashlib +import itertools +import pickle +import sqlite3 +import zlib +import numpy as np +from rdkit import Chem,RDLogger +from rdkit.Chem import rdMolDescriptors + +VERSION='connected_cuts_r2_v1';K=32;TRAITS=7;CLASSES=33 +RDLogger.DisableLog('rdApp.*') +PATTERNS=[Chem.MolFromSmarts(s) for s in ('[OX2H]','[CX3]=[OX1]','[#6][OX2][#6]')] +PT=Chem.GetPeriodicTable();H=PT.GetMostCommonIsotopeMass(1) + + +def dumps(value):return zlib.compress(pickle.dumps(value,protocol=5),1) +def loads(value):return pickle.loads(zlib.decompress(value)) +def key(smiles):return hashlib.sha256(smiles.encode()).hexdigest() + + +def layout(mol): + atoms=[a.GetAtomicNum() for a in mol.GetAtoms()] + edges=sorted((min(b.GetBeginAtomIdx(),b.GetEndAtomIdx()),max(b.GetBeginAtomIdx(),b.GetEndAtomIdx()),str(b.GetBondType())) for b in mol.GetBonds()) + return hashlib.sha256(repr((atoms,edges)).encode()).hexdigest() + + +def components(n,adj,removed): + seen=set();result=[] + for first in range(n): + if first in seen:continue + todo=[first];seen.add(first);part=[] + while todo: + i=todo.pop();part.append(i) + for j,bid in adj[i]: + if bid not in removed and j not in seen:seen.add(j);todo.append(j) + result.append(tuple(sorted(part))) + return result + + +def build(smiles): + mol=Chem.MolFromSmiles(smiles) + if mol is None:raise ValueError('Invalid candidate SMILES') + n=mol.GetNumAtoms();counts=[len(mol.GetSubstructMatches(p)) for p in PATTERNS] + counts += [rdMolDescriptors.CalcNumAromaticRings(mol),rdMolDescriptors.CalcNumAliphaticRings(mol),rdMolDescriptors.CalcNumHeterocycles(mol),len(Chem.GetMolFrags(mol))] + out=dict(version=VERSION,smiles=smiles,layout=layout(mol),atoms=n, + counts=np.asarray([min(32,v) for v in counts],dtype=np.int64),members=np.zeros((K,n),dtype=np.float32), + boundary=np.zeros((K,8),dtype=np.float32), + masses=np.zeros(K,dtype=np.float32),hydrogens=np.zeros(K,dtype=np.int16),valid=np.zeros(K,dtype=bool), + neutral_mass=rdMolDescriptors.CalcExactMolWt(mol),reason=None) + if len(Chem.GetMolFrags(mol))!=1 or Chem.GetFormalCharge(mol)!=0 or any(a.GetIsotope() for a in mol.GetAtoms()): + out['reason']='unsupported_fragment_hypothesis_structure';return out + adj=[[] for _ in range(n)] + for b in mol.GetBonds(): + i,j=b.GetBeginAtomIdx(),b.GetEndAtomIdx();adj[i].append((j,b.GetIdx()));adj[j].append((i,b.GetIdx())) + bridges=[b for b in mol.GetBonds() if not b.IsInRing() and b.GetBondType()==Chem.BondType.SINGLE] + bridges.sort(key=lambda b:(-int(b.GetBeginAtom().GetAtomicNum() in (7,8,15,16))-int(b.GetEndAtom().GetAtomicNum() in (7,8,15,16)),b.GetIdx())) + ring=[b.GetIdx() for b in mol.GetBonds() if b.IsInRing()] + pairs=list(itertools.combinations(ring,2)) + pairs.sort(key=lambda p:hashlib.sha256(repr(p).encode()).digest()) + cuts=[(b.GetIdx(),) for b in bridges[:20]]+pairs[:12] + parts=set() + for cut in cuts: + for part in components(n,adj,set(cut)): + if 3<=len(part)<=n-2:parts.add(part) + choices=sorted(parts,key=lambda p:(len(p),p)) + if len(choices)>K:choices=[choices[int(i)] for i in np.linspace(0,len(choices)-1,K).round()] + masses=[];nh=[] + for a in mol.GetAtoms(): + hydrogen=a.GetTotalNumHs();nh.append(hydrogen) + masses.append(PT.GetMostCommonIsotopeMass(a.GetAtomicNum())+hydrogen*H) + for j,part in enumerate(choices): + out['members'][j,list(part)]=1/len(part) + out['masses'][j]=sum(masses[i] for i in part);out['hydrogens'][j]=sum(nh[i] for i in part);out['valid'][j]=True + chosen=set(part);aa=[mol.GetAtomWithIdx(i) for i in part] + out['boundary'][j]=[len(part)/n,sum(a.GetAtomicNum()==8 for a in aa)/len(part), + sum(a.GetAtomicNum()==7 for a in aa)/len(part),sum(v not in chosen for i in part for v,_ in adj[i])/4, + sum(a.IsInRing() for a in aa)/len(part),sum(a.GetIsAromatic() for a in aa)/len(part), + sum(nh[i] for i in part)/len(part),out['masses'][j]/max(out['neutral_mass'],1)] + out['reason']='ok' if choices else 'no_supported_connected_cut' + return out + + +class FeatureStore: + def __init__(self,path): + self.db=sqlite3.connect('file:'+str(path)+'?mode=ro',uri=True) + self.table='canonical_features' if self.db.execute("SELECT 1 FROM sqlite_master WHERE type='table' AND name='canonical_features'").fetchone() else 'molecules' + self.get=lru_cache(maxsize=12000)(self._get) + + def _get(self,smiles): + row=self.db.execute('SELECT feature,feature_sha FROM '+self.table+' WHERE feature_key=?',(key(smiles),)).fetchone() + if row is None or row[0] is None:raise RuntimeError('Missing preprocessed R2 candidate feature: '+smiles[:120]) + if hashlib.sha256(row[0]).hexdigest()!=row[1]:raise RuntimeError('R2 feature hash mismatch') + value=loads(row[0]) + if value['version']!=VERSION or value['smiles']!=smiles:raise RuntimeError('R2 feature identity mismatch') + return value + + +def ion_offsets(adduct): + proton=1.007276452090935 + if adduct=='[M+H]+':return (proton,None) + if adduct=='[M-H]-':return (-proton,None) + if adduct=='[M+Na]+':return (22.989220702090936,proton) + if adduct=='[M+NH4]+':return (proton,18.033825548090935) + if adduct=='[M+Cl]-':return (-proton,34.96940125990906) + if adduct=='[M+FA-H]-':return (-proton,44.99820285190906) + return (None,None) + + +def spectrum(query): + peaks=sorted(query.peaks,key=lambda p:(-p[1],p[0]))[:256];peaks.sort() + mz=np.asarray([p[0] for p in peaks],dtype=np.float32) + y=np.sqrt(np.asarray([p[1] for p in peaks],dtype=np.float32)/max(p[1] for p in peaks)) + y[np.abs(mz-query.precursor_mz)<=max(.05,query.precursor_mz*20e-6)]=0 + return mz,y + + +def supported_positive(query,feature): + offsets=ion_offsets(query.adduct) + if offsets[0] is None:return False + mz,y=spectrum(query) + if not y.sum():return False + masses=[] + for j in range(K): + if not feature['valid'][j]:continue + for shift in (-2,-1,0,1,2): + if feature['hydrogens'][j]+shift<0:continue + masses.extend(feature['masses'][j]+shift*H+v for v in offsets if v is not None) + if not masses:return False + mass=np.asarray(masses,dtype=np.float32) + valid=(np.abs(mz[:,None]-mass[None,:])<=np.maximum(.02,mass[None,:]*20e-6)).any(1) + return bool((y[valid].sum()/y.sum())>=.05) diff --git a/code/snapshot/root/code/ceir_r2_20261110/mces_monitor_r2.py b/code/snapshot/root/code/ceir_r2_20261110/mces_monitor_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..406af1a8a2d42574a5a508cc08b76989ec1b0e4f --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/mces_monitor_r2.py @@ -0,0 +1,17 @@ +"""Overlap CPU-only Validation MCES with later GPU arms; finite known scope.""" +import json +from pathlib import Path +import time +from mces_r2 import run,C,OUT + + +if __name__=='__main__': + pending=[OUT/'A0/validation_002000',*[OUT/a/'validation_003000' for a in C['arms']]] + while pending: + next_pending=[] + for directory in pending: + if (directory/'MCES.json').exists():continue + if (directory/'metrics.json').exists():run(directory) + else:next_pending.append(directory) + pending=next_pending + if pending:time.sleep(5) diff --git a/code/snapshot/root/code/ceir_r2_20261110/mces_r2.py b/code/snapshot/root/code/ceir_r2_20261110/mces_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..30647b7eea4adea90b824dcc654cf4aba394d886 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/mces_r2.py @@ -0,0 +1,29 @@ +"""Validation MCES under the same R1 protocol, with a private resumable cache.""" +import argparse +import fcntl +import importlib.util +import json +from pathlib import Path +import sqlite3 +import sys + +HERE=Path(__file__).resolve().parent;C=json.loads((HERE/'config.json').read_text());OUT=Path(C['output']) + + +def run(directory): + path=Path(C['source_r1'])/'mces_ceir.py';name='r2_validation_mces_engine' + spec=importlib.util.spec_from_file_location(name,path);module=importlib.util.module_from_spec(spec);sys.modules[name]=module;spec.loader.exec_module(module) + own=OUT/'mces_validation';own.mkdir(parents=True,exist_ok=True) + lock=(own/'compute.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + if (Path(directory)/'MCES.json').exists():return + target=own/'Validation_mces_pairs.sqlite' + if not target.exists(): + source=Path('/root/xj/SpecPartition-MS/runs/ceir_r1_20261109/prepared/Validation_mces_pairs.sqlite') + if source.exists(): + a=sqlite3.connect('file:'+str(source)+'?mode=ro',uri=True);b=sqlite3.connect(target);a.backup(b);a.close();b.close() + module.OUT=OUT;module.CACHE=own + module.evaluate(Path(directory)) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--directory',required=True);a=p.parse_args();run(a.directory) diff --git a/code/snapshot/root/code/ceir_r2_20261110/model_r2_new.py b/code/snapshot/root/code/ceir_r2_20261110/model_r2_new.py new file mode 100644 index 0000000000000000000000000000000000000000..bb7cd32ec2ed5a3f0744705c8a5ea9c8fbb7ff5a --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/model_r2_new.py @@ -0,0 +1,180 @@ +"""C03-preserving discriminative chemistry and candidate-to-spectrum evidence. + +Static connected cuts are hypotheses, NOT ground-truth fragment annotations. +Only training reference labels supervise the count and reconstructed spectrum +heads; scoring never receives the reference identity, its counts, or its formula. +""" +import numpy as np +import torch +from torch import nn +from torch.nn import functional as F +from runtime_r2 import * +import features_r2 as features +from specpartition_ms.model_v122 import BidirectionalRanker +from specpartition_ms.model import Encoded,metadata +from specpartition_ms.fast_formula_r2 import forward_batch as original_formula_forward +from coarse_losses import ProjectionBank +from kernels import install_graph_kernel + + +class EvidenceHeads(nn.Module): + def __init__(self): + super().__init__() + self.counts=nn.Sequential(nn.Linear(256,256),nn.GELU(),nn.Linear(256,features.TRAITS*features.CLASSES)) + self.fragment=nn.Sequential(nn.Linear(264,128),nn.GELU(),nn.LayerNorm(128)) + self.meta=nn.Sequential(nn.Linear(17,128),nn.GELU(),nn.Linear(128,128)) + self.intensity=nn.Linear(128,10) + self.fragment_key=nn.Linear(128,64);self.peak_key=nn.Linear(256,64) + self.fragment_score=nn.Sequential(nn.Linear(4,32),nn.GELU(),nn.Linear(32,1)) + self.chemical_scale=nn.Parameter(torch.ones(()));self.fragment_scale=nn.Parameter(torch.ones(())) + nn.init.zeros_(self.counts[-1].weight);nn.init.zeros_(self.counts[-1].bias) + nn.init.zeros_(self.fragment_score[-1].weight);nn.init.zeros_(self.fragment_score[-1].bias) + + def count_log_prob(self,q): + shape=(*q.shape[:-1],features.TRAITS,features.CLASSES) + return self.counts(q).float().reshape(shape).log_softmax(-1) + + +class R2Ranker(BidirectionalRanker): + def __init__(self,c,arm): + super().__init__(c);self.hierarchy=ProjectionBank();self.r2=EvidenceHeads() + self.arm=arm;self.feature_store=None;self.layout_checked=set();install_graph_kernel(self) + + def install_features(self,path=None): + self.feature_store=features.FeatureStore(path or PREP/'assets.sqlite') + + def feature(self,mol): + if self.feature_store is None:raise RuntimeError('R2 offline features missing') + result=self.feature_store.get(mol.smiles) + if mol.smiles not in self.layout_checked: + if result['layout']!=features.layout(mol.mol) or result['atoms']!=len(mol.atom_features): + raise RuntimeError('Static fragment / trainable graph atom layout mismatch') + self.layout_checked.add(mol.smiles) + return result + + def formula_batch(self,qs,queries,tokens,return_context=False): + values=original_formula_forward(self.formula_v07,qs,queries,tokens) + return (values,[None]*len(queries)) if return_context else values + + def chemical_scores(self,q,assets): + counts=torch.as_tensor(np.stack([a['counts'] for a in assets]),device=q.device,dtype=torch.long) + logp=self.r2.count_log_prob(q.float()) + selected=logp[torch.arange(features.TRAITS,device=q.device)[None,:],counts].mean(-1) + # The same log-softmax operation makes zero-initialization exactly zero. + uniform=torch.zeros_like(logp).log_softmax(-1)[0,0] + return self.r2.chemical_scale*(selected-uniform) + + def fragment_scores(self,peaks,query,mols,atoms,assets): + device=peaks.device;n=len(mols);zero=peaks.float().sum()*0. + # No candidate-wise softmax across the pool: safe exact tiling for + # CASMI's >30k pools, not a 256-candidate truncation. + if n>128: + pieces=[self.fragment_scores(peaks,query,mols[j:j+128],atoms[j:j+128],assets[j:j+128]) for j in range(0,n,128)] + return tuple(torch.cat([p[k] for p in pieces]) for k in range(3)) + offsets=features.ion_offsets(query.adduct) + if offsets[0] is None: + return zero.expand(n),zero.expand(n),torch.zeros(n,device=device,dtype=torch.bool) + mz_np,y_np=features.spectrum(query);mz=torch.as_tensor(mz_np,device=device);y=torch.as_tensor(y_np,device=device) + if len(mz)!=len(peaks):raise RuntimeError('R2 peak token alignment mismatch') + representations=[] + for atom,a in zip(atoms,assets): + members=torch.as_tensor(a['members'],device=device,dtype=torch.float32) + boundary=torch.as_tensor(a['boundary'],device=device,dtype=torch.float32) + representations.append(torch.cat((members@atom.float(),boundary),-1)) + h=self.r2.fragment(torch.stack(representations)) + meta=torch.as_tensor(metadata(query),device=device,dtype=torch.float32) + logits=self.r2.intensity(h+self.r2.meta(meta)[None,None,:]).float().reshape(n,features.K,5,2) + masses=torch.as_tensor(np.stack([a['masses'] for a in assets]),device=device) + hydrogens=torch.as_tensor(np.stack([a['hydrogens'] for a in assets]),device=device) + valid=torch.as_tensor(np.stack([a['valid'] for a in assets]),device=device,dtype=torch.bool) + shifts=masses.new_tensor([-2,-1,0,1,2]);adduct=masses.new_tensor([v if v is not None else 0. for v in offsets]) + hypotheses=masses[:,:,None,None]+shifts[None,None,:,None]*features.H+adduct[None,None,None,:] + mask=valid[:,:,None,None]&(hydrogens[:,:,None,None]+shifts[None,None,:,None]>=0) + mask=mask.expand(-1,-1,-1,2)&hypotheses.gt(0) + if offsets[1] is None: + template=torch.tensor([True,False],device=device);mask=mask&template[None,None,None,:] + usable=mask.flatten(1).any(-1) + # Avoid all -inf softmax rows without inventing a supported fragment. + masked=logits.masked_fill(~mask,-1e9) + probability=masked.flatten(1).softmax(-1).reshape_as(masked)*mask + flat=hypotheses.flatten(1).contiguous();pp=probability.flatten(1) + right=torch.searchsorted(mz,flat).clamp(max=len(mz)-1);left=(right-1).clamp(min=0) + index=torch.where((mz[right]-flat).abs()<(mz[left]-flat).abs(),right,left) + delta=(mz[index]-flat).abs();tolerance=torch.maximum(flat*20e-6,flat.new_full((),.02)) + matched=(delta<=tolerance)&mask.flatten(1) + explained=pp*matched;predicted=pp.new_zeros((n,len(mz))).scatter_add(1,index,explained) + outside=(pp*(~matched)).sum(-1) + norm=(predicted.square().sum(-1)+outside.square()).clamp_min(1e-12).sqrt() + cosine=(predicted*y[None,:]).sum(-1)/(norm*y.norm().clamp_min(1e-12)) + present=pp.new_zeros((n,len(mz))).scatter_add(1,index,matched.float()).gt(0) + coverage=(present*y[None,:]).sum(-1)/y.sum().clamp_min(1e-12) + key=F.normalize(self.r2.fragment_key(h).float(),dim=-1) + peak=F.normalize(self.r2.peak_key(peaks).float(),dim=-1) + alignment=(key[:,:,None,:].expand(-1,-1,10,-1).reshape(n,-1,64)*peak[index]).sum(-1) + matched_alignment=(alignment*explained).sum(-1) + diagnostics=torch.stack((cosine,coverage,matched_alignment,1.-outside),-1) + correction=self.r2.fragment_scale*self.r2.fragment_score(diagnostics).float().squeeze(-1)*usable + spec_loss=(1.-cosine)*usable + return correction,spec_loss,usable + + def score_encoded(self,q,peaks,query,mols,atoms,zm,formula_scores,context=None,return_aux=False): + conditional,joint,relation=self.conditioned(q,query,[m.formula for m in mols],zm,formula_scores) + local=self.local_weight*self.local_scores(peaks,atoms) if self.cfg.model.local_match else torch.zeros_like(joint) + base=joint+local;direct=conditional+local + aux=None + if self.arm in ('A2','A3'): + assets=[self.feature(m) for m in mols] + chemistry=self.chemical_scores(q,assets) + base=base+chemistry;direct=direct+chemistry + if self.arm=='A3': + correction,spec_loss,usable=self.fragment_scores(peaks,query,mols,atoms,assets) + base=base+correction;direct=direct+correction + aux=(spec_loss,usable) + result=(base,direct,relation) + return (*result,aux) if return_aux else result + + def encode_batch(self,queries,extras=()): + tokens,qs,metas=self.spectrum.forward_batch(queries) + key=lambda m:(m.identity,m.smiles) + lookup={key(m):m for q in queries for m in q.candidates};lookup.update({key(m):m for m in extras}) + keys=sorted(lookup);positions={k:i for i,k in enumerate(keys)} + u,atoms,zm=self.encode_molecules([lookup[k] for k in keys]) + zq=F.normalize(self.query_projection(qs).float(),dim=-1) + fs=self.formula_batch(qs,queries,tokens);encs=[] + for i,q in enumerate(queries): + ii=[positions[key(m)] for m in q.candidates];index=torch.tensor(ii,device=self.device,dtype=torch.long);aa=[atoms[j] for j in ii] + base,direct,context,aux=self.score_encoded(qs[i],tokens[i],q,q.candidates,aa,zm[index],fs[i],return_aux=True) + whole=torch.as_tensor(np.stack([m.whole for m in q.candidates]),device=self.device) + anchors=torch.as_tensor(np.stack([m.anchors for m in q.candidates]),device=self.device) + enc=Encoded(q,tokens[i].float(),qs[i].float(),metas[i].float(),u[index].float(),zq[i],zm[index], + [a.float() for a in aa],whole,anchors,fs[i],base,direct) + enc.conditional_context_q=context;enc.r2_spectrum=aux;encs.append(enc) + extra_index=torch.tensor([positions[key(m)] for m in extras],device=self.device,dtype=torch.long) + return encs,zm[extra_index] + + +def make_model_optimizer(arm,checkpoint_path=None): + state=parent_state() if checkpoint_path is None else torch.load(checkpoint_path,map_location='cpu',weights_only=False) + torch.manual_seed(C['seed']);model=R2Ranker(LEGACY.C,arm) + if checkpoint_path is not None and state.get('architecture')!='CEIR_R2':raise RuntimeError('Wrong resume architecture') + result=model.load_state_dict(state['model'],strict=checkpoint_path is not None) + if result.unexpected_keys or any(not k.startswith('r2.') for k in result.missing_keys):raise RuntimeError('Parent state keys differ '+str(result)) + if checkpoint_path is None: + for k,v in state['model'].items(): + if not torch.equal(model.state_dict()[k],v):raise RuntimeError('Old parameter changed '+k) + old=[p for n,p in model.named_parameters() if not n.startswith('r2.')] + new=[p for n,p in model.named_parameters() if n.startswith('r2.')] + source=parent_state() if checkpoint_path is not None else state + if len(old)!=sum(len(g['params']) for g in source['optimizer']['param_groups']):raise RuntimeError('Old optimizer parameter ordering/count mismatch') + original_lr=float(source['optimizer']['param_groups'][0]['lr']);model.to(LEGACY.C['device']) + opt=torch.optim.AdamW(old,lr=original_lr,weight_decay=LEGACY.C['weight_decay']) + if checkpoint_path is None: + opt.load_state_dict(state['optimizer']);opt.add_param_group(dict(params=new,lr=C['new_head_lr'])) + else: + opt.add_param_group(dict(params=new,lr=C['new_head_lr']));opt.load_state_dict(state['optimizer']) + for p,s in opt.state.items(): + for k,v in s.items(): + if torch.is_tensor(v) and k!='step':s[k]=v.to(p.device) + progress=dict(state['progress']);progress.setdefault('new_updates',progress['update']-C['source_update']) + model.install_features();restore_rng(state) + return model,opt,progress,original_lr diff --git a/code/snapshot/root/code/ceir_r2_20261110/objectives_r2.py b/code/snapshot/root/code/ceir_r2_20261110/objectives_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..955d92748f17bd8a57bc2b9f7bfa63fa0ae65c39 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/objectives_r2.py @@ -0,0 +1,130 @@ +"""Exact C03 active objectives, plus qualified chemistry / spectrum supervision.""" +from collections import Counter +import time +import numpy as np +import torch +from torch.nn import functional as F +from torch.utils.checkpoint import checkpoint as recompute +from runtime_r2 import * +from kernels import grouped_contrastive,formula_objective +from losses import ms_ms_supcon,molecule_molecule_two_view + + +def molecular_views(model,mols,probability): + # Reinstate the dropout hook during activation recomputation. The original + # implementation removed it before backward; fix identically in all arms. + def one(dummy): + threshold=model.activation_checkpoint_atom_threshold + model.activation_checkpoint_atom_threshold=10**12 + handle=model.graph.atom.register_forward_hook(lambda module,inputs,output:F.dropout(output,p=probability,training=True)) + try: + with amp():return model.encode_molecules(mols)[0].float() + finally:handle.remove();model.activation_checkpoint_atom_threshold=threshold + return (recompute(one,model.graph.atom.weight,use_reentrant=False,preserve_rng_state=True), + recompute(one,model.graph.atom.weight,use_reentrant=False,preserve_rng_state=True)) + + +def auxiliary_loss(model,q,mols,rows,spec,step): + weights=spec['loss']['auxiliary'] + if any(v for k,v in weights.items() if k not in ('ms_fine','mol_fine')): + raise RuntimeError('This release matches C03 fine-only auxiliaries; other arms require a separate release') + ids=[r['identity'] for r in rows];rids=[r['record_id'] for r in rows];head=model.hierarchy + v1,v2=molecular_views(model,mols,spec['views']['molecule']['dropout']) + temperature=spec['loss']['temperature']['identity'];ramp=min(1.,(step+1)/spec['loss']['auxiliary_ramp_steps']) + ms=ms_ms_supcon(head('ms_identity',q),ids,rids,temperature) + mol=molecule_molecule_two_view(head('mol_identity',v1),head('mol_identity',v2),[m.identity for m in mols],temperature) + total=ramp*(weights['ms_fine']*ms.loss+weights['mol_fine']*mol.loss) + # The original zero-weight coarse graphs produced zero (not None) grads. + # Preserve AdamW decay/moment semantics for those registered unused heads. + for name in ('ms_formula','mol_formula','ms_mass','mol_mass'): + total=total+sum(p.sum()*0. for p in head.heads[name].parameters()) + out=dict(ms_fine_raw=ms.loss.detach(),mol_fine_raw=mol.loss.detach(),auxiliary_total=total.detach(),auxiliary_ramp=ramp, + molecule_view_mean_abs_difference=(v1.detach()-v2.detach()).abs().mean()) + for name,item in [('ms_fine',ms),('mol_fine',mol)]: + for k,v in item.diagnostics.items():out[name+'_'+k]=v.detach() if torch.is_tensor(v) else v + return total,out + + +def chemical_loss(model,q,rows): + if model.arm not in ('A2','A3'):return q.sum()*0. + counts=torch.as_tensor(np.stack([r['chemical_counts'] for r in rows]),device=q.device,dtype=torch.long) + logp=model.r2.count_log_prob(q) + losses=-logp.gather(-1,counts[:,:,None]).squeeze(-1).mean(-1) + ids=[r['identity'] for r in rows];occurrences=Counter(ids) + w=q.new_tensor([1/occurrences[k]/len(occurrences) for k in ids]) + return (losses*w).sum() + + +def train_step(model,opt,batch,update,apply_update=True): + started=time.monotonic();rows=batch['rows'];queries=[r['query'] for r in rows];ids=[r['identity'] for r in rows] + reps={} + for r in rows: + if r['identity'] not in reps or r['ref'].smiles1 and r['formula'] in r['formulas'] for r in rows) + for a in range(0,len(rows),sc): + block=rows[a:a+sc] + with amp(): + tokens,q,_=model.spectrum.forward_batch([r['query'] for r in block]) + lf,d=formula_objective(model,q,tokens,block,valid,len(rows)) + loss=(q*dq[a:a+len(block)]).sum()+w['formula']*lf + loss.backward();metrics['formula_loss']+=lf.detach() + for k in ('formula_ce','formula_gap','element_ce','formula_correct'):metrics[k]+=d[k] + for a in range(0,len(mols),gc): + with amp():u=model.encode_molecules(mols[a:a+gc])[0];surrogate=(u*dm[a:a+len(u)]).sum() + surrogate.backward() + pools=[p for r in rows for p in r['pools']];counts=Counter(p['kind'] for p in pools) + pm={k:qc.new_zeros(()) for k in ('odata','mass','formula')};spec_total=qc.new_zeros(()) + supervised={p['record_id'] for p in pools if p['spectrum_eligible']};seen=set();used=0 + for a in range(0,len(pools),LEGACY.C['pool_micro_views']): + block=pools[a:a+LEGACY.C['pool_micro_views']] + with amp(): + encs,_=model.encode_batch([p['query'] for p in block]);loss=encs[0].q.sum()*0. + for p,enc in zip(block,encs): + ce=enc.base.float().logsumexp(0)-enc.base[p['positive_index']].float();kind=p['kind'] + pm[kind]+=ce.detach()/counts[kind] + loss+=w[{'odata':'odata_pool','mass':'msg_mass_pool','formula':'msg_formula_pool'}[kind]]*ce/counts[kind] + if model.arm=='A3' and p['spectrum_eligible'] and p['record_id'] not in seen: + if enc.r2_spectrum is None:raise RuntimeError('Qualified spectrum has no fragment predictions') + spec,usable=enc.r2_spectrum + if not bool(usable[p['positive_index']]):raise RuntimeError('CPU / GPU fragment eligibility disagrees') + sl=spec[p['positive_index']]/max(1,len(supervised));loss+=sw*sl;spec_total+=sl.detach() + seen.add(p['record_id']);used+=1 + loss.backward() + total=base.detach()+auxiliary.detach()+cw*chem.detach()+sw*spec_total+w['formula']*metrics['formula_loss'] + for k,v in pm.items():metrics[k+'_pool']=v;total+=w[{'odata':'odata_pool','mass':'msg_mass_pool','formula':'msg_formula_pool'}[k]]*v + metrics.update(details);metrics.update(spectrum_loss=spec_total,loss=total) + if not torch.isfinite(total):raise RuntimeError('Nonfinite R2 objective') + for name,parameters in [('backbone',[p for n,p in model.named_parameters() if not n.startswith('r2.')]), + ('chemical',model.r2.counts.parameters()),('fragment',[p for n,p in model.r2.named_parameters() if not n.startswith('counts.') and n!='chemical_scale'])]: + gs=[p.grad.detach().float().square().sum() for p in parameters if p.grad is not None] + metrics[name+'_gradient_norm']=torch.stack(gs).sum().sqrt() if gs else total*0. + norm=torch.nn.utils.clip_grad_norm_(model.parameters(),LEGACY.C['gradient_clip'],error_if_nonfinite=True) + metrics['gradient_norm']=norm.detach() + if apply_update:opt.step() + packed=torch.stack([v.detach().float().to(model.device) if torch.is_tensor(v) else torch.tensor(v,device=model.device).float() for v in metrics.values()]).cpu().tolist() + result=dict(zip(metrics,packed));result.update(queries=len(rows),unique_connectivity=len(columns),formula_valid=valid, + pool_valid=dict(counts),spectrum_valid=used,chemical_valid=len(rows) if cw else 0, + source_counts=dict(Counter(r['source'] for r in rows)),negative_draws=sum(p['negative_draws'] for p in pools), + negative_unique_key14=sum(p['unique_negative_key14'] for p in pools),duplicate_physical_MS=len(rows)-len({r['record_id'] for r in rows}), + molecular_encoder_views=2,zero_weight_coarse_auxiliaries='not_computed',data_seconds=batch['data_seconds'], + step_compute_seconds=time.monotonic()-started,peak_allocated_mib=torch.cuda.max_memory_allocated()/2**20) + return result diff --git a/code/snapshot/root/code/ceir_r2_20261110/pipeline.supervisor.conf b/code/snapshot/root/code/ceir_r2_20261110/pipeline.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..e019de4d4a34f8e156bfc02f52cb64dccb994841 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/pipeline.supervisor.conf @@ -0,0 +1,12 @@ +[program:specpartition-r2-pipeline-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r2_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u /root/xj/SpecPartition-MS/code/ceir_r2_20261110/pipeline_r2.py +environment=PROC_NAME="specpartition-r2-pipeline-20261110",OMP_NUM_THREADS="1",MKL_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",CUBLAS_WORKSPACE_CONFIG=":4096:8",PYTHONUNBUFFERED="1" +autostart=false +autorestart=false +startsecs=2 +stopasgroup=true +killasgroup=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/code/snapshot/root/code/ceir_r2_20261110/pipeline_r2.py b/code/snapshot/root/code/ceir_r2_20261110/pipeline_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..6312ba5eec65f9caa27d0e27c8f11b5dd3a4fbe4 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/pipeline_r2.py @@ -0,0 +1,98 @@ +"""Supervised finite pipeline: prepare -> accept -> continue -> validate -> Test. + +No existing experiment is restarted or edited. Failures preserve all full-state +checkpoints; only this release's transient job may retry, at most twice. +""" +from collections import deque +import json +import os +import subprocess +import sys +import time +import traceback +from runtime_r2 import * + +PYTHON='/workspace/xj/SpecPartition-MS/.venv/bin/python' +MCES_PYTHON='/root/xj/SpecPartition-MS/evaluations/mces_all_20261106/.venv/bin/python' + + +def launch(label,args,python=PYTHON): + folder=OUT/'service_logs';folder.mkdir(parents=True,exist_ok=True) + output=(folder/(label+'.log')).open('a',buffering=1) + env=dict(os.environ,PROC_NAME='specpartition-r2-'+label+'-20261110',CUBLAS_WORKSPACE_CONFIG=':4096:8', + OMP_NUM_THREADS='1',MKL_NUM_THREADS='1',OPENBLAS_NUM_THREADS='1') + process=subprocess.Popen([python,'-u',*map(str,args)],cwd=HERE,env=env,stdout=output,stderr=subprocess.STDOUT) + output.close();log(OUT/'PIPELINE_EVENTS.jsonl',dict(event='child_started',label=label,pid=process.pid,args=list(map(str,args)),unix_time=time.time())) + return process + + +def checked(label,args,python=PYTHON): + process=launch(label,args,python) + while process.poll() is None:time.sleep(2) + if process.returncode:raise RuntimeError(label+' failed; see '+str(OUT/'service_logs'/(label+'.log'))) + + +def parallel(jobs,maximum=2): + queue=deque(jobs);active=[] + while queue or active: + while queue and len(active)=2:raise RuntimeError('Repeated failure in '+label+'; checkpoints retained') + time.sleep(3);updated.append((label,args,launch(label,args),retries+1)) + active=updated + save(OUT/'PIPELINE_STATUS.json',dict(phase='executing',active=[dict(label=l,pid=p.pid,retries=r) for l,_,p,r in active],queued=[j[0] for j in queue],unix_time=time.time())) + if active:time.sleep(3) + + +def run(): + OUT.mkdir(parents=True,exist_ok=True) + import fcntl + lock=(OUT/'pipeline.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX|fcntl.LOCK_NB) + if (OUT/'ALL_RESULTS.json').exists():return + while not (PREP/'READY.json').exists() or not json.loads((PREP/'READY.json').read_text()).get('exact_parent_literal_alignment',{}).get('complete'): + if (PREP/'failure.json').exists():raise RuntimeError('Full preparation failed; not admitting training') + save(OUT/'PIPELINE_STATUS.json',dict(phase='waiting_for_full_preparation',unix_time=time.time()));time.sleep(10) + if not (PREP/'DATA_ACCEPTANCE.json').exists():checked('data-audit',[HERE/'audit_r2.py']) + if not (OUT/'TRAIN_READY.json').exists():checked('GPU-acceptance',[HERE/'acceptance_r2.py']) + if json.loads((OUT/'TRAIN_READY.json').read_text())['binding']!=binding():raise RuntimeError('Frozen ready binding changed') + # Immutable inference descriptors can be built in parallel, but the train + # data path cannot read them. No Test metric is computed before selection. + test_prep=None + if not (OUT/'test/prepared/READY.json').exists():test_prep=launch('Test-feature-preparation',[HERE/'prepare_test_r2.py']) + baseline=None + if not (run_dir('A0')/'validation_002000/metrics.json').exists(): + baseline=launch('C03-Validation',[HERE/'validate_r2.py','--arm','A0']) + mces_monitor=launch('Validation-MCES-monitor',[HERE/'mces_monitor_r2.py'],MCES_PYTHON) + parallel([(a+'-train',[HERE/'train_r2.py','--arm',a]) for a in C['arms']],maximum=2) + if baseline is not None: + while baseline.poll() is None:time.sleep(3) + if baseline.returncode:raise RuntimeError('C03 baseline Validation failed') + while mces_monitor.poll() is None:time.sleep(3) + if mces_monitor.returncode:raise RuntimeError('Validation MCES monitor failed') + directories=[run_dir('A0')/'validation_002000',*[run_dir(a)/'validation_003000' for a in C['arms']]] + for i,directory in enumerate(directories): + if not (directory/'MCES.json').exists():checked('Validation-MCES-'+str(i),[HERE/'mces_r2.py','--directory',directory],MCES_PYTHON) + checked('Validation-selection',[HERE/'analyze_r2.py']) + if test_prep is not None: + while test_prep.poll() is None:time.sleep(3) + if test_prep.returncode:raise RuntimeError('Inference-only feature cache failed') + names=['C03_002000',*[a+'_003000' for a in C['arms']]] + parallel([(name+'-'+dataset,[HERE/'test_r2.py','--name',name,'--dataset',dataset]) + for name in names for dataset in ('msg_test','casmi2022')],maximum=2) + for name in names: + for dataset in ('msg_test','casmi2022'): + directory=OUT/'test/inference'/name/dataset + if not (directory/'MCES.json').exists():checked(name+'-'+dataset+'-MCES',[HERE/'test_mces_r2.py','--directory',directory],MCES_PYTHON) + checked('final-independent-comparison',[HERE/'analyze_r2.py','--test']) + save(OUT/'PIPELINE_STATUS.json',dict(phase='all_training_Validation_Test_MCES_complete',unix_time=time.time())) + + +if __name__=='__main__': + try:run() + except Exception: + save(OUT/'PIPELINE_FAILURE.json',dict(traceback=traceback.format_exc(),unix_time=time.time(),old_experiments_modified=False));raise diff --git a/code/snapshot/root/code/ceir_r2_20261110/preflight.supervisor.conf b/code/snapshot/root/code/ceir_r2_20261110/preflight.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..d73f9bee75ac75626bdab02ea3c57e20a0b2aa61 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/preflight.supervisor.conf @@ -0,0 +1,12 @@ +[program:specpartition-r2-preflight-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r2_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u /root/xj/SpecPartition-MS/code/ceir_r2_20261110/preflight_r2.py +environment=PROC_NAME="specpartition-r2-preflight-20261110",OMP_NUM_THREADS="1",MKL_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",PYTHONUNBUFFERED="1" +autostart=false +autorestart=false +startsecs=2 +stopasgroup=true +killasgroup=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/code/snapshot/root/code/ceir_r2_20261110/preflight_r2.py b/code/snapshot/root/code/ceir_r2_20261110/preflight_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..f7b9ef74e55748047396955a0cda26ad1f706b4b --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/preflight_r2.py @@ -0,0 +1,9 @@ +"""Independent provisional GPU probe while the full offline cache is built.""" +if __name__=='__main__': + import time,traceback + from runtime_r2 import save,OUT + from prepare_probe_r2 import run as prepare + from acceptance_r2 import run as accept + try:prepare();accept(provisional=True) + except Exception: + save(OUT/'PREFLIGHT_FAILURE.json',dict(traceback=traceback.format_exc(),unix_time=time.time()));raise diff --git a/code/snapshot/root/code/ceir_r2_20261110/prepare.supervisor.conf b/code/snapshot/root/code/ceir_r2_20261110/prepare.supervisor.conf new file mode 100644 index 0000000000000000000000000000000000000000..defb789bf69044506171febf1dfe395f8f5b6a8f --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/prepare.supervisor.conf @@ -0,0 +1,12 @@ +[program:specpartition-r2-prepare-20261110] +directory=/root/xj/SpecPartition-MS/code/ceir_r2_20261110 +command=/usr/bin/nice -n 19 /workspace/xj/SpecPartition-MS/.venv/bin/python -u /root/xj/SpecPartition-MS/code/ceir_r2_20261110/prepare_r2.py +environment=PROC_NAME="%(program_name)s",OMP_NUM_THREADS="1",MKL_NUM_THREADS="1",OPENBLAS_NUM_THREADS="1",PYTHONUNBUFFERED="1" +autostart=false +autorestart=false +startsecs=2 +stopasgroup=true +killasgroup=true +stdout_logfile=/dev/stdout +stdout_logfile_maxbytes=0 +redirect_stderr=true diff --git a/code/snapshot/root/code/ceir_r2_20261110/prepare_probe_r2.py b/code/snapshot/root/code/ceir_r2_20261110/prepare_probe_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..fb15aafa2d8b89147c6c8b2694a5887380318be8 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/prepare_probe_r2.py @@ -0,0 +1,35 @@ +"""Small separate preflight cache; never substitutes for full data readiness.""" +import json +import hashlib +import multiprocessing +from concurrent.futures import ProcessPoolExecutor +import sqlite3 +from runtime_r2 import * +import features_r2 as f +from prepare_r2 import one_feature +from canonical_cache_r2 import canonicalize + + +def run(): + manifest=json.loads((OLD.CACHE/'workload.json').read_text()) + index=next(i for i,(_,_,g) in enumerate(manifest['plans']) if len(g['odata'])==256 and len(g['msg'])==32) + source=readonly(PREP/'assets.sqlite');smiles=set() + for mode in ('replacement','unique'): + row=source.execute('SELECT body FROM batches WHERE mode=? AND idx=?',(mode,index)).fetchone() + if row is None:raise RuntimeError('Probe ledger not prepared yet') + plan=f.loads(row[0]);graphs={r['ref'] for r in plan['rows']} + for r in plan['rows']: + for p in r['pools']:graphs.update(p['graphs']) + for graph in graphs:smiles.add(canonicalize(source.execute('SELECT smiles FROM graph_metadata WHERE graph_hash=?',(graph,)).fetchone()[0])) + db=sqlite3.connect(PREP/'probe.sqlite') + db.execute('CREATE TABLE IF NOT EXISTS molecules(feature_key TEXT PRIMARY KEY,smiles TEXT,feature BLOB,feature_sha TEXT)') + missing=[s for s in sorted(smiles) if db.execute('SELECT 1 FROM molecules WHERE feature_key=?',(f.key(s),)).fetchone() is None] + with ProcessPoolExecutor(max_workers=8,mp_context=multiprocessing.get_context('spawn')) as pool: + for s,(fk,body,digest,reason) in zip(missing,pool.map(one_feature,missing,chunksize=16)): + db.execute('INSERT INTO molecules VALUES (?,?,?,?)',(fk,s,body,digest)) + db.commit();db.close();source.close() + save(PREP/'PROBE_READY.json',dict(complete=True,index=index,unique_features=len(smiles), + provisional_only=True,not_eligible_for_formal_training=True,feature_sha256=sha(HERE/'features_r2.py'))) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/prepare_r2.py b/code/snapshot/root/code/ceir_r2_20261110/prepare_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..a08b23ded6b7831922fa5977ee62a52c3d909be8 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/prepare_r2.py @@ -0,0 +1,168 @@ +"""Materialize both samplers and static features for the exact approved cursor. + +No traversal of the 35M-row global asset pool, no downloads, no original writes. +The original experiment candidate records and official evaluation pools remain +unchanged. Only training draws count independent key14 in the A1/A2/A3 arms. +""" +from collections import Counter,OrderedDict +from concurrent.futures import ProcessPoolExecutor +from functools import lru_cache +import hashlib +import json +import multiprocessing +from pathlib import Path +import random +import sqlite3 +import time + +from runtime_r2 import * +import features_r2 as features +from data09 import Reader,sample_records +from prepare_ceir import entry_identity + + +def connect(): + PREP.mkdir(parents=True,exist_ok=True) + db=sqlite3.connect(PREP/'assets.sqlite');db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS molecules(feature_key TEXT PRIMARY KEY,smiles TEXT,scope TEXT,feature BLOB,feature_sha TEXT)') + db.execute('CREATE TABLE IF NOT EXISTS batches(mode TEXT,idx INTEGER,body BLOB,PRIMARY KEY(mode,idx))') + db.execute('CREATE TABLE IF NOT EXISTS graph_metadata(graph_hash TEXT PRIMARY KEY,feature_key TEXT,identity TEXT,smiles TEXT)') + db.execute('CREATE INDEX IF NOT EXISTS pending_features ON molecules(feature_key) WHERE feature IS NULL') + return db + + +def planning(): + marker=PREP/'SAMPLING_READY.json' + if marker.exists():return json.loads(marker.read_text()) + db=connect();reader=Reader();manifest=json.loads((OLD.CACHE/'workload.json').read_text()) + plans=manifest['plans'][:C['manifest_updates']] + if len(plans)!=C['manifest_updates']:raise RuntimeError('Missing actual parent continuation plans') + source_sha=sha(OLD.CACHE/'workload.json') + @lru_cache(maxsize=100000) + def metadata(gh): + cached=db.execute('SELECT identity,smiles FROM graph_metadata WHERE graph_hash=?',(gh,)).fetchone() + if cached is not None:return cached + row=reader.assets.execute('SELECT smiles,identity,safety FROM graphs WHERE graph_hash=?',(gh,)).fetchone() + if row is None or row[2]!='safe' or row[1] in reader.forbidden:raise RuntimeError('Unsafe/heldout/unprepared training asset '+gh) + smiles,identity,_=row;fk=features.key(smiles) + db.execute('INSERT OR IGNORE INTO molecules(feature_key,smiles,scope) VALUES (?,?,?)',(fk,smiles,'train')) + db.execute('INSERT OR IGNORE INTO graph_metadata VALUES (?,?,?,?)',(gh,fk,identity,smiles)) + return identity,smiles + @lru_cache(maxsize=100000) + def alias(smiles): + hit=reader.assets.execute('SELECT graph_hash FROM smiles WHERE smiles=?',(smiles,)).fetchone() + if hit is None:raise RuntimeError('Original canonical alias missing') + return hit[0] + def graph(entry): + gh=entry.get('graph_hash') or alias(entry.get('canonical_smiles') or entry.get('smiles')) + identity,_=metadata(gh) + if identity!=entry_identity(entry):raise RuntimeError('Candidate identity mismatch') + return gh + def select(row,seed,explicit,mode): + metadata(row['graph_hash']);rng=random.Random(seed);pools=[] + kinds=('mass','formula') if row['source']=='MSG_Train' else (('odata',) if explicit else ()) + formulas=tuple(reader.official(row['target'],'mass')['formula_classes']) if row['source']=='MSG_Train' else tuple(row['view']['formulas']) + for kind in kinds: + if kind=='odata': + view=row['view'];pool=reader.pool(view['pool_path'],view['pool_sha256']);entries=pool['records'] + allowed=pool['safe_mass_order'][view['mass_order_start']:view['mass_order_stop']] + else: + pool=reader.official(row['target'],kind);entries=pool['entries'] + allowed=[i for i,e in enumerate(entries) if e['eligible_for_training']] + pos=[i for i in allowed if entry_identity(entries[i])==row['identity']] + neg=[i for i in allowed if entry_identity(entries[i])!=row['identity']] + if not pos or not neg:continue + draws=LEGACY.C['odata_negative_draws'] if kind=='odata' else LEGACY.C['msg_negative_draws'] + local_rng=random.Random(seed) if kind=='odata' else rng + positive=local_rng.choice(pos) + if mode=='replacement':chosen=local_rng.choices(neg,k=draws) + else: + by_id={} + for i in neg:by_id.setdefault(entry_identity(entries[i]),[]).append(i) + identities=local_rng.sample(sorted(by_id),min(draws,len(by_id))) + chosen=[local_rng.choice(by_id[k]) for k in identities] + selected=[positive,*chosen] + gh=[graph(entries[i]) for i in selected] + fs=tuple(pool['formula_classes']) if kind!='odata' else tuple(sorted({entries[i]['formula'] for i in selected})) + if metadata(gh[0])[0]!=row['identity'] or any(metadata(g)[0]==row['identity'] for g in gh[1:]):raise RuntimeError('False negative') + pools.append(dict(kind=kind,graphs=gh,formulas=fs,negative_draws=len(chosen), + unique_negative_key14=len({entry_identity(entries[i]) for i in chosen}),reference_injected=False)) + return dict(rid=row['record_id'],ref=row['graph_hash'],formulas=formulas,pools=pools) + started=time.monotonic();stats=Counter() + for index,(epoch,step,groups) in enumerate(plans): + for mode in ('replacement','unique'): + if db.execute('SELECT 1 FROM batches WHERE mode=? AND idx=?',(mode,index)).fetchone():continue + rows=[] + for source,ids in groups.items(): + for j,rid in enumerate(ids): + row=loads(reader.db.execute('SELECT body FROM samples WHERE record_id=?',(rid,)).fetchone()[0]) + if row['identity'] in reader.forbidden:raise RuntimeError('Heldout training label') + seed=C['seed']+epoch*100000000+step*10000+j+(1000000 if source=='msg' else 0) + selected=select(row,seed,source=='odata' and j<16,mode);rows.append(selected) + for p in selected['pools']: + stats[mode+'_draws']+=p['negative_draws'];stats[mode+'_unique']+=p['unique_negative_key14'] + body=features.dumps(dict(epoch=epoch,step=step,rows=rows)) + db.execute('INSERT INTO batches VALUES (?,?,?)',(mode,index,body)) + db.commit() + if index%10==0: + status=dict(phase='exact_sampler_materialization',steps=index+1,total=len(plans),seconds=time.monotonic()-started, + unique_structures=db.execute('SELECT count(*) FROM molecules').fetchone()[0],stats=dict(stats)) + save(PREP/'status.json',status);print(json.dumps(status),flush=True);disk_check() + expected=2*len(plans) + if db.execute('SELECT count(*) FROM batches').fetchone()[0]!=expected:raise RuntimeError('Incomplete sampler ledger') + result=dict(complete=True,batches=expected,updates=len(plans),workload_sha256=source_sha, + parent_sha256=C['parent_sha256'],sampling_stats_this_attempt=dict(stats),original_candidate_pools_modified=False, + negatives_exclude_heldout_key14=True,Test_and_CASMI_read=False) + db.close();save(marker,result);return result + + +def add_validation(): + marker=PREP/'VALIDATION_STRUCTURES_READY.json' + if marker.exists():return + db=connect();source=readonly(LEGACY.PREP/'validation.sqlite');count=0 + for (blob,) in source.execute('SELECT body FROM graphs'): + mol=loads(blob);fk=features.key(mol.smiles) + db.execute('INSERT OR IGNORE INTO molecules(feature_key,smiles,scope) VALUES (?,?,?)',(fk,mol.smiles,'validation')) + count+=1 + if count%1000==0:db.commit() + db.commit();db.close();source.close() + save(marker,dict(complete=True,source_graph_rows=count,labels_used=False,training_negative_scope_changed=False)) + + +def one_feature(smiles): + value=features.build(smiles);blob=features.dumps(value) + return features.key(smiles),blob,hashlib.sha256(blob).hexdigest(),value['reason'] + + +def prepare_features(): + db=connect() + done=0;started=time.monotonic();stats=Counter();ctx=multiprocessing.get_context('spawn') + with ProcessPoolExecutor(max_workers=C['prepare_workers'],mp_context=ctx) as pool: + while True: + chunk=db.execute('SELECT smiles FROM molecules WHERE feature IS NULL ORDER BY feature_key LIMIT 512').fetchall() + if not chunk:break + for fk,body,digest,reason in pool.map(one_feature,[r[0] for r in chunk],chunksize=8): + db.execute('UPDATE molecules SET feature=?,feature_sha=? WHERE feature_key=?',(body,digest,fk));done+=1;stats[reason]+=1 + db.commit();save(PREP/'status.json',dict(phase='offline_connected_fragment_features',processed_this_attempt=done, + seconds=time.monotonic()-started,reasons=dict(stats))) + if done%4096==0:print(json.dumps(dict(features=done,seconds=time.monotonic()-started)),flush=True);disk_check() + missing=db.execute('SELECT count(*) FROM molecules WHERE feature IS NULL').fetchone()[0] + if missing:raise RuntimeError('Missing R2 feature rows') + total=db.execute('SELECT count(*) FROM molecules').fetchone()[0] + db.execute('PRAGMA wal_checkpoint(TRUNCATE)');db.close() + marker=dict(complete=True,feature_version=features.VERSION,feature_code_sha256=sha(HERE/'features_r2.py'), + feature_rows=total,sampling=json.loads((PREP/'SAMPLING_READY.json').read_text()), + validation=json.loads((PREP/'VALIDATION_STRUCTURES_READY.json').read_text()), + original_graph_store_modified=False,prepared_database_bytes=(PREP/'assets.sqlite').stat().st_size) + save(PREP/'READY.json',marker) + + +if __name__=='__main__': + OUT.mkdir(parents=True,exist_ok=True);disk_check() + try: + planning();add_validation() + from canonical_cache_r2 import run as canonical_features + canonical_features() + except Exception: + import traceback + save(PREP/'failure.json',dict(traceback=traceback.format_exc(),unix_time=time.time()));raise diff --git a/code/snapshot/root/code/ceir_r2_20261110/prepare_test_r2.py b/code/snapshot/root/code/ceir_r2_20261110/prepare_test_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..01a29eb4ff73e10a896117f0f5b8bb81e5c683ee --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/prepare_test_r2.py @@ -0,0 +1,57 @@ +"""Inference-only, label-free descriptors for frozen official and CASMI pools.""" +from concurrent.futures import ProcessPoolExecutor +import json +import fcntl +import multiprocessing +import sqlite3 +import time +from runtime_r2 import * +from prepare_r2 import one_feature +import features_r2 as features + +EVAL=OUT/'test';DEST=EVAL/'prepared';SOURCE=ROOT/'data/derived/post_training_evaluation_20261103' + + +def run(): + DEST.mkdir(parents=True,exist_ok=True) + lock=(DEST/'preparation.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + marker=DEST/'READY.json' + if marker.exists(): + if json.loads(marker.read_text())['feature_code_sha256']!=sha(HERE/'features_r2.py'):raise RuntimeError('Inference feature version changed') + return + db=sqlite3.connect(DEST/'assets.sqlite',uri=True);db.execute('PRAGMA journal_mode=WAL') + db.execute('CREATE TABLE IF NOT EXISTS molecules(feature_key TEXT PRIMARY KEY,smiles TEXT,feature BLOB,feature_sha TEXT)') + db.execute('CREATE INDEX IF NOT EXISTS pending ON molecules(feature_key) WHERE feature IS NULL') + source_markers={};started=time.monotonic() + for dataset in ('msg_test','casmi2022'): + ready=json.loads((SOURCE/(dataset+'_ready.json')).read_text()) + if not ready['complete']:raise RuntimeError('Frozen evaluation data incomplete') + source_markers[dataset]=dict(ready_sha256=sha(SOURCE/(dataset+'_ready.json')),counts=ready['counts'],binding=ready['binding']) + seen=DEST/(dataset+'_IMPORTED.json') + if seen.exists():continue + original=readonly(SOURCE/(dataset+'.sqlite'));count=0 + for blob, in original.execute('SELECT body FROM graphs'): + mol=loads(blob);db.execute('INSERT OR IGNORE INTO molecules(feature_key,smiles) VALUES (?,?)',(features.key(mol.smiles),mol.smiles));count+=1 + if count%1000==0: + db.commit();save(DEST/'status.json',dict(phase='label_free_candidate_import',dataset=dataset,graphs=count,unix_time=time.time())) + db.commit();original.close();save(seen,dict(complete=True,graphs=count,reference_labels_read=False)) + # Reuse identical static features without reusing any student embeddings or + # allowing this inference cache to enter the training data path. + db.execute('ATTACH DATABASE ? AS training',('file:'+str(PREP/'assets.sqlite')+'?mode=ro',)) + db.execute('UPDATE molecules SET feature=(SELECT t.feature FROM training.canonical_features t WHERE t.feature_key=molecules.feature_key),feature_sha=(SELECT t.feature_sha FROM training.canonical_features t WHERE t.feature_key=molecules.feature_key) WHERE feature IS NULL') + db.commit();db.execute('DETACH DATABASE training');done=0 + with ProcessPoolExecutor(max_workers=8,mp_context=multiprocessing.get_context('spawn')) as workers: + while True: + rows=db.execute('SELECT smiles FROM molecules WHERE feature IS NULL ORDER BY feature_key LIMIT 512').fetchall() + if not rows:break + for fk,body,digest,reason in workers.map(one_feature,[r[0] for r in rows],chunksize=8): + db.execute('UPDATE molecules SET feature=?,feature_sha=? WHERE feature_key=?',(body,digest,fk));done+=1 + db.commit();save(DEST/'status.json',dict(phase='inference_only_static_features',new_features=done,seconds=time.monotonic()-started,unix_time=time.time())) + disk_check() + count=db.execute('SELECT count(*) FROM molecules').fetchone()[0] + db.execute('PRAGMA wal_checkpoint(TRUNCATE)');db.close() + save(marker,dict(complete=True,features=count,feature_code_sha256=sha(HERE/'features_r2.py'),inputs=source_markers, + label_free=True,training_does_not_read_this_cache=True,ground_truth_injection=False,candidate_limit=None,unix_time=time.time())) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/runtime_r2.py b/code/snapshot/root/code/ceir_r2_20261110/runtime_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..8a1a94744bdfe6ada6f6abba8d580347c940f976 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/runtime_r2.py @@ -0,0 +1,116 @@ +"""Independent release and full-state continuation; old experiments are read-only.""" +import contextlib +import fcntl +import hashlib +import json +import os +from pathlib import Path +import random +import shutil +import subprocess +import sys +import time + +os.environ.setdefault('CUBLAS_WORKSPACE_CONFIG',':4096:8') + +HERE=Path(__file__).resolve().parent +C=json.loads((HERE/'config.json').read_text()) +OUT=Path(C['output']);PREP=OUT/'prepared';ROOT=Path(C['root']) +sys.path.insert(0,C['source_r1']) +import runtime_ceir as OLD +LEGACY=OLD.LEGACY;SPEC=OLD.SPEC +LEGACY.C.update(spectrum_chunk=C['spectrum_chunk'],graph_chunk=C['graph_chunk'],local_chunk=C['local_chunk'], + pool_micro_views=C['pool_micro_views'],threads=1,workers=1,max_atoms_per_microbatch=C['max_atoms_per_microbatch']) +from runtime09 import readonly,save,sha +from data09 import loads + + +def run_dir(arm): + if arm not in C['arms']:raise ValueError('Unknown R2 arm') + p=OUT/arm;p.mkdir(parents=True,exist_ok=True);return p + + +def code_manifest(): + return {p.name:sha(p) for p in sorted([*HERE.glob('*.py'),HERE/'config.json']) if not p.name.startswith('.')} + + +def parent_state(): + import torch + if sha(C['parent_checkpoint'])!=C['parent_sha256']:raise RuntimeError('Parent checkpoint hash changed') + state=torch.load(C['parent_checkpoint'],map_location='cpu',weights_only=False) + if state['progress']['update']!=C['source_update']:raise RuntimeError('Incorrect parent update') + if state['binding']['data']!=LEGACY.bind():raise RuntimeError('Original training data binding changed') + return state + + +def binding(): + ready=json.loads((PREP/'READY.json').read_text()) + evaluation_code=Path('/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110') + external={str(p):sha(p) for p in sorted(evaluation_code.glob('*.py'))} + external[str(Path(C['source_r1'])/'mces_ceir.py')]=sha(Path(C['source_r1'])/'mces_ceir.py') + return dict(code=code_manifest(),parent_sha256=C['parent_sha256'],prepared=ready, + original_data=LEGACY.bind(),feature_version=C['feature_version'], + dependency_sources=OLD.bind()['dependency_sources'],parent_formula_loss=LEGACY.C['r2'], + parent_loss_weights=LEGACY.C['loss_weights'],auxiliary=SPEC['loss']['auxiliary'], + data_acceptance=json.loads((PREP/'DATA_ACCEPTANCE.json').read_text()),external_evaluation_code=external) + + +def disk_check(): + OUT.mkdir(parents=True,exist_ok=True) + if shutil.disk_usage(OUT).free=C['minimum_free_gpu_mib']: + for f in files: + try:fcntl.flock(f,fcntl.LOCK_EX|fcntl.LOCK_NB);held=f;break + except BlockingIOError:pass + if held is None: + save(Path(directory)/'resource_status.json',dict(phase=phase,state='waiting_for_R2_GPU_slot',unix_time=time.time())) + time.sleep(3) + yield + finally: + import torch + if torch.cuda.is_initialized():torch.cuda.empty_cache() + if held is not None:fcntl.flock(held,fcntl.LOCK_UN) + for f in files:f.close() + + +def restore_rng(state): + import numpy as np + import torch + torch.set_rng_state(state['torch_rng']);torch.cuda.set_rng_state_all(state['cuda_rng']) + np.random.set_state(state['numpy_rng']);random.setstate(state['python_rng']) + + +def checkpoint(path,model,opt,progress,bind): + import numpy as np + import torch + path=Path(path);temporary=path.with_suffix('.tmp') + torch.save(dict(architecture='CEIR_R2',model=model.state_dict(),optimizer=opt.state_dict(),progress=progress, + binding=bind,torch_rng=torch.get_rng_state(),cuda_rng=torch.cuda.get_rng_state_all(), + numpy_rng=np.random.get_state(),python_rng=random.getstate()),temporary) + temporary.replace(path) + + +def amp(): + import torch + return torch.autocast('cuda',dtype=torch.bfloat16,enabled=LEGACY.C['bf16']) diff --git a/code/snapshot/root/code/ceir_r2_20261110/test_features_r2.py b/code/snapshot/root/code/ceir_r2_20261110/test_features_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..d041be4570d191a13552b1ed1ce1b35d5a7385e5 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/test_features_r2.py @@ -0,0 +1,33 @@ +"""Chemical sanity checks independent of any Test/CASMI reference labels.""" +import math +from types import SimpleNamespace +import numpy as np +from rdkit import Chem +import features_r2 as f + + +def run(): + phenol=f.build('Oc1ccccc1');assert phenol['counts'][0]==1 and phenol['counts'][3]==1 + ketone=f.build('CC(=O)CCO');assert ketone['counts'][0]==1 and ketone['counts'][1]==1 + split=f.build('CCO.CCO');assert split['counts'][-1]==2 and not split['valid'].any() + isotope=f.build('[13CH3]CO');assert not isotope['valid'].any() + for smiles in ['CC(=O)CCO','COc1ccc(CCCO)cc1','CCN(CC)C(=O)c1ccccc1','Oc1ccccc1']: + a=f.build(smiles);b=f.loads(f.dumps(a));assert b['smiles']==smiles + m=Chem.MolFromSmiles(smiles);assert a['layout']==f.layout(m) + for i in np.flatnonzero(a['valid']): + vertices=set(np.flatnonzero(a['members'][i]));assert 3<=len(vertices)<=m.GetNumAtoms()-2 + todo=[next(iter(vertices))];seen=set(todo) + while todo: + atom=todo.pop() + for nb in m.GetAtomWithIdx(int(atom)).GetNeighbors(): + j=nb.GetIdx() + if j in vertices and j not in seen:seen.add(j);todo.append(j) + assert seen==vertices and np.isclose(a['members'][i].sum(),1.) + q=SimpleNamespace(peaks=[(80.,1.),(50.,4.),(100.,9.)],precursor_mz=100.,adduct='[M+H]+') + mz,y=f.spectrum(q);assert list(mz)==[50.,80.,100.] and y[-1]==0 and np.isclose(y[0],2/3) + assert f.ion_offsets('[M+Na]+')[0]>f.ion_offsets('[M+H]+')[0] + assert f.ion_offsets('[M+2H]2+')==(None,None) + print('FEATURE_SANITY_PASSED',flush=True) + + +if __name__=='__main__':run() diff --git a/code/snapshot/root/code/ceir_r2_20261110/test_mces_r2.py b/code/snapshot/root/code/ceir_r2_20261110/test_mces_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..c93251201ad43208028714aa3f76bbd48bfaca04 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/test_mces_r2.py @@ -0,0 +1,26 @@ +"""Post-hoc Test MCES, inherited fixed protocol and a private pair cache.""" +import argparse +import fcntl +import importlib.util +import json +from pathlib import Path +import sys +import sqlite3 + +HERE=Path(__file__).resolve().parent;C=json.loads((HERE/'config.json').read_text());OUT=Path(C['output'])/'test' + + +def run(directory): + own=OUT/'mces';own.mkdir(parents=True,exist_ok=True) + lock=(own/'compute.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + path=Path('/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110/mces.py') + spec=importlib.util.spec_from_file_location('r2_fixed_Test_MCES',path);module=importlib.util.module_from_spec(spec);sys.modules[spec.name]=module;spec.loader.exec_module(module) + module.OUT=OUT;module.old.OUT=OUT/'mces' # workers may record solver state: never write the old run + previous=Path('/root/xj/SpecPartition-MS/evaluations/ceir_r1_test_comparison_20261110/mces/pairs.sqlite') + if not (own/'pairs.sqlite').exists() and previous.exists(): + a=sqlite3.connect('file:'+str(previous)+'?mode=ro',uri=True);b=sqlite3.connect(own/'pairs.sqlite');a.backup(b);a.close();b.close() + db=module.initialize();module.compute(Path(directory),db);db.close() + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--directory',required=True);a=p.parse_args();run(a.directory) diff --git a/code/snapshot/root/code/ceir_r2_20261110/test_r2.py b/code/snapshot/root/code/ceir_r2_20261110/test_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..90066dcaa86bdf9515b58b20b52fe28f6889e1e5 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/test_r2.py @@ -0,0 +1,75 @@ +"""Fixed Test adapters from R1, actual R2 scores, no truncation or truth injection.""" +import argparse +import fcntl +import json +import sys +from runtime_r2 import * + +EVAL=OUT/'test' +R1_TEST_CODE=Path('/root/xj/SpecPartition-MS/code/ceir_r1_test_comparison_20261110') + + +def frozen_models(): + selection=json.loads((OUT/'SELECTION.json').read_text()) + if not selection['complete'] or selection['test_used_for_selection']:raise RuntimeError('Validation-only decision is not frozen') + result={'C03_002000':dict(arm='A0',update=2000,checkpoint=C['parent_checkpoint'],sha256=C['parent_sha256'],role='fixed_parent_baseline')} + for arm in C['arms']: + path=run_dir(arm)/('step_%06d.pt'%C['pilot_target_update']) + if not json.loads((run_dir(arm)/'COMPLETE.json').read_text())['complete']:raise RuntimeError('Training arm incomplete') + result[arm+'_003000']=dict(arm=arm,update=3000,checkpoint=str(path),sha256=sha(path), + role='Validation_selected' if arm==selection['recommended_arm'] else 'prespecified_matched_ablation') + return result + + +def freeze(): + sys.path.insert(0,str(R1_TEST_CODE)) + import evaluation_runtime as previous + EVAL.mkdir(parents=True,exist_ok=True) + lock=(EVAL/'freeze.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + marker=json.loads((EVAL/'prepared/READY.json').read_text()) + if marker['feature_code_sha256']!=sha(HERE/'features_r2.py'):raise RuntimeError('Test feature code mismatch') + value=dict(models=frozen_models(),inputs={d:previous.inputs(d) for d in ('msg_test','casmi2022')}, + r2_binding=binding(),Validation_selection_sha256=sha(OUT/'SELECTION.json'),inference_feature_marker=marker, + candidate_limit=None,truth_injection=False,Test_checkpoint_selection=False, + development_exposure=C['test_development_exposure']) + path=EVAL/'FROZEN.json' + if path.exists(): + if json.loads(path.read_text())!=value:raise RuntimeError('Test release binding changed') + else:save(path,value) + return value + + +def make_model(name): + import torch + from model_r2_new import make_model_optimizer + frozen=json.loads((EVAL/'FROZEN.json').read_text());item=frozen['models'][name] + if sha(item['checkpoint'])!=item['sha256']:raise RuntimeError('Test checkpoint changed') + setup_gpu();path=None if name=='C03_002000' else item['checkpoint'] + model,opt,progress,_=make_model_optimizer(item['arm'],path);del opt + if path is not None: + state=torch.load(path,map_location='cpu',weights_only=False) + if state['binding']!=frozen['r2_binding']:raise RuntimeError('Training / Test source binding differs') + del state + if progress['update']!=item['update']:raise RuntimeError('Wrong Test checkpoint update') + model.graph_chunk=C['validation_graph_chunk'];model.local_chunk=C['validation_local_chunk'] + model.install_features(EVAL/'prepared/assets.sqlite');model.eval() + return model,item + + +def run(name,dataset): + sys.path.insert(0,str(R1_TEST_CODE));freeze() + locks=EVAL/'job_locks';locks.mkdir(parents=True,exist_ok=True) + lock=(locks/(name+'_'+dataset+'.lock')).open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + # Reuse rank/alias expansion and completeness checks, not their old model + # constructor or output paths. No imported function is allowed to write R1. + module=OLD.load_module('r2_fixed_Test_inference_adapter',R1_TEST_CODE/'infer.py') + module.OUT=EVAL;module.make_model=make_model + module.gpu_slot=lambda directory:gpu_work(directory,'frozen_Test_inference') + module.check_disk=disk_check + module.C=dict(module.C,spectrum_batch=C['validation_spectrum_batch'],graph_chunk=C['validation_graph_chunk'],local_chunk=C['validation_local_chunk']) + module.evaluate(name,dataset) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--name',required=True);p.add_argument('--dataset',choices=['msg_test','casmi2022'],required=True) + a=p.parse_args();run(a.name,a.dataset) diff --git a/code/snapshot/root/code/ceir_r2_20261110/train_r2.py b/code/snapshot/root/code/ceir_r2_20261110/train_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..397b2b4b35ab13aa8d1ed20c06ae9a9bcfc019a1 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/train_r2.py @@ -0,0 +1,90 @@ +"""Pilot continuation from C03 2k; all active tasks jointly backpropagate.""" +import argparse +import fcntl +import json +import math +import time +import traceback +import uuid +from runtime_r2 import * + + +def train(arm): + import torch + from torch.utils.data import DataLoader + from data_r2 import Dataset + from model_r2_new import make_model_optimizer + from objectives_r2 import train_step + from validate_r2 import evaluate + directory=run_dir(arm);lock=(directory/'training.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + ready=json.loads((OUT/'TRAIN_READY.json').read_text());bind=binding() + if ready['binding']!=bind or not ready['complete']:raise RuntimeError('Code/data/GPU acceptance binding changed') + if (directory/'COMPLETE.json').exists():return + target=C['pilot_target_update'];setup_gpu();last=directory/'last.pt' + with gpu_work(directory,'restore'): + model,opt,progress,original_lr=make_model_optimizer(arm,last if last.exists() else None) + if last.exists(): + state=torch.load(last,map_location='cpu',weights_only=False) + if state['binding']!=bind:raise RuntimeError('Resume binding differs') + del state + else:checkpoint(last,model,opt,progress,bind) + save(directory/'provenance.json',dict(arm=arm,source_update=C['source_update'],target_update=target,parent_checkpoint=C['parent_checkpoint'], + parent_sha256=C['parent_sha256'],parameters=sum(p.numel() for p in model.parameters()),binding=bind, + old_parameters_loaded_exactly=True,optimizer_moments_continued=True,source_data_cursor_preserved=True, + original_pools_modified=False,training_uses_Test_or_CASMI=False, + zero_weight_coarse_tasks_skipped=True,all_arms_receive_same_stochastic_view_checkpoint_fix=True)) + attempt=uuid.uuid4().hex;resumed=progress['update'] + log(directory/'events.jsonl',dict(event='resumed',attempt=attempt,update=resumed,unix_time=time.time())) + pending=[u for u in C['validation_updates'] if u<=progress['update'] and u not in progress.get('r2_validated',[])] + for u in pending: + if u!=progress['update']:raise RuntimeError('Pending historical Validation checkpoint must be evaluated explicitly') + evaluate(model,arm,u,128 if u=target:break + previous=time.monotonic() + if progress['update']!=target:raise RuntimeError('Training exhausted before target') + save(directory/'COMPLETE.json',dict(complete=True,source_update=C['source_update'],update=target,new_updates=target-C['source_update'], + checkpoint=str(directory/('step_%06d.pt'%target)),validated=progress['r2_validated'],exposures=progress['r2_exposures'],unix_time=time.time())) + save(directory/'status.json',dict(phase='completed',update=target,new_updates=target-C['source_update'],unix_time=time.time())) + + +if __name__=='__main__': + p=argparse.ArgumentParser();p.add_argument('--arm',choices=C['arms'],required=True);a=p.parse_args() + try:train(a.arm) + except Exception: + save(run_dir(a.arm)/'failure.json',dict(traceback=traceback.format_exc(),unix_time=time.time(),resume_checkpoint_preserved=True));raise diff --git a/code/snapshot/root/code/ceir_r2_20261110/validate_r2.py b/code/snapshot/root/code/ceir_r2_20261110/validate_r2.py new file mode 100644 index 0000000000000000000000000000000000000000..66c7c878ffcc2ce5d3be6a71fddff5d460a5b700 --- /dev/null +++ b/code/snapshot/root/code/ceir_r2_20261110/validate_r2.py @@ -0,0 +1,109 @@ +"""Unchanged official Validation, fixed numerical batching, all ranked scores.""" +from dataclasses import replace +import gzip +import fcntl +import hashlib +import json +import time +import torch +from runtime_r2 import * +from validation_ceir import metric,KS,FKS +from specpartition_ms.chemistry import canonical_formula,formula_vector + + +def evaluate(model,arm,update,maximum_targets=None,checkpoint_path=None): + label='validation_%06d'%update if maximum_targets is None else 'probe_%06d_%04d'%(update,maximum_targets) + dest=run_dir(arm)/label;dest.mkdir(parents=True,exist_ok=True) + lock=(dest/'evaluation.lock').open('a+');fcntl.flock(lock,fcntl.LOCK_EX) + protocol=dict(binding=binding(),arm=arm,update=update,maximum_targets=maximum_targets, + checkpoint_sha256=sha(checkpoint_path) if checkpoint_path else C['parent_sha256'], + spectrum_batch=C['validation_spectrum_batch'],graph_chunk=C['validation_graph_chunk'], + local_chunk=C['validation_local_chunk'],candidate_policy='original_official_raw_entries_no_injection', + structure_identity='key14',probe_selection='sha256(target)_ascending') + path=dest/'protocol.json' + if path.exists() and json.loads(path.read_text())!=protocol:raise RuntimeError('Validation binding changed') + save(path,protocol) + if (dest/'metrics.json').exists():return json.loads((dest/'metrics.json').read_text()) + model.eval();old_gc,old_lc=model.graph_chunk,model.local_chunk + model.graph_chunk=C['validation_graph_chunk'];model.local_chunk=C['validation_local_chunk'] + db=readonly(LEGACY.PREP/'validation.sqlite');summary=[];started=time.monotonic() + targets=[r[0] for r in db.execute('SELECT DISTINCT target FROM spectra ORDER BY target')] + if maximum_targets is not None:targets=sorted(targets,key=lambda s:hashlib.sha256(s.encode()).digest())[:maximum_targets] + for ti,target in enumerate(targets): + output=dest/(hashlib.sha256(target.encode()).hexdigest()+'.json.gz') + if output.exists(): + with gzip.open(output,'rt') as f:summary.extend(json.load(f)['rows']) + continue + pools={v:json.loads(db.execute('SELECT body FROM pools WHERE target=? AND view=?',(target,v)).fetchone()[0]) for v in ('mass','formula')} + aliases={s:db.execute('SELECT graph_key,identity,formula,error FROM aliases WHERE smiles=?',(s,)).fetchone() for s in set(sum(pools.values(),[]))} + graphs={} + for g,identity,formula,error in aliases.values(): + if g is not None and g not in graphs:graphs[g]=loads(db.execute('SELECT body FROM graphs WHERE graph_key=?',(g,)).fetchone()[0]) + keys=sorted(graphs);positions={g:i for i,g in enumerate(keys)};mols=[graphs[g] for g in keys] + data=[loads(r[0]) for r in db.execute('SELECT body FROM spectra WHERE target=? ORDER BY identifier',(target,))] + forms={} + for v in ('mass','formula'): + fs=set() + for s in pools[v]: + if aliases[s][2]: + try:formula_vector(aliases[s][2]);fs.add(canonical_formula(aliases[s][2])) + except ValueError:pass + forms[v]=tuple(sorted(fs)) + rows=[];ranked={} + with gpu_work(dest,'Validation'),torch.inference_mode(),amp(): + if mols:_,atoms,zm=model.encode_molecules(mols) + for start in range(0,len(data),C['validation_spectrum_batch']): + block=data[start:start+C['validation_spectrum_batch']] + tokens,qs,_=model.spectrum.forward_batch([r['query'] for r in block]) + views=[(i,v,replace(r['query'],formula_candidates=forms[v])) for i,r in enumerate(block) for v in ('mass','formula')] + fs=model.formula_batch(torch.stack([qs[i] for i,_,_ in views]),[q for _,_,q in views],[tokens[i] for i,_,_ in views]) + for vi,(i,v,q) in enumerate(views): + r=block[i];selected=sorted({aliases[s][0] for s in pools[v] if aliases[s][0] is not None}) + index=[positions[g] for g in selected];scores={} + if index: + values,_,_=model.score_encoded(qs[i],tokens[i],q,[graphs[g] for g in selected],[atoms[j] for j in index],zm[index],fs[vi]) + if not torch.isfinite(values).all():raise RuntimeError('Nonfinite Validation score') + scores=dict(zip(selected,values.float().cpu().tolist())) + candidates=[dict(smiles=s,identity=aliases[s][1],formula=aliases[s][2],score=scores.get(aliases[s][0]), + scoreable=aliases[s][0] in scores) for s in pools[v]] + candidates.sort(key=lambda c:(not c['scoreable'],-c['score'] if c['scoreable'] else 0,c['identity'] or '',c['smiles'])) + rank=next((j+1 for j,c in enumerate(candidates) if c['scoreable'] and c['identity']==r['identity']),None) + fv=fs[vi].float().cpu().tolist();order=sorted(range(len(fv)),key=lambda j:(-fv[j],q.formula_candidates[j])) + try:truth=canonical_formula(r['formula']);formula_vector(truth) + except ValueError:truth=None + frank=next((j+1 for j,k in enumerate(order) if q.formula_candidates[k]==truth),None) + rows.append(dict(identifier=r['identifier'],target=target,view=v,reference_identity=r['identity'],reference_formula=truth, + rank=rank,formula_rank=frank,candidate_count=len(candidates),formula_count=len(fv), + unscoreable=sum(not c['scoreable'] for c in candidates),adduct=q.adduct,peak_count=len(q.peaks), + collision_energy=q.collision_energy,instrument=q.instrument, + reference_present_in_original_pool=any(c['identity']==r['identity'] for c in candidates), + reference_scoreable=any(c['scoreable'] and c['identity']==r['identity'] for c in candidates), + top1_smiles=candidates[0]['smiles'] if candidates and candidates[0]['scoreable'] else None)) + ranked[r['identifier']+'/'+v]=dict(candidates=candidates,formulas=[dict(formula=q.formula_candidates[j],score=fv[j],rank=k+1) for k,j in enumerate(order)]) + temporary=Path(str(output)+'.tmp') + with gzip.open(temporary,'wt',compresslevel=3) as f:json.dump(dict(rows=rows,ranked=ranked),f,separators=(',',':')) + temporary.replace(output);summary.extend(rows) + save(dest/'status.json',dict(targets=ti+1,total=len(targets),spectral_views=len(summary),seconds=time.monotonic()-started,unix_time=time.time())) + disk_check() + metrics={} + for view in ('mass','formula'): + rr=[r for r in summary if r['view']==view] + if maximum_targets is None and (len(rr)!=19429 or len({r['identifier'] for r in rr})!=19429):raise RuntimeError('Incomplete official Validation denominator') + metrics[view]=dict(spectra=len(rr),structure=metric(rr,'rank',KS),formula=metric(rr,'formula_rank',FKS), + original_pool_coverage=sum(r['reference_present_in_original_pool'] for r in rr),scoreable_coverage=sum(r['reference_scoreable'] for r in rr)) + with gzip.open(dest/'per_spectrum_summary.json.gz','wt',compresslevel=3) as f:json.dump(summary,f,separators=(',',':')) + x=metrics['mass']['structure']['1']['micro'];y=metrics['formula']['structure']['1']['micro'] + metrics.update(complete=True,update=update,full_Validation=maximum_targets is None,selection_harmonic_Top1=2*x*y/max(1e-12,x+y), + protocol=protocol,MCES='not_yet_computed_not_zero_filled',seconds=time.monotonic()-started) + save(dest/'metrics.json',metrics);db.close();model.graph_chunk=old_gc;model.local_chunk=old_lc;model.train() + return metrics + + +if __name__=='__main__': + import argparse + from model_r2_new import make_model_optimizer + p=argparse.ArgumentParser();p.add_argument('--arm',choices=C['arms'],required=True);p.add_argument('--checkpoint');p.add_argument('--targets',type=int) + a=p.parse_args();setup_gpu() + with gpu_work(run_dir(a.arm),'restore_for_evaluation'):model,opt,progress,_=make_model_optimizer(a.arm,a.checkpoint) + del opt + evaluate(model,a.arm,progress['update'],a.targets,a.checkpoint) diff --git a/code/snapshot/root/code/ceir_r3_20261110/METHOD.md b/code/snapshot/root/code/ceir_r3_20261110/METHOD.md new file mode 100644 index 0000000000000000000000000000000000000000..66c514079871565162bb6c132cc700172e0f652f --- /dev/null +++ b/code/snapshot/root/code/ceir_r3_20261110/METHOD.md @@ -0,0 +1,147 @@ +# CEIR-R3: badcase-driven residual continuation + +## Fixed experiment contract + +User-approved budget: **every arm adds exactly 3,000 optimizer updates**. +All five arms start at A3 `step_003000.pt`, SHA-256 +`78841458441e38b260c076e75ccd06e0729e83887450eb8b64667edeab87aa46`, +and end at branch update 6,000. These counters are not total training from +random initialization. Model weights, two existing AdamW parameter groups, +moments, RNG and the next spectrum cursor continue. New heads form group three. +Temporary engineering probes are discarded and do not count toward training. + +| Arm | Intervention beyond A3 | +| --- | --- | +| R3C | Matched A3 continuation control | +| R3H | FP32 high-frequency m/z evidence plus one spatial-distance-biased atom attention readout | +| R3D | Pool-relative rarity of supported candidate connected-cut hypotheses | +| R3F | Bounded learned per-formula logmeanexp correction of structural scores | +| R3M | H + D + F, a predeclared combination, not an automatically selected winner | + +All arms retain A3's 6-layer spectrum encoder, 6-layer gated MPNN, formula +conditioning, atom/peak matching, count evidence and learned fragment branch. +The new topology attention is an additional readout, not a claim to replace +the original GNN. All newly added score paths are zero at initialization. + +## Data and negatives + +The original training sources and source mixture remain unchanged. Exact next +3,000 batches are reconstructed from the parent's actual epoch/next-step cursor. +MSG uses both official Mass and Formula views, 63 negative draws where possible; +explicit o_data views retain the inherited 128-negative budget and eligibility. +All five arms use the same A3 distinct-key14 random draw ledger. Raw candidate +pools are not deduplicated or modified. The planned hard-negative mixture is +**deferred to a separate sampling ablation**, to avoid confounding this network +comparison. Training labels and negatives exclude the heldout key14 registry. +Same-connectivity spectra/aliases never become false negatives. + +Existing ~13 GiB train/Validation and ~4.4 GiB Test fragment caches are read-only. +Only missing fragment descriptors and compressed uint8 graph distances are +stored in a private overlay. No PubChem re-query, no Test labels in training. +RDKit preparation runs offline before formal training starts. + +Storage-only correction before formal acceptance: symmetric capped distances +are encoded as lossless upper-triangle nibbles, full SHA-256 digests use binary +representation, and SQLite avoids duplicate rowid indices. Every converted +distance array and the full sampler ledger are checked for exact equality. +No numeric feature, graph, candidate identity or optimizer update is changed. + +## H: precise peak input and longer-range graph readout + +The added peak branch computes absolute-m/z Fourier features in FP32, intensity +and fractional mass, then intensity-pools a 64-dimensional representation. It +joins the current 256-dimensional spectrum encoding. It does not relabel raw +precursor-minus-peak differences as neutral losses. The original formula head +already has an FP32 path; this is additional structural-ranking evidence. + +For each candidate, one four-head, 128-dimensional attention readout operates +on current GNN atom representations with learned shortest-path-distance bias, +capped at distance 15. Mean/max readouts match the spectrum. Current student GNN +gradients remain live. No old trainable embedding cache substitutes for them. +This targets local-environment collisions, but improvement is an experiment, +not guaranteed by the architecture. + +## D: differential candidate evidence + +For all candidates in the current pool, count how many distinct candidates have +each 0.02-Da-bin connected-cut mass. A fragment receives bounded log rarity. +Observed supporting intensities and unsupported rare hypotheses form four +diagnostics for a small learned residual. Ion/adduct templates and tolerance +remain A3's `max(20 ppm, 0.02 Da)`. This is not strict 20 ppm at low m/z and is +not the original precursor candidate-filter tolerance. + +Frequency reduction is computed over the **whole provided candidate pool**, not +independent compute tiles, and is invariant to candidate permutation. No true +SMILES or true formula enters this scoring branch. Candidate-independent +shared evidence is not treated as proof of identity. The finite heuristic cuts +remain approximate, not chemically validated fragment annotations. + +## F: formula calibration + +Let `b_i` be the final structural score excluding the formula prior, including +enabled structural residuals. For formula f: + +`M_f = logsumexp(b_j : F_j=f) - log(number of candidates with f)` + +The calibrated score is `S_i = A3_plus_residual_i - 0.5*tanh(alpha)*M_Fi`. +Alpha starts at zero. This uses logmeanexp instead of unadjusted logsumexp to +avoid deterministic penalties solely from candidate count. It is a bounded, +signed calibration hypothesis, **not a normalized probabilistic factorization**. +For a single-formula pool it is disabled, since subtracting a common scalar +cannot change ranks. Sampled-train/full-pool calibration shift is an explicit +limitation to inspect. No formula Top1 pruning is allowed. + +## Joint loss and optimizer + +Preserve the actual A3/C03 objectives and weights: distinct-formula CE and its +existing gap/element auxiliaries; key14-grouped bidirectional MS–molecule +InfoNCE; fine MS–MS and two-view molecule auxiliary losses; one final-score +candidate CE for each o_data/Mass/Formula pool; A3 count and fragment losses +(each 0.05). No duplicate final-score CE is added. H/D/F learn through the final +candidate loss. A3 auxiliaries are already trained, so their weights are not +reset to zero during continuation. + +Existing backbone LR starts from its saved value (4.414828974901978e-6), and +existing A3 heads from their saved value (6.006283182723325e-5). New heads peak +at 1e-4. A common 100-step ramp and 3,000-step cosine decay (floor 0.2) are +predeclared in every arm. No optimizer state reset for old parameters. + +## Evaluation and decision + +At +1,000/+2,000, run the same stable-hash 128-target Validation probe; at +**+3,000 every arm runs complete 19,429-spectrum Validation** and MCES. Fixed +endpoint selection uses harmonic Mass/Formula Top1, each-view regression limit +0.2 percentage points and MCES regression limit 0.1 vs A3, with a required +harmonic improvement over both A3 and R3C. If none passes, record no gain. + +After that decision is frozen, evaluate **all five 6,000 endpoints**, not only +the winner, on complete MSG Test (17,556 spectra, both official views) and the +unchanged 500-sample CASMI blind-Top10 full pool (1,765,420 candidates). Report +Top1/3/5/10/20/50/100/200, formula Top1–10, MCES and valid denominators. CASMI +formula scores rerank frozen SIRIUS Top10; they are not independent open formula +predictions. No 256 cap and no truth injection. Compare to A3, C03, archived +same-pool CSI and condition-qualified FLARE literature. + +Previous Test/CASMI badcases informed design: these are development-exposed +sets, not pristine confirmatory holdouts. All arms use one inherited seed; +sampling confidence intervals do not replace independent training seeds. + +## Operations + +Server: `/root/xj/SpecPartition-MS/code/ceir_r3_20261110`. +Outputs: `/root/xj/SpecPartition-MS/runs/ceir_r3_20261110`. +Large evaluation outputs use the separate existing filesystem under +`/workspace/xj/SpecPartition-MS/runs/ceir_r3_evaluations_20261110`, with explicit +links from the run directory. Training weights remain under `/root/xj`. +Only private preparation/pipeline services are added. At most two new GPU +workers; old services/checkpoints/data are untouched. Disk and GPU guards +preserve recoverable state. Full `last.pt` and final checkpoints include optimizer +and RNG; intermediate probe snapshots are explicitly inference-only. +At completion, `last.pt` is a hard-link alias of the full endpoint checkpoint, +not a second physical copy. Discarded GPU-probe weights are removed only after +all acceptance reports and the training gate have been written. +The matched control and combined main arm run first in parallel; the three +component ablations follow. After lossless cache compaction and endpoint +hard-linking, the model filesystem retains a 1.5-GiB guard (well above the +measured ~188-MiB per-checkpoint temporary write); the evaluation filesystem +retains a separate 0.7-GiB guard. No old experiment is deleted to meet these. diff --git a/code/snapshot/root/code/ceir_r3_20261110/acceptance_r3.py b/code/snapshot/root/code/ceir_r3_20261110/acceptance_r3.py new file mode 100644 index 0000000000000000000000000000000000000000..f5513976ba0a412f77a816173af453e5ea6ebf64 --- /dev/null +++ b/code/snapshot/root/code/ceir_r3_20261110/acceptance_r3.py @@ -0,0 +1,78 @@ +"""Real mixed-batch acceptance before any formal update is authorized.""" +import gc +from dataclasses import replace +from runtime_r2 import * + + +def run(provisional=False): + import torch + from data_r2 import Dataset + from model_r2_new import make_model_optimizer + from objectives_r2 import train_step + if not provisional and not (PREP/'DATA_ACCEPTANCE.json').exists():raise RuntimeError('Preparation incomplete') + setup_gpu();bind=dict(provisional=True,code=code_manifest()) if provisional else binding() + index=json.loads((PREP/'PROBE_READY.json').read_text())['index'] if provisional else 0 + feature_path=PREP/('probe.sqlite' if provisional else 'assets.sqlite') + dataset=Dataset('R3C',0,3000,feature_path if provisional else None);batch=dataset[index] + while len(batch['rows'])<288:index+=1;batch=dataset[index] + query=next(p['query'] for r in batch['rows'] for p in r['pools'] if p['kind']=='mass') + results=[] + original=OLD.load_module('frozen_A3_reference_r3_acceptance',Path(C['source_r2'])/'model_r2_new.py') + with gpu_work(OUT,'frozen_A3_reference'): + parent=original.R2Ranker(LEGACY.C,'A3').to(LEGACY.C['device']);state=parent_state() + parent.load_state_dict(state['model'],strict=True);parent.install_features(feature_path);parent.eval() + with torch.inference_mode(),amp():expected=parent.encode_batch([query])[0][0].base.float().cpu() + del parent,state;gc.collect();torch.cuda.empty_cache() + for arm in C['arms']: + with gpu_work(run_dir(arm),'real_GPU_acceptance'): + model,opt,progress,_=make_model_optimizer(arm);model.install_features(feature_path);model.eval() + with torch.inference_mode(),amp(): + actual=model.encode_batch([query])[0][0].base.float().cpu() + parity=float((expected-actual).abs().max()) + permutation=list(reversed(range(len(query.candidates)))) + changed=replace(query,candidates=tuple(query.candidates[i] for i in permutation)) + reordered=model.encode_batch([changed])[0][0].base.float().cpu() + invariant=float((reordered-actual[permutation]).abs().max()) + if max(parity,invariant)>3e-4:raise RuntimeError('Initial/permutation score mismatch') + restore_rng(parent_state());model.train();metrics=[] + for i in range(2): + metrics.append(train_step(model,opt,batch,C['source_update']+i)) + if not all(m['backbone_gradient_norm']>0 and m['fragment_gradient_norm']>0 for m in metrics):raise RuntimeError('Missing A3 gradient') + if arm!='R3C' and metrics[-1]['r3_gradient_norm']<=0:raise RuntimeError('New branch has no gradient') + gradients={} + for prefix in ('mass','topology','difference','formula_alpha'): + values=[p.grad.detach().float().square().sum() for n,p in model.r3.named_parameters() if n.startswith(prefix) and p.grad is not None] + gradients[prefix]=float(torch.stack(values).sum().sqrt()) if values else 0. + for prefix in ({'R3H':['mass','topology'],'R3D':['difference'],'R3F':['formula_alpha'],'R3M':['mass','topology','difference','formula_alpha']}.get(arm,[])): + if gradients[prefix]<=0:raise RuntimeError('Inactive new branch '+prefix) + path=OUT/'acceptance_resume.pt';p=dict(progress,update=3002,new_updates=2) + checkpoint(path,model,opt,p,bind) + before=train_step(model,opt,batch,3002,False)['loss'] + del model,opt;gc.collect();torch.cuda.empty_cache() + model,opt,loaded,_=make_model_optimizer(arm,path);model.install_features(feature_path) + after=train_step(model,opt,batch,loaded['update'],False)['loss'] + if abs(before-after)>3e-4:raise RuntimeError('Full-state resume mismatch') + report=dict(complete=True,arm=arm,binding=bind,initial_A3_score_max_error=parity, + permutation_error=invariant,resume_loss_difference=abs(before-after),metrics=metrics,new_head_gradients=gradients, + parameters=sum(p.numel() for p in model.parameters()),formal_updates=0,ledger_sha256=batch['ledger_sha256']) + save(run_dir(arm)/('PROVISIONAL_GPU.json' if provisional else 'GPU_ACCEPTANCE.json'),report);results.append(report) + print(json.dumps(dict(arm=arm,parity=parity,resume=abs(before-after),seconds=metrics[-1]['step_compute_seconds'],gradients=gradients)),flush=True) + del model,opt;gc.collect();torch.cuda.empty_cache() + if provisional:return + from validate_r2 import evaluate + for arm in C['arms']: + with gpu_work(run_dir(arm),'Validation_entrypoint'): + model,opt,_,_=make_model_optimizer(arm);del opt + evaluate(model,arm,3000,1) + del model;gc.collect();torch.cuda.empty_cache() + save(OUT/'TRAIN_READY.json',dict(complete=True,binding=bind,all_five_arms_accepted=True,formal_updates=0,unix_time=time.time())) + # These were discarded probe updates, not experimental training weights. + temporary_probe=OUT/'acceptance_resume.pt' + if temporary_probe.exists():temporary_probe.unlink() + + +if __name__=='__main__': + try:run() + except Exception: + import traceback + save(OUT/'GPU_FAILURE.json',dict(traceback=traceback.format_exc(),unix_time=time.time()));raise diff --git a/code/snapshot/root/code/ceir_r3_20261110/analyze_r3.py b/code/snapshot/root/code/ceir_r3_20261110/analyze_r3.py new file mode 100644 index 0000000000000000000000000000000000000000..dd579d204830e0ab265c776428c746c714720009 --- /dev/null +++ b/code/snapshot/root/code/ceir_r3_20261110/analyze_r3.py @@ -0,0 +1,56 @@ +"""Validate denominators, preserve negative results, freeze recommendation.""" +import gzip +from runtime_r2 import * + + +def aggregate(path): + path=Path(path);metrics=json.loads((path/'metrics.json').read_text()) + with gzip.open(path/'per_spectrum_summary.json.gz','rt') as f:rows=json.load(f) + for v in ('mass','formula'): + rr=[r for r in rows if r['view']==v] + if len(rr)!=19429 or len({r['identifier'] for r in rr})!=19429:raise RuntimeError('Validation population changed') + for field,kind,ks in [('rank','structure',(1,3,5,10,20,50,100,200)),('formula_rank','formula',(*range(1,11),20,50,100,200))]: + for k in ks: + value=sum(r[field] is not None and r[field]<=k for r in rr)/len(rr) + if abs(value-metrics[v][kind][str(k)]['micro'])>1e-12:raise RuntimeError('Aggregation mismatch') + return dict(metrics=metrics,MCES=json.loads((path/'MCES.json').read_text())) + + +def select(): + parent=aggregate(Path(C['r2_output'])/'A3/validation_003000');arms={a:aggregate(run_dir(a)/'validation_006000') for a in C['arms']} + def top(x,v):return x['metrics'][v]['structure']['1']['micro'] + def h(x): + m,f=top(x,'mass'),top(x,'formula');return 2*m*f/max(1e-12,m+f) + decisions={};tol=C['validation_degradation_tolerance_pp']/100 + for a,value in arms.items(): + structural=all(top(value,v)>=top(parent,v)-tol for v in ('mass','formula')) + mc=all(value['MCES']['views'][v]['valid']==parent['MCES']['views'][v]['valid'] and value['MCES']['views'][v]['valid_mean']<=parent['MCES']['views'][v]['valid_mean']+.1 for v in ('mass','formula')) + decisions[a]=dict(passes=structural and mc and h(value)>max(h(parent),h(arms['R3C'])),each_view_guard=structural,MCES_guard=mc, + harmonic_gain_vs_A3_pp=100*(h(value)-h(parent)),harmonic_gain_vs_control_pp=100*(h(value)-h(arms['R3C']))) + passed=[a for a in C['arms'] if a!='R3C' and decisions[a]['passes']] + recommended=max(passed,key=lambda a:h(arms[a])) if passed else None + save(OUT/'SELECTION.json',dict(complete=True,parent=parent,arms=arms,decisions=decisions,recommended_arm=recommended, + measured_Validation_improvement=bool(recommended),test_used_for_selection=False,all_arms_new_updates=3000,unix_time=time.time())) + + +def final(): + result=dict(complete=True,selection=json.loads((OUT/'SELECTION.json').read_text()),arms={},parent_results=str(Path(C['r2_output'])/'ALL_RESULTS.json')) + for arm in C['arms']: + result['arms'][arm]={} + for dataset in ('msg_test','casmi2022'): + directory=OUT/'test/inference'/(arm+'_006000')/dataset + if not (directory/'COMPLETE.json').exists():raise RuntimeError('Inference incomplete') + metric=json.loads((directory/'metrics.json').read_text());mces=json.loads((directory/'MCES.json').read_text()) + with gzip.open(directory/'per_spectrum_summary.json.gz','rt') as f:rr=json.load(f) + n=17556 if dataset=='msg_test' else 500 + for v in {r['view'] for r in rr}: + rows=[r for r in rr if r['view']==v] + if len(rows)!=n or len({r['identifier'] for r in rows})!=n:raise RuntimeError('Test denominator mismatch') + if dataset=='casmi2022' and sum(r['candidate_count'] for r in rr)!=1765420:raise RuntimeError('Frozen full CASMI pool changed') + result['arms'][arm][dataset]=dict(metrics=metric,MCES=mces) + save(OUT/'ALL_RESULTS.json',result) + + +if __name__=='__main__': + import argparse + p=argparse.ArgumentParser();p.add_argument('--test',action='store_true');a=p.parse_args();final() if a.test else select()