From 0e73ae150406f8df0f3374c3173c53fb2b9a4d6f Mon Sep 17 00:00:00 2001 From: NewMeltAssist Date: Thu, 19 Nov 2026 14:56:25 +0800 Subject: [PATCH] Freeze the final GPU2 GINO measurement binding for narrow review --- .../contract.json | 772 ++++++++++++++++++ .../gpu2-binding-audit.json | 36 + ...rack-b-gino-gpu2-measurement-2026-11-19.md | 7 + tools/track_b_gino_measurement_gpu2.py | 55 ++ tools/track_b_gino_measurement_gpu2_worker.py | 21 + 5 files changed, 891 insertions(+) create mode 100644 artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/contract.json create mode 100644 artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/gpu2-binding-audit.json create mode 100644 docs/track-b-gino-gpu2-measurement-2026-11-19.md create mode 100644 tools/track_b_gino_measurement_gpu2.py create mode 100644 tools/track_b_gino_measurement_gpu2_worker.py diff --git a/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/contract.json b/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/contract.json new file mode 100644 index 000000000..a9bb32018 --- /dev/null +++ b/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/contract.json @@ -0,0 +1,772 @@ +{ + "mode": "measurement", + "ruling": "h-f84547d7", + "retry": false, + "evaluate_other_models": false, + "measurement_allowed_heldout_labels": false, + "gpu_uuid": "GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76", + "limits": { + "gpu_wall_seconds": 3600, + "cleanup_seconds": 60, + "idle_wait_seconds": 60, + "cpu_seconds": 3500, + "rss_bytes": 12884901888, + "recorded_vram_bytes": 15032385536, + "device_vram_bytes": 16106127360, + "disk_bytes": 2147483648, + "torch_threads": 1, + "max_processes": 1 + }, + "protocol": { + "model": "NeurIPS 2023 supplement SDFFNOGNO decoder", + "seeds": [ + 0, + 1, + 2 + ], + "grid": [ + 64, + 64, + 64 + ], + "modes": [ + 24, + 24, + 24 + ], + "hidden_channels": 32, + "radius": 0.05, + "epochs_per_seed": 100, + "batch_size": 1, + "learning_rate": 0.001, + "bounds_expansion": 0.01, + "pressure_epsilon": 1e-06, + "optimizer": "Adam", + "weight_decay": 0.0001, + "lr_step_epochs": 50, + "lr_gamma": 0.5, + "pressure_training_transform": "scalar Gaussian on the 500 learning cases", + "metric": "per-case L2(predicted minus true decoded pressure) / L2(true decoded pressure)", + "report": "equal mean over 111 cases for each seed, then equal mean over the three seeds", + "acceptance_percent": [ + 6.62, + 7.62 + ], + "paper_reference_percent": 7.12, + "checkpoint_epoch": 100, + "heldout_access_after_all_checkpoints_frozen": true + }, + "environment": { + "python": "/home/frank14f/optane/MeltMind/data/track-b-gino-shapenet611-2026-11-19/runtime/bin/python", + "python_version": "3.10", + "torch_cuda": "11.6", + "neuralop_commit": "fbdc7f872792b75b84545c2f374e7a881c72a718", + "neuralop_file_sha256": { + "utils.py": "84554eed45ac415ab52f79e456eab70ba204e7ab7539c2f2841955a9145220b4", + "models/__init__.py": "c67679f1f8f90e1ab4eb4c2aa916aeaedf1b175d795fed03b8d4f7210883ebae", + "models/tfno.py": "d74b5805b69a64bf33e3ff5186709c75bd431a56c9548f06fb9635a859d849e4", + "models/spectral_convolution.py": "ccecf80806d93e8f35713ac6ab2c3b61c11739f5fcb8c0ba7397b7d4eb5a5d45" + }, + "package_versions": { + "torch": "1.13.1+cu116", + "open3d": "0.17.0", + "numpy": "1.24.3", + "torch-scatter": "2.1.1+pt113cu116", + "torch-sparse": "0.6.17+pt113cu116", + "torch-geometric": "2.3.1", + "tensorly": "0.8.1", + "tensorly-torch": "0.4.0" + } + }, + "comparison_contract": "/home/frank14f/optane/MeltMind/artifacts/track-b-gino-shapenet611-measurement-2026-11-19/comparison-contract.json", + "comparison_contract_sha256": "503f6c8ab1217d66b44e0d127555cfad5da4cd8a17b336299095c3cfd13041d7", + "code_sha256": { + "/home/frank14f/optane/MeltMind/tools/freeze_g1_components.py": "d0cee60d95243ac2c59ef3f2244ba818315718c4e3d1895f2f9f064f1f7f5ecd", + "/home/frank14f/optane/MeltMind/tools/gre24_models.py": "53b6fee8b700b9b982b06d29908ce2ce23e0c57512c46dbf74b2aade79e3ac3a", + "/home/frank14f/optane/MeltMind/tools/phase2_gate_outcome_review.py": "915617aeb8292d03c654e637bc34a014c254fd178a773f135d1806c4b41372a8", + "/home/frank14f/optane/MeltMind/tools/phase2_h1_worker_v2.py": "1543df85b615bb69b79bacd572074a7c77ae19dab110197601573a7e5805ed20", + "/home/frank14f/optane/MeltMind/tools/phase2_home_freeze_io.py": "bf09204b85ed2a7038acdd202257f618474d1110a9d6d772f105a3ffb334d3ff", + "/home/frank14f/optane/MeltMind/tools/phase2_local_freeze_io.py": "60adf3382577613c5234f5cf30779336b9951b66e90c075cb7cd0adab9cc42dd", + "/home/frank14f/optane/MeltMind/tools/phase2_residual_math.py": "ffbd9624dec79bdaabf95244fe87209055908f31a977e73ea4377045d6f8fe62", + "/home/frank14f/optane/MeltMind/tools/phase3_item1b_common.py": "4e25effe8326ff8c7c3f751590315040209af054b32b0505dc3c6b001589db32", + "/home/frank14f/optane/MeltMind/tools/phase3_seed1_v2_common.py": "25ca6be14027369393bd3616209b08f30e25892cccca83300483c5a116e8d75d", + "/home/frank14f/optane/MeltMind/tools/phase3_shared_capacity.py": "7c07b0aaf1bc4e6a980d016defcac326c3bd871134d2583bb4dcd88bb34728f8", + "/home/frank14f/optane/MeltMind/tools/prepare_track_b_gino_shapenet.py": "557ad56277d7e85c6b5cc358eb151632d1757f5883f429988d36022d0d407550", + "/home/frank14f/optane/MeltMind/tools/s2_gpu_idle_gate.py": "e2b1613e7e6ea398a8d555220a9365a1ad998ab4ef4b2bf8ec7cc4e31f8b4b9f", + "/home/frank14f/optane/MeltMind/tools/s2_main_memory_guard.py": "e094f5443e11518efe9018215c11718a8e18aa462a977bf43e974b2d0b2aebb1", + "/home/frank14f/optane/MeltMind/tools/s2_pilot_train.py": "e9cceead51a5cc092aad23409ad98909c84a62e7e10571e750d1e9be1ad3b948", + "/home/frank14f/optane/MeltMind/tools/s2_precision_continuation_guard.py": "01235d897c7c03e5ffa109c58b14f5d24d128e8f1ba873e1f76cfb14e02f7a7f", + "/home/frank14f/optane/MeltMind/tools/s2_recovery_gpu_supervisor.py": "689c0f3179e4fcd362e546d90214829a9e4f8739abdbdf74b560763e5a392f15", + "/home/frank14f/optane/MeltMind/tools/s2_recovery_monitoring.py": "442c2a9c75e8c00b30a8f2e91cb52d87c466b19a80aea9128b10c021e61b922e", + "/home/frank14f/optane/MeltMind/tools/track_a_h2_common.py": "79918e7de887d1f0a2de5523156b27d00dc2d85ac930a07efc34d817d904fe65", + "/home/frank14f/optane/MeltMind/tools/track_a_h2_prepare.py": "f657be036dc48fc5936f56c4b8510a4b295d4787af6877cc5ccaad663107be17", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_shapenet_entry.py": "e86d955c36e291e6bbef67947de663b24c8d66c5d72d9d28e4193fb8a3051ee2", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_shapenet_worker.py": "7211be211c29472fd9be35a6bcb1f56025de4a63f36852bfafa10df97c003ff3", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_import_checked_entry.py": "199d833f40339feb0433611ba27302416a280452f8918715e6ef95cb93c38721", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_import_checked_worker.py": "3acf742dd4549e9f5491e10af5bb0b4acf00e2f47e91753100b5998cfcc61852", + "/home/frank14f/optane/MeltMind/tools/prepare_track_b_gino_import_checked.py": "fef485dd0c233c76a336239d5f29cbf44ac0fb62a6a297dff34293b23a1b75fe", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_paper_keyword_patch.py": "c61e2ed7d099eb125386857bf4d7ccdbfc3af522f80edb4f01b450cee91c0b95", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_measurement_gpu2.py": "7d3ab2412e5208892cffcfc0e1ec363eb5db2be3e10bf60595356f71e82d8552", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_measurement_gpu2_worker.py": "ba1fd5ec837e884b000ba640fceafe30ea40ccf708847733df6a17a8f3599680" + }, + "paper_data": { + "path": "/home/frank14f/optane/MeltMind/data/track-b-gino-shapenet611-2026-11-19/paper-car-pressure-data.zip", + "sha256": "b5f9e2b407d54e034596384253fb58196933c46f6b5b586383508da54475f89d" + }, + "paper_supplement": { + "path": "/home/frank14f/optane/MeltMind/data/track-b-gino-shapenet611-2026-11-19/paper-neurips-supplement.zip", + "sha256": "48cdae80ac2781e27ac00e10a37124711d6bb305593559002bda0527d11a533d" + }, + "paper_code_zip_sha256": "347a6f097e2b9958d1ab87930fa1d6227b793a9d213e12418ce9a157e83dce04", + "split_receipt": { + "path": "/home/frank14f/optane/MeltMind/artifacts/track-b-gino-shapenet611-2026-11-19/paper-split.json", + "sha256": "5a96c25c2ec24cfc1e2264d4ebd0879c658c0f168e22711b576bf303151b8601" + }, + "mapping_audit": { + "path": "/home/frank14f/optane/MeltMind/artifacts/track-b-gino-shapenet611-2026-11-19/paper-mapping-audit.json", + "sha256": "055d008a02494acd29df36c41c8e68db931a027f5635e8f5f765a96a54c62289" + }, + "split": { + "train": [ + 1, + 2, + 4, + 5, + 6, + 7, + 8, + 10, + 12, + 13, + 17, + 18, + 21, + 22, + 23, + 25, + 26, + 27, + 28, + 29, + 30, + 31, + 32, + 34, + 35, + 39, + 40, + 43, + 44, + 45, + 46, + 47, + 48, + 49, + 50, + 51, + 52, + 54, + 55, + 56, + 58, + 59, + 60, + 61, + 62, + 63, + 64, + 65, + 67, + 69, + 70, + 71, + 72, + 73, + 74, + 75, + 76, + 77, + 78, + 79, + 80, + 81, + 83, + 84, + 85, + 86, + 87, + 88, + 90, + 91, + 92, + 94, + 95, + 96, + 97, + 100, + 101, + 102, + 105, + 106, + 107, + 109, + 110, + 111, + 112, + 113, + 114, + 115, + 116, + 117, + 118, + 119, + 120, + 121, + 123, + 124, + 125, + 126, + 127, + 128, + 129, + 130, + 131, + 133, + 134, + 136, + 137, + 138, + 139, + 140, + 141, + 142, + 143, + 144, + 145, + 146, + 147, + 148, + 149, + 150, + 151, + 152, + 153, + 155, + 156, + 157, + 158, + 159, + 160, + 161, + 162, + 163, + 165, + 166, + 170, + 172, + 173, + 175, + 176, + 177, + 178, + 179, + 180, + 181, + 182, + 183, + 184, + 186, + 190, + 191, + 192, + 193, + 195, + 196, + 198, + 199, + 200, + 201, + 202, + 203, + 205, + 207, + 210, + 211, + 212, + 213, + 214, + 215, + 217, + 219, + 220, + 221, + 222, + 223, + 224, + 225, + 227, + 228, + 229, + 230, + 231, + 232, + 233, + 234, + 235, + 236, + 237, + 241, + 243, + 244, + 245, + 246, + 247, + 248, + 249, + 251, + 252, + 253, + 255, + 257, + 258, + 259, + 260, + 261, + 262, + 263, + 264, + 266, + 267, + 268, + 269, + 271, + 272, + 273, + 274, + 275, + 276, + 277, + 278, + 279, + 280, + 281, + 282, + 283, + 285, + 286, + 289, + 290, + 291, + 292, + 293, + 294, + 295, + 296, + 297, + 298, + 299, + 300, + 301, + 302, + 304, + 305, + 306, + 308, + 309, + 310, + 311, + 312, + 313, + 314, + 315, + 319, + 320, + 321, + 322, + 323, + 324, + 325, + 327, + 328, + 329, + 331, + 332, + 333, + 334, + 335, + 337, + 338, + 339, + 340, + 341, + 344, + 345, + 347, + 348, + 349, + 350, + 352, + 353, + 354, + 355, + 356, + 357, + 358, + 360, + 362, + 364, + 365, + 366, + 367, + 369, + 371, + 372, + 373, + 374, + 375, + 376, + 378, + 379, + 380, + 381, + 384, + 385, + 389, + 392, + 393, + 397, + 398, + 399, + 401, + 402, + 403, + 404, + 405, + 407, + 408, + 410, + 412, + 413, + 414, + 415, + 417, + 418, + 419, + 420, + 422, + 424, + 425, + 427, + 430, + 431, + 433, + 435, + 436, + 437, + 439, + 440, + 443, + 444, + 446, + 447, + 448, + 449, + 450, + 451, + 452, + 453, + 454, + 455, + 456, + 457, + 459, + 460, + 462, + 463, + 464, + 465, + 466, + 467, + 468, + 469, + 470, + 472, + 473, + 474, + 475, + 476, + 478, + 479, + 480, + 482, + 483, + 486, + 487, + 488, + 490, + 493, + 494, + 495, + 496, + 497, + 498, + 499, + 501, + 502, + 503, + 504, + 505, + 507, + 508, + 509, + 511, + 512, + 513, + 514, + 515, + 516, + 518, + 519, + 521, + 522, + 523, + 524, + 525, + 527, + 529, + 530, + 532, + 533, + 536, + 538, + 539, + 540, + 542, + 543, + 545, + 547, + 548, + 549, + 550, + 551, + 552, + 553, + 554, + 555, + 560, + 561, + 562, + 564, + 565, + 566, + 567, + 568, + 569, + 572, + 573, + 574, + 576, + 577, + 579, + 581, + 582, + 583, + 584, + 587, + 588, + 589, + 591, + 593, + 594, + 595, + 596, + 597, + 598, + 600, + 602, + 604, + 608, + 610, + 611, + 612, + 613, + 615, + 616, + 617, + 618, + 620, + 621, + 622, + 623, + 625, + 626, + 627, + 628, + 629, + 630, + 631, + 632, + 633, + 634, + 635, + 636, + 638, + 639, + 640, + 641, + 642, + 643, + 644, + 645, + 646, + 647, + 648, + 649, + 651, + 652, + 654, + 655, + 656, + 657 + ], + "test": [ + 658, + 659, + 660, + 662, + 663, + 664, + 665, + 666, + 667, + 668, + 672, + 673, + 674, + 675, + 676, + 677, + 678, + 679, + 681, + 683, + 684, + 686, + 687, + 688, + 689, + 690, + 691, + 692, + 693, + 695, + 696, + 697, + 700, + 701, + 702, + 703, + 704, + 705, + 708, + 709, + 710, + 711, + 712, + 713, + 715, + 717, + 718, + 719, + 721, + 722, + 723, + 724, + 725, + 726, + 727, + 729, + 730, + 731, + 733, + 734, + 735, + 736, + 737, + 738, + 739, + 740, + 741, + 743, + 744, + 745, + 746, + 747, + 748, + 749, + 750, + 751, + 752, + 753, + 757, + 758, + 760, + 762, + 763, + 764, + 765, + 766, + 767, + 768, + 769, + 770, + 771, + 772, + 773, + 775, + 776, + 777, + 778, + 779, + 781, + 782, + 783, + 784, + 785, + 787, + 789, + 790, + 791, + 792, + 793, + 795, + 797 + ], + "raw_global_bounds": [ + [ + -0.90252799, + 0.0066688, + -2.85272002 + ], + [ + 0.90253001, + 1.95825005, + 2.86385012 + ] + ] + }, + "environment_ruling": "h-0d21f3bd", + "environment_acceptance": { + "path": "/home/frank14f/optane/MeltMind/artifacts/track-b-gino-shapenet611-import-checked-2026-11-19/cpu-environment-acceptance.json", + "sha256": "093e646890929af6f520eb5eecf8c751025c0a24b8b5689094b1a0ae4da08dc3" + }, + "paper_compatibility": { + "handoff": "h-b8508140", + "identity": "supplement code + 2-keyword patch", + "patch_path": "/home/frank14f/optane/MeltMind/artifacts/track-b-paper-keyword-compatibility-2026-11-19/two-keyword-patch.json", + "patch_sha256": "7307ba49f83bfc46c5decf803a993a41ed602d987de65714958e738d2f52f077", + "search_path": "/home/frank14f/optane/MeltMind/artifacts/track-b-paper-keyword-compatibility-2026-11-19/keyword-search.json", + "search_sha256": "77a897bf534a9a0e9e6a7c072b4f914168648eadc2af3493b70d63d0b715b3d0" + }, + "gpu_ruling": "h-bc42181f" +} diff --git a/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/gpu2-binding-audit.json b/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/gpu2-binding-audit.json new file mode 100644 index 000000000..3c0e1bcac --- /dev/null +++ b/artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/gpu2-binding-audit.json @@ -0,0 +1,36 @@ +{ + "status": "PASS", + "authorizing_handoff": "h-bc42181f", + "claude_slack": "1795071144.090089", + "selected_gpu_index": 2, + "selected_gpu_uuid": "GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76", + "physical_snapshot": "0, GPU-e8853ae7-a302-6a17-bcfa-aa767e9ed20c, Tesla V100-SXM2-16GB, 829 MiB, 66 %\n1, GPU-f1c9fd5a-e917-56e0-21fb-24035ba44a36, Tesla V100-SXM2-16GB, 1717 MiB, 0 %\n2, GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76, Tesla V100-SXM2-16GB, 5 MiB, 0 %\n3, GPU-8b71b032-1b75-2891-935c-ce106a53034a, Tesla V100-SXM2-16GB, 5 MiB, 0 %\nGPU-e8853ae7-a302-6a17-bcfa-aa767e9ed20c, 2512405, 820 MiB\nGPU-f1c9fd5a-e917-56e0-21fb-24035ba44a36, 2517067, 1708 MiB", + "initial_gpu2_idle": true, + "one_gpu_only": true, + "original_contract_sha256": "ab97357150578ea649140a5be01ed5639edcd998874d3788dc9bf8a42acac28e", + "new_contract_sha256": "e4545bb5e9eea0a5a501cbfd538ee67468224da36ea151951c7affc5bfc4719f", + "cpu_receipt_sha256": "093e646890929af6f520eb5eecf8c751025c0a24b8b5689094b1a0ae4da08dc3", + "same_test_split": true, + "no_old_start": true, + "fields_changed": [ + "gpu_uuid", + "gpu_ruling", + "code_sha256" + ], + "mock_guard_route": [ + { + "command": [ + "/home/frank14f/optane/MeltMind/data/track-b-gino-shapenet611-2026-11-19/runtime/bin/python", + "/home/frank14f/optane/MeltMind/tools/track_b_gino_measurement_gpu2_worker.py", + "/tmp/track-b-gpu2-route-bxwoo9h0" + ], + "mode": "gino", + "gpu_uuid": "GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76", + "poll": 0.2 + } + ], + "first_synthetic_assertion_correction": "The terminal field is trigger, not reason; no source or contract changes.", + "forced_old_card_rejected": true, + "no_real_gpu_calls_in_mock": true, + "gpu_workers_started": 0 +} diff --git a/docs/track-b-gino-gpu2-measurement-2026-11-19.md b/docs/track-b-gino-gpu2-measurement-2026-11-19.md new file mode 100644 index 000000000..61bf864a4 --- /dev/null +++ b/docs/track-b-gino-gpu2-measurement-2026-11-19.md @@ -0,0 +1,7 @@ +# Track B|单轮测量的 GPU2 最终绑定 + +Claude h-bc42181f 将待审的一次测量换到 GPU2。Horsea 实核物理 UUID `GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76`,同规格 V100-SXM2-16GB,当时 5 MiB、0%、无计算进程。GPU1 继续运行 1b。新入口沿用已通过的原加载器、CPU 前向、指标及 “supplement code + 2-keyword patch”,复用同一隔离解释器路径、SHA、环境回执和补丁。 [Claude 裁决](https://arcticnimbus.slack.com/archives/C0C78UFKGRM/p1795071144090089) · [CPU 验收](track-b-gino-isolated-cpu-acceptance-2026-11-19.md) + +原合同中科学配置、同一 500/111 清单和 3,600 GPU-s 帽逐项相同。只增加物理卡裁决和新根的路线绑定,沿用原实际守卫、唯一尝试和锁。定向 CPU 回放验证守卫只向 GPU2/固定隔离解释器派出正确命令,旧 GPU1 pin 被拒绝。验收和补丁身份在写开始回执之前仍要核验。当前无真实测量启动,团队窄审采用本件。 + +精确独立 PASS、阶段批准和实时空卡同时满足时,按原合同运行 seed 0 一轮完整学习和 111 个学习样本的推理代理。模型全量三种子复现另行评审,成本按本次测量推导,111 个留出压力目标仍封存。 [GPU2 新合同](../artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/contract.json) · [物理卡与回放证据](../artifacts/track-b-gino-shapenet611-gpu2-measurement-2026-11-19/gpu2-binding-audit.json) diff --git a/tools/track_b_gino_measurement_gpu2.py b/tools/track_b_gino_measurement_gpu2.py new file mode 100644 index 000000000..256f27a2f --- /dev/null +++ b/tools/track_b_gino_measurement_gpu2.py @@ -0,0 +1,55 @@ +"""Keep the accepted GINO measurement and bind it to the approved idle V100.""" + +import argparse +from copy import deepcopy +from pathlib import Path +from types import FunctionType + +import track_b_gino_import_checked_entry as checked_entry +from track_b_gino_shapenet_entry import checked, read, sha + + +ROOT = checked_entry.ROOT.with_name("track-b-gino-shapenet611-gpu2-measurement-2026-11-19") +ENTRY = Path(__file__).resolve() +WORKER = ENTRY.with_name("track_b_gino_measurement_gpu2_worker.py") +UUID = "GPU-b8c11c01-c91f-aa0b-abf6-dad35085cc76" +PRIOR_CONTRACT = "ab97357150578ea649140a5be01ed5639edcd998874d3788dc9bf8a42acac28e" + + +def expected_contract(): + c = deepcopy(read(checked(checked_entry.ROOT / "contract.json", PRIOR_CONTRACT))) + c["gpu_uuid"] = UUID + c["gpu_ruling"] = "h-bc42181f" + c["code_sha256"].update({str(p): sha(p) for p in (ENTRY, WORKER)}) + return c + + +def contract(path): + c = checked_entry.contract(path) + if c != expected_contract(): + raise PermissionError("Only the accepted measurement retargeted to GPU2 is authorized") + return c + + +def dispatch_guard(root, path): + namespace = dict(checked_entry.dispatch_guard.__globals__, contract=contract, WORKER=WORKER) + return FunctionType(checked_entry.dispatch_guard.__code__, namespace, "dispatch_guard")(root, path) + + +def authorized_child(root): + namespace = dict(checked_entry.authorized_child.__globals__, ROOT=ROOT, contract=contract) + return FunctionType(checked_entry.authorized_child.__code__, namespace, "authorized_child")(root) + + +def run(root): + if (checked_entry.ROOT / "started.json").exists(): + raise FileExistsError("Previous accepted entry already has a start record") + namespace = dict(checked_entry.run.__globals__, ROOT=ROOT, contract=contract, + dispatch_guard=dispatch_guard) + return FunctionType(checked_entry.run.__code__, namespace, "run")(root) + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("root", type=Path) + raise SystemExit(run(parser.parse_args().root)) diff --git a/tools/track_b_gino_measurement_gpu2_worker.py b/tools/track_b_gino_measurement_gpu2_worker.py new file mode 100644 index 000000000..0f4a8394c --- /dev/null +++ b/tools/track_b_gino_measurement_gpu2_worker.py @@ -0,0 +1,21 @@ +"""Invoke the same reviewed paper measurement at its new physical card binding.""" + +import argparse +from pathlib import Path +import sys +from types import FunctionType + +from track_b_gino_measurement_gpu2 import authorized_child +from track_b_gino_paper_keyword_patch import extract_patched_paper_code +from track_b_gino_shapenet_worker import work + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument("root", type=Path) + root = parser.parse_args().root.resolve() + c = authorized_child(root) + if str(Path(sys.executable).absolute()) != c["environment"]["python"]: + raise PermissionError("The worker did not start with the accepted interpreter") + namespace = dict(work.__globals__, extract_paper_code=extract_patched_paper_code) + FunctionType(work.__code__, namespace, work.__name__)(root, c)