diff --git a/plots/scalar-task-progression.svg b/plots/scalar-task-progression.svg index a5a59f9009ab8e7d6b1fd440cc54a0db63c06e5b..f8827a672f03dd6b724a8eddb2a695a18eabae9a 100644 --- a/plots/scalar-task-progression.svg +++ b/plots/scalar-task-progression.svg @@ -1,12 +1,12 @@ - + - 2026-10-26T20:50:12.203640 + 2026-10-30T17:09:55.592024 image/svg+xml @@ -21,8 +21,8 @@ - +" clip-path="url(#p0880b192af)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #348253; stroke-width: 1.5"/> @@ -88,7 +88,7 @@ L 362.687351 283.710406 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -99,7 +99,7 @@ L 362.687351 301.074049 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -110,7 +110,7 @@ L 362.687351 276.764949 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -121,7 +121,7 @@ L 362.687351 252.45585 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -132,7 +132,7 @@ L 362.687351 228.14675 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -143,7 +143,7 @@ L 362.687351 203.83765 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -157,75 +157,75 @@ L 362.687351 179.528551 +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p0880b192af)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 7/7 distinct · 7 snapshots (7 measured, 0 reused) + 7/7 research candidates · 7 snapshots (7 measured, 0 reused) Final +2m 44s · same as S007 @@ -246,7 +246,7 @@ z - - - - - - - - - + + + + + + + + - - - + + @@ -294,7 +294,7 @@ z +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #348253; stroke-width: 1.5"/> @@ -342,7 +342,7 @@ L 749.963676 284.131343 +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -353,7 +353,7 @@ L 749.963676 277.674487 +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -364,7 +364,7 @@ L 749.963676 243.176134 +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -375,7 +375,7 @@ L 749.963676 208.677781 +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -389,135 +389,135 @@ L 749.963676 174.179429 +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p7f697ab90c)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 13/13 distinct · 13 snapshots (13 measured, 0 reused) + 13/13 research candidates · 13 snapshots (13 measured, 0 reused) Final +3m 10s · same as S013 @@ -537,25 +537,25 @@ z Disease progression - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - + + @@ -614,7 +614,7 @@ z +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -625,7 +625,7 @@ L 1137.24 284.653893 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -636,7 +636,7 @@ L 1137.24 261.667632 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -647,7 +647,7 @@ L 1137.24 238.681372 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -658,7 +658,7 @@ L 1137.24 215.695112 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -669,7 +669,7 @@ L 1137.24 192.708851 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -683,115 +683,115 @@ L 1137.24 169.722591 +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pa64a250b10)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 11/11 distinct · 11 snapshots (11 measured, 0 reused) + 11/11 research candidates · 11 snapshots (11 measured, 0 reused) Final +1m 07s · same as S011 @@ -811,23 +811,23 @@ z Earth observation - - - - - - - - - - - - + + + + + + + + + + + + - - + + @@ -844,37 +844,37 @@ z - 1m + 1m - 15m + 15m - 1h + 1h - 4h + 4h - 12h + 12h - 48h + 48h @@ -886,7 +886,7 @@ z +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -897,7 +897,7 @@ L 362.687351 562.888291 +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -908,7 +908,7 @@ L 362.687351 531.427447 +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -919,7 +919,7 @@ L 362.687351 499.966603 +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -930,7 +930,7 @@ L 362.687351 468.505759 +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -944,235 +944,235 @@ L 362.687351 437.044916 +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pad83567c86)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 3/3 distinct · 23 snapshots (4 measured, 19 reused) + 3/3 research candidates · 23 snapshots (4 measured, 19 reused) Final +2m 01s · same as S023 @@ -1192,16 +1192,16 @@ z Atomistic materials - - - - - + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + @@ -1253,43 +1253,43 @@ z +" clip-path="url(#pe188c61bce)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #348253; stroke-width: 1.5"/> - 1m + 1m - 15m + 15m - 1h + 1h - 4h + 4h - 12h + 12h - 48h + 48h @@ -1301,7 +1301,7 @@ L 749.963676 496.169603 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1312,7 +1312,7 @@ L 749.963676 550.531343 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1323,7 +1323,7 @@ L 749.963676 524.182349 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1334,7 +1334,7 @@ L 749.963676 497.833354 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1345,7 +1345,7 @@ L 749.963676 471.48436 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1359,185 +1359,185 @@ L 749.963676 445.135365 +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pe188c61bce)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 17/17 distinct · 18 snapshots (18 measured, 0 reused) + 17/17 research candidates · 18 snapshots (18 measured, 0 reused) Final +4m 09s · same as S018 @@ -1557,30 +1557,30 @@ z Single-cell perturbation - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - + + @@ -1596,43 +1596,43 @@ z +" clip-path="url(#p8202057f66)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #348253; stroke-width: 1.5"/> - 1m + 1m - 15m + 15m - 1h + 1h - 4h + 4h - 12h + 12h - 48h + 48h @@ -1644,7 +1644,7 @@ L 1137.24 487.011933 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1655,7 +1655,7 @@ L 1137.24 552.553303 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1666,7 +1666,7 @@ L 1137.24 531.666952 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1677,7 +1677,7 @@ L 1137.24 510.7806 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1688,7 +1688,7 @@ L 1137.24 489.894249 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1699,7 +1699,7 @@ L 1137.24 469.007898 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1710,7 +1710,7 @@ L 1137.24 448.121547 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -1724,475 +1724,475 @@ L 1137.24 427.235196 +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#p8202057f66)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 45/45 distinct · 47 snapshots (45 measured, 2 reused) + 45/45 research candidates · 47 snapshots (45 measured, 2 reused) Final +1m 15s · same as S047 @@ -2212,63 +2212,63 @@ z Surface-code decoding - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + - - + + @@ -2284,43 +2284,43 @@ z +" clip-path="url(#pf72867acff)" style="fill: none; stroke-dasharray: 5.55,2.4; stroke-dashoffset: 0; stroke: #348253; stroke-width: 1.5"/> - 1m + 1m - 15m + 15m - 1h + 1h - 4h + 4h - 12h + 12h - 48h + 48h @@ -2332,7 +2332,7 @@ L 362.687351 750.143245 +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -2343,7 +2343,7 @@ L 362.687351 818.451134 +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -2354,7 +2354,7 @@ L 362.687351 784.677147 +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -2365,7 +2365,7 @@ L 362.687351 750.90316 +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #dfe3de; stroke-width: 0.6; stroke-linecap: square"/> @@ -2379,855 +2379,855 @@ L 362.687351 717.129173 +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> +" clip-path="url(#pf72867acff)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 21/21 distinct · 85 snapshots (66 measured, 19 reused) + 21/21 research candidates · 85 snapshots (66 measured, 19 reused) Final +2m 34s · same as S085 @@ -3247,101 +3247,101 @@ z Mass spectrometry - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - - + + @@ -3358,37 +3358,37 @@ z - 1m + 1m - 15m + 15m - 1h + 1h - 4h + 4h - 12h + 12h - 48h + 48h @@ -3398,1045 +3398,13603 @@ z - + - 0.0000 + 0.3 - + - 0.0002 + 0.4 - + - 0.0004 + 0.5 - + - 0.0006 + 0.6 - + - 0.0008 + 0.7 - Normalized expected run length (nERL) + Native reward +L 518.55317 828.654545 +" clip-path="url(#pde22b0d1a9)" style="fill: none; stroke: #7396a2; stroke-width: 1.8; stroke-linecap: square"/> - + - + - + - + - + - + - + - + - + - + - + - + - - - - 7/7 distinct · 7 snapshots (7 measured, 0 reused) - - - Final +1m 53s · same as S007 - - - - - - Baseline reports development scores only - - - Fruit-fly reconstruction - - - - - - - - - - - - - - - - - - - - - + - - - - - - - 1m - - - - - - 15m - - - - - - 1h - - - - - - 4h - - - - - - 12h - - - - - - 48h - - - - Research + submission time · log scale - - - - - - - - - - 0.45 - - - - - - - - - 0.50 - - - - - - - - - 0.55 - - - - - - - - - 0.60 - - - - - - - - - 0.65 - - - - - - - - - 0.70 - - - - Mean of 11 task rewards - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 60/60 research candidates · 693 snapshots (72 measured, 621 reused) + + + Final +2m 19s · same as S693 + + + + + + No verified matching test baseline + + + PDE surrogate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.00 + + + + + + + + + 0.02 + + + + + + + + + 0.04 + + + + + + + + + 0.06 + + + + + + + + + 0.08 + + + + + + + + + 0.10 + + + + Native reward + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +" clip-path="url(#pd5f4bc8145)" style="fill: none; stroke-dasharray: 0.8,1.32; stroke-dashoffset: 0; stroke: #627575; stroke-opacity: 0.5; stroke-width: 0.8"/> - 58/58 distinct · 63 snapshots (58 measured, 5 reused) + 18/18 research candidates · 24 snapshots (18 measured, 6 reused) - Final +1m 42s · same as S063 + Final +1m 29s · same as S024 - - Starter · 2-seed mean 0.673 + No verified matching test baseline - Protein sequence - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Protein folding - - - - - - + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + - - Astra xhigh · scalar task scores + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.0 + + + + + + + + + 0.2 + + + + + + + + + 0.4 + + + + + + + + + 0.6 + + + + SUN + MetaSUN fraction + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 20/20 research candidates · 26 snapshots (20 measured, 6 reused) + + + Final +1m 44s · same as S026 + + + + + + No verified matching test baseline + + + Crystal generation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.0 + + + + + + + + + 0.1 + + + + + + + + + 0.2 + + + + + + + + + 0.3 + + + + Native reward + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 53/53 research candidates · 270 snapshots (53 measured, 217 reused) + + + Final +3m 02s · same as S270 + + + + + + No verified matching test baseline + + + Time-series forecasting + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.0000 + + + + + + + + + 0.0002 + + + + + + + + + 0.0004 + + + + + + + + + 0.0006 + + + + + + + + + 0.0008 + + + + Normalized expected run length (nERL) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7/7 research candidates · 7 snapshots (7 measured, 0 reused) + + + Final +1m 53s · same as S007 + + + + + + Baseline reports development scores only + + + Fruit-fly reconstruction + + + + + + + + + + + + + + + + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.0 + + + + + + + + + 0.1 + + + + + + + + + 0.2 + + + + + + + + + 0.3 + + + + + + + + + 0.4 + + + + + + + + + 0.5 + + + + Mean family Pearson correlation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 33/33 research candidates · 43 snapshots (33 measured, 10 reused) + + + Final +2m 18s · same as S041 + + + + + + No verified matching test baseline + + + Genome to function + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.45 + + + + + + + + + 0.50 + + + + + + + + + 0.55 + + + + + + + + + 0.60 + + + + + + + + + 0.65 + + + + + + + + + 0.70 + + + + Mean of 11 task rewards + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 58/58 research candidates · 63 snapshots (58 measured, 5 reused) + + + Final +1m 42s · same as S063 + + + + + + Starter · 2-seed mean 0.673 + + + Protein sequence + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - 1 H100 × 48h research. Purple diamonds sit at 48h + actual submission-window duration; they are outside the research budget. + + + + + + + + + + + + 1m + + + + + + 15m + + + + + + 1h + + + + + + 4h + + + + + + 12h + + + + + + 48h + + + + Research + submission time · log scale + + + + + + + + + + 0.2 + + + + + + + + + 0.4 + + + + + + + + + 0.6 + + + + 1 / (1 + normalized CRPS) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9/9 research candidates · 9 snapshots (9 measured, 0 reused) + + + Final +0m 42s · same as S009 + + + + + + WN2 starter · author's run 0.681 + + + Global weather · paper subset + + + + + + + + + + + + + + + + + + + + + + Astra xhigh · scalar task scores + + + 1 H100 × 48h research. Purple diamonds sit at 48h + actual submission-window duration; they are outside the research budget. - - Every saved snapshot is shown; orange points reuse scores, including metadata-only changes. Already-evaluated duplicates stay blue. + + Every saved snapshot is shown; orange points reuse scores, including metadata-only changes. Already-evaluated duplicates stay blue. - - Repository baselines use different training budgets. + + Repository baselines use different training budgets. - - Axes scale independently; nearby points can overlap. Steps follow submitted packages, including regressions. Beaker execution adaptations apply. + + Axes scale independently; nearby points can overlap. Steps follow submitted packages, including regressions. Beaker execution adaptations apply. - - Lower-edge markers are not scores: gray ticks = awaiting evaluation; red × = evaluated but no numeric result for this metric. + + Lower-edge markers are not scores: gray ticks = awaiting evaluation; red × = evaluated but no numeric result for this metric. - + - - + - - Evaluated snapshot + + Evaluated snapshot - + - - + - - Duplicate snapshot · reused score + + Duplicate snapshot · reused score - + - - + - - Reviewed +5m final · reused score + + Reviewed +5m final - - + - - Repository test baseline + + Repository test baseline - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + + + diff --git a/reviews/fairness-20261031/per-task/atomistic-materials.json b/reviews/fairness-20261031/per-task/atomistic-materials.json new file mode 100644 index 0000000000000000000000000000000000000000..6a54eeb115b1e25cf59f0bbafc91567ab6309ffa --- /dev/null +++ b/reviews/fairness-20261031/per-task/atomistic-materials.json @@ -0,0 +1,168 @@ +{ + "task": "atomistic-materials", + "run_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/atomistic-materials-astra-xhigh-1h100-48h-20261020b", + "containers": 6, + "turns": 10, + "charged_seconds": 172800, + "research_state_error": null, + "timeline_note": "Known context said 1 recovery; the run actually had 6 containers (attempts/001-005 + root preflight) and 10 Codex invocations (10 thread.started in trajectory.jsonl; item ids restart at item_0 in each, so evidence below is cited as T item_ / trajectory line L). Wall clock from agent/sessions rollout: T1 03:51:56Z Oct 21 -> killed 13:28:41Z (Beaker: node cordoned, Xid 48); T2 13:31:21Z -> operator pause 06:10:46Z Oct 22 (94,586 s charged); T3 06:16:05Z -> capacity turn.failed 08:35:31Z; T4/T5 08:36/08:37Z instant capacity failures; T6 08:40:10Z -> capacity turn.failed 11:06:12Z; T7 11:10:12Z -> container died ~18:24-18:28Z (last activity 18:23:38Z); T8 18:28:27Z -> died ~21:26-21:29Z; T9 21:29:17Z -> died ~00:01Z Oct 23; T10 00:01:48Z -> deadline 04:07:58Z. Not affected by the Oct 23 ENOSPC (that hit sibling runs at 11:19Z Oct 23, 7 h after this run finished; no 'No space left'/ENOSPC in any command output), although shared Weka free space fell from 16.0 TB (attempt 1) to 2.8 TB (attempt 6) during the run.", + "incidents": [ + { + "kind": "4 (infrastructure interruption: GPU node hardware failure)", + "ownership": "infrastructure", + "when_charged_seconds": 34600, + "evidence": [ + "operator-pause.json jobs[0]: exited 2026-10-21T13:28:50Z exitCode 143, canceledFor 'node ... is cordoned: Node unhealthy due to unrecoverable Xid error code 48'", + "attempts/002/preflight-result.json (new container preflight 13:31Z)", + "T1 item_1932 (L3565, conductivity in CPU transport solve), T1 item_1947 (L3592) last message; T2 item_11 (L3615) 'The environment restarted ... interrupting validation'; T2 item_18 (L3628) 'The conductivity run ended without a prediction, so I'll retain its failure penalty'", + "rollout: last T1 record 13:28:34Z, T2 prompt 13:31:21Z" + ], + "what_happened": "The first node suffered a GPU Xid 48 (double-bit ECC) error; Beaker cordoned it and killed the job. Beaker auto-resumed on a new node ~2.5 min later (uncharged gap). The agent received a bare 'Continue the research' prompt with no notice that the container had restarted.", + "agent_response": "Discovered the restart via ps within ~4 min, preserved finished results, resumed the eight-suite review (NEB running by 13:37Z), treated the lost kappa case as a failure penalty for that candidate rather than recomputing it; candidate was rejected on MOF anyway.", + "estimated_charged_time_lost_seconds": 600, + "work_lost": "In-flight kappa transport solve for candidate carbon-contrast-step65000 (scored as failure, not rerun); background validation workers resumed from saved cases.", + "affects_published_results": false, + "notes": "Published package unchanged (45k model at the time). No recovery notice existed yet for Beaker auto-resumes." + }, + { + "kind": "4 (operator pause: API key replacement)", + "ownership": "operator", + "when_charged_seconds": 94586, + "evidence": [ + "operator-pause-request.json, operator-pause.json (charged_elapsed 94586.1, remaining 78213.9, latest submission a26e1009...), recoveries/20261022T061328.596685Z/recovery.json, recovery-notice.txt", + "T2 item_4658 (L12173) training at 143k; T3 item_10 (L12203) 'last complete optimizer checkpoint is at 140k; updates through 143,514 were logged but not checkpointed'; T3 item_15 (L12211), item_26 (L12229) workers live again; LEDGER.md line 89 'schedule 3,514 updates/659.489s'", + "rollout: T3 prompt 06:16:05Z (notice delivered, 78214 s correct at that time)" + ], + "what_happened": "Operator cancelled the job at 06:10:46Z to swap the OpenAI key; all agent processes ended. Pause time and preflight were not charged; the same thread was resumed with a correct notice.", + "agent_response": "Recovery controller started from the 140k checkpoint within 94 s of the prompt; replayed 3,514 updates (659 s GPU) with audit; restored five CPU validation workers from saved cases within 3 min; verified the published package unchanged.", + "estimated_charged_time_lost_seconds": 800, + "work_lost": "3,514 training updates replayed (659 s); in-flight validation cases of 5 CPU workers (resumed from caches); dev evaluation of the interrupted segment.", + "affects_published_results": false, + "notes": "Handled correctly by the operator tooling; only the replay and recovery overhead were charged." + }, + { + "kind": "6 (API capacity failures) + 5 (Codex exit killed the agent's background jobs)", + "ownership": "operator", + "when_charged_seconds": 102950, + "evidence": [ + "capacity-retries.jsonl: retries at 08:35:31Z (30 s), 08:36:23Z (60 s), 08:38:10Z (120 s), 11:06:12Z (240 s), 'Selected model is at capacity'", + "trajectory turn.failed at L13293, L13301, L13306, L14460; thread.started L13294/L13302/L13307/L14461", + "T3 item_620 (L13291) training at 129.6k; T4 item_2 (L13299) progress still 129,829 at 08:36Z; T6 item_1/item_2 (L13311-13312) 'processes are no longer present'; T6 item_9 (L13324) '4,829 uncheckpointed updates will be replayed'; T6 item_52 (L13398) 'adds about 15 minutes of compute'", + "T7 item_3/item_2/item_7 (L14467-14475) 'The saved jobs have stopped again, leaving the GPU idle'; T7 item_20 (L14500) 'recovery will replay 3,602 updates'; T7 item_32 (L14521) validation recovery", + "codex.stderr 2026-10-22T11:06:10Z 'failed to record rollout items: thread ... not found' x7", + "runtime.py research(): capacity path sleeps then re-invokes codex; agent jobs were children of the Codex exec tree (T8 L17455 ps: controller sh PPID 603 under codex PID 604; only 1 of 20 Popen launches used start_new_session)" + ], + "what_happened": "Two 'model at capacity' stream failures ended Codex invocations T3 (after 2.3 h) and T6 (after 2.4 h); T4/T5 failed within seconds. Each Codex exit killed every background job the agent had launched (trainer, 5 CPU validation workers, audits) because they were children of the Codex exec tree. The runtime charged the retry sleeps (450 s) and all recovery time.", + "agent_response": "Both times: detected dead processes within 30 s, archived the interrupted log tail, replayed from the last complete optimizer checkpoint (4,829 then 3,602 updates) with numerical audits, restarted validation workers from cached cases; training resumed 08:44:37Z and 11:15:48Z (9-10 min after each failure). Agent did not know the cause ('second stop cause/timing unknown', ACTIVE.md via T6 L13743).", + "estimated_charged_time_lost_seconds": 2700, + "work_lost": "4,829 + 3,602 training updates replayed (~900 s + ~675 s GPU); GPU idle ~9 min per event; in-flight validation cases (phonon audit case, paired-audit chunk, full-suite worker cases) recomputed; last items of T6 not persisted to the rollout (7 'failed to record rollout items').", + "affects_published_results": false, + "notes": "Trigger is API-side; the process loss is amplified by the harness (child processes die with Codex) and partly by the agent not detaching its controllers with setsid/start_new_session. The agent was never told that Codex itself can restart mid-turn." + }, + { + "kind": "4 (three container deaths of undetermined cause, Beaker auto-resume, no recovery record)", + "ownership": "infrastructure", + "when_charged_seconds": 138300, + "evidence": [ + "attempts/004 (preflight 18:28Z Oct 22), attempts/005 (21:29Z), root preflight-result.json (00:01Z Oct 23); research-state.json attempt=6; recoveries/ has only the 06:13Z operator pause", + "rollout boundaries: last T7 record 18:23:37.97Z -> T8 prompt 18:28:27Z; last T8 record 21:26:08.5Z -> T9 21:29:17Z; last T9 record 00:00:48.8Z -> T10 00:01:48Z", + "T8 item_2/item_3/item_6 (L17115-17121): GPU idle, trainer at 107,760, checkpoint 105,000, '2,760 replayed updates'; T9 item_3/item_9 (L18157, L18168): 'Training logged update 150,000, but it had not saved that checkpoint; latest complete optimizer state is 145,000'; T9 item_42 (L18227) '>=1,120 s discarded'; T9 item_67 (L18271) 'five completed relaxation stages account for at least 9,827 seconds' (MOF case lost); T10 item_14 (L19200) '1,412 updates before the pause'; LEDGER.md line 89 and 97", + "no turn.failed before these thread.started events; runtime.py phase logic means the supervisor was killed externally (SIGTERM/SIGKILL), not crashed", + "memory: cgroup memory.max 250.7 GB (233.5 GiB); memory.current 202 GB at T7 L16716 and 188 GB at T7 L16933 (oom_kill 0 then); process RSS in T8/T9 totals ~20-25 GB (T8 L18129, T9 L18264, L18735), so most charged memory was page cache" + ], + "what_happened": "Containers 3, 4 and 5 were killed from outside at ~18:24Z, ~21:27Z and ~00:01Z (Oct 22-23) and Beaker auto-resumed each within 1-5 minutes. Cause is not recorded anywhere in the run root (no Beaker job status for recovery experiment 01M5H3WG89BKBYE4YTDW39WSGZ is archived). Each kill ended the trainer and the four CPU full-validation workers. The second kill hit at the final update (150,000) of the force-increment experiment before its checkpoint/dev evaluation were saved.", + "agent_response": "Each time: verified checkpoints, archived interrupted logs, replayed 2,760 / 5,000 / 1,412 updates with audits, restored validation workers from caches; training resumed 5.3 / 5.3 / 4.2 min after the prompt. Agent recorded these as 'operator pauses' because of the stale notice (see next incident) and therefore did not look for a memory or node cause.", + "estimated_charged_time_lost_seconds": 2930, + "work_lost": "2,760 + 5,000 + 1,412 training updates replayed (576 + >=1,120 + 338 s GPU) plus ~5 min recovery each; an unsaved 150k checkpoint and its 49-batch dev evaluation; a MOF validation case with >=9,827 s of completed CPU work; in-flight NEB/phonon/surface cases; the finite-cell data audit restarted.", + "affects_published_results": false, + "notes": "Root cause open: OOM-group kill is possible but RSS evidence argues against it; node cordon/preemption or Weka-client trouble on a 100%-full filesystem are alternatives. Beaker job records (exitCode/canceledFor) for the recovery experiment would settle it." + }, + { + "kind": "5/7 (stale recovery notice: wrong cause and wrong remaining budget at three restarts)", + "ownership": "operator", + "when_charged_seconds": 138320, + "evidence": [ + "runtime.py lines 570-571 read recovery-notice.txt whenever it exists; recover.py line 206 writes it; nothing deletes it (file still present at run root, mtime 06:13Z Oct 22)", + "rollout user prompts at 18:28:27Z, 21:29:17Z, 00:01:48Z each carry 'The operator paused this trial to replace its API credentials ... 78214 research seconds remain at recovery' (rollout L46608, L49677, L52702); actual remaining at those times ~34,500 / ~23,900 / ~14,750 s", + "agent believed it: T8 item_6 (L17121) 'The pause interrupted training'; T9 item_9 (L18168) 'The pause did stop the workers'; T8 item_490 (L17983) 'if the operator pauses it again'; ACTIVE.md via T9 L18295: 'The latest user message again declares 78,214 research seconds remaining at recovery; preserve that declaration rather than inferring budget from wallclock pauses'; T10 L19231 recovery plan JSON 'research_seconds_remaining_at_recovery': 78214 at 00:04Z Oct 23", + "consequence: T9 item_176 (L18451) launched a full 50k-update experiment at ~22:00Z with ~6 h left (the prior 50k run took 8.5 GPU-h, progress.json gpu_hours 8.555 at T9 L18157); at the deadline T10 item_867 (L20693) training was at 137,716/150,000 with full-suite validations mid-way; last publication change was snapshot 149340 (~21:36Z Oct 22), none in the final 6.5 h" + ], + "what_happened": "The one-off operator-pause notice was re-sent verbatim by the runtime on every later Beaker auto-resume, telling the agent (a) the stop was an operator credential pause, and (b) 78,214 research seconds remained, when 34.5k, 23.9k and 14.8k actually remained. The agent explicitly trusted the declared figure over its own wall-clock inference.", + "agent_response": "Planned as if ~21.7 h remained in each of the last three containers: committed the sole GPU to 50k-update continuations and long full-suite validations, and was still mid-training/mid-validation when the clock ran out; never scheduled a final candidate evaluation/publication for the real deadline.", + "estimated_charged_time_lost_seconds": null, + "work_lost": "Final ~9.5 charged hours (containers 4-6) were planned on false information; the broad-composition candidate (dev loss improving through 135k) never reached its eight-suite review before the deadline. Whether a correctly informed agent would have published a better package is unknowable.", + "affects_published_results": true, + "notes": "This is a runner bug, not ordinary friction: the notice text contradicted reality and overstated the budget by 44k-64k seconds. The task normally tells the agent nothing about its budget; giving it a wrong number is worse than none." + }, + { + "kind": "5 (sandbox blocks the loopback socket the task's documented trainer needs)", + "ownership": "operator", + "when_charged_seconds": 370, + "evidence": [ + "T1 item_39 (L77): fairchem CLI -> local_launch -> get_free_port -> socket.socket -> 'PermissionError: [Errno 1] Operation not permitted' (smoke failed at unix 1792555051 = 03:57:31Z)", + "tasks/atomistic-materials/environment/baseline/uma-s-pretrain/README.md line 19: 'fairchem -c research/pretrain/train.yaml' is the documented launch; task docker-compose network_mode 'no-network' (loopback normally available)", + "preflight-result.json ipv4_blocked true; T1 item_40 (L78) 'The standard FAIRChem launcher failed before training because it opens a local network socket, which this environment blocks'; T1 item_46 (L107) train_single.py 'Socket-free, one-GPU FAIRChem training'; rollout: failure noticed 03:58:01Z, custom runner training 04:00:53Z" + ], + "what_happened": "Our seccomp network ban denies AF_INET socket creation, so the task's reference training entry point (fairchem CLI, which binds a localhost MASTER_PORT even for one GPU) cannot run. The task's own environment only forbids external network.", + "agent_response": "Wrote a single-process trainer reusing stock FAIRChem model/collation/losses within ~3 minutes and used it for the whole run.", + "estimated_charged_time_lost_seconds": 300, + "work_lost": "None beyond the 3-5 min; the agent was forced off the reference launcher for all training (self-validated).", + "affects_published_results": false, + "notes": "Small cost here, but the same block would hit any agent that follows the baseline README literally." + }, + { + "kind": "2 (persistent research mount returns EXDEV on rename/link inside /workspace/research; breaks the task's own validation driver)", + "ownership": "operator", + "when_charged_seconds": 800, + "evidence": [ + "T1 item_66 (L127): /workspace/evaluation/run_local.py worker: os.rename(.../.tmp/out/run.json -> .../.tmp/run.json) 'OSError: [Errno 18] Invalid cross-device link' at 04:03Z; T1 item_71 (L135) 'physical-suite driver hit a filesystem error'; T1 item_69 (L136) run_physical_single.py 'avoids cross-directory rename'", + "T1 item_556 (L1051) optimizer snapshot os.replace EXDEV at step 20,000; T2 item_1426 (L6191) experiment-dir rename EXDEV; T2 item_2815 (L8742) os.link EXDEV; T10 item_31 (L19231) recovery-monitor rename EXDEV", + "agent notes (ACTIVE.md via T7 L14472): 'research symlink -> /run-state/workspace/research, EXDEV requires copy/hash/within-directory atomic replace'; publication-storage.json layout 'local-workspace-parent-with-persistent-research'", + "df outputs: /workspace/research on weka-aus.beaker.org/oe-adapt (T1 L40), / is overlay" + ], + "what_happened": "Renames and hard links between directories under the Weka-backed /workspace/research fail with EXDEV, so the task-provided run_local.py driver crashes mid-suite there and the agent's checkpoint/experiment bookkeeping hit the same error four more times. Preflight only checks renameat2 on the publication parent.", + "agent_response": "Wrote a wrapper around the verifier's predict routine (first validation at 04:05-04:10Z), adopted copy+hash+same-directory replace for all later moves (extra I/O for 1.7 GB checkpoints), recovered each later EXDEV failure in a few minutes.", + "estimated_charged_time_lost_seconds": 1500, + "work_lost": "First physical-suite validation partially rerun; one optimizer-snapshot capture redone; several minutes per later occurrence; recurring copy overhead for multi-GB artifacts.", + "affects_published_results": false, + "notes": "Task design assumes /workspace/research is an ordinary filesystem; our mount layout is not." + }, + { + "kind": "benign", + "ownership": "benign", + "when_charged_seconds": null, + "evidence": [ + "codex.stderr: 3 apply_patch verification failures (07:35Z, 09:18Z, 10:45Z Oct 21; malformed patches), 5 'write_stdin failed: Unknown process id', 5 'failed to refresh available models: request timed out'", + "T1 item_13 (L31) lmdb ReadonlyError on read-only pool, fixed next command; ModuleNotFoundError items are the agent's own scripts/threadpoolctl (T1 L175, T2 L11296, T3 L12469, T7 L15866); CUDA OOM at T2 L3741 is the agent's batch-size probe; '429' flags are numeric coincidences in JSON outputs" + ], + "what_happened": "Ordinary tool friction corrected in seconds; no charged time of note.", + "agent_response": "Corrected immediately.", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "none", + "affects_published_results": false, + "notes": "" + } + ], + "environment_vs_spec": [ + {"promised": "1x H100 80GB (disclosed override of 8 GPUs)", "observed": "NVIDIA H100 80GB HBM3, 1 visible, CUDA ok in all 6 preflights; gpu-access.json strict allocation /dev/nvidia7 on the last node", "evidence": "preflight-result.json, attempts/00*/preflight-result.json, gpu-access.json", "material": false}, + {"promised": "22 CPUs requested", "observed": "os.cpu_count 192, sched_getaffinity 180, cgroup cpu.max 'max' (no quota); agent self-limited to small CPU slots", "evidence": "T1 item_11 (L24), T2 item_1491 (L6313), T2 item_1488 (L6310)", "material": false}, + {"promised": "224 GiB RAM", "observed": "cgroup memory.max 250,720,169,984 B (233.5 GiB); peak observed memory.current 202 GB (mostly page cache); no oom_kill observed", "evidence": "T1 L40, T7 L16716, T7 L16933", "material": false}, + {"promised": "/workspace/research writable ordinary filesystem for checkpoints/notes (instruction.md); verifier drivers runnable there", "observed": "Weka-backed symlink into /run-state; cross-directory rename/link -> EXDEV; task's run_local.py crashes there", "evidence": "T1 item_66 (L127), T1 L1051, T2 L6191, T2 L8742, T10 L19231", "material": true}, + {"promised": "No external network (task docker-compose 'no-network'); baseline README launches training via 'fairchem -c ...'", "observed": "All AF_INET sockets denied (ipv4_blocked true), so the fairchem launcher's localhost port bind fails with EPERM", "evidence": "T1 item_39 (L77), preflight-result.json, baseline README line 19", "material": true}, + {"promised": "Python 3.12, FAIRChem 2.16.0, phonopy 3.5.1, phono3py 3.30.0, scoring venv pymatgen 2023.5.10 (contract.md / Dockerfile)", "observed": "/opt/venv python3.12 with fairchem.core used throughout; scoring venv reports pymatgen 2023.5.10, numpy 1.26.4, ase 3.26.0; no ImportError/version complaint for promised packages", "evidence": "T1 L24 (/opt/venv/bin/python), T1 L2058 scoring_versions, 0 ImportError flags", "material": false}, + {"promised": "Read-only data mounts pool/val/baselines", "observed": "Present and read-only (data_readonly true; lmdb ReadonlyError until opened readonly)", "evidence": "preflight-result.json, T1 L31/L35", "material": false}, + {"promised": "32 GiB shared memory", "observed": "not probed by the agent; no shm errors", "evidence": "experiment.json resources", "material": false}, + {"promised": "Research storage capacity", "observed": "shared Weka at 97-100% full all run (15 TB -> 2.6 TB free); no ENOSPC inside this run; inode use 8%", "evidence": "df outputs T1 L40 ... T10 L19502; attempts/*/preflight-result.json research_storage_free_bytes", "material": false} + ], + "budget_awareness": "The task deliberately tells the agent nothing about its 48 h budget, and until the pause the agent never reasoned about remaining time. The 06:16Z recovery notice correctly said 78,214 s remained (agent ACTIVE.md: 'At 08:07 approximately 71,550 seconds remain'). The same notice was then re-sent verbatim at the 18:28Z, 21:29Z and 00:01Z auto-resumes (rollout L46608/L49677/L52702) while ~34.5k, ~23.9k and ~14.75k s actually remained; the agent wrote 'preserve that declaration rather than inferring budget from wallclock' (T9 L18295) and recorded 78,214 in each recovery plan (T8 L17454, T9 L18293, T10 L19231). It also believed each kill was an operator credential pause. Bookkeeping files themselves are consistent: research-state/status elapsed 172800, attempt 6, turns 10, error null, submission sha 1f40a6af... == snapshots/149340 == publication-storage.json restored hash; the run ended at exactly 172,800 charged seconds with the submission intact (rollout last record 04:07:58Z Oct 23).", + "total_estimated_operator_caused_loss_seconds": 8830, + "verdict": "material (unfair)", + "verdict_reasoning": "The agent suffered seven interruptions in 48 h (one GPU-hardware node death, one operator key pause, two API capacity failures that killed all its background jobs, three externally-killed containers of unrecorded cause), each costing a checkpoint replay of 1.4k-5k updates, ~5-10 min of recovery, and in-flight validation work (one MOF case alone >=9,827 s); the directly charged loss is about 8,800 s plus unquantified CPU validation work. Separately, a runner bug re-sent the one-off operator-pause notice at the last three restarts, telling the agent the stop was a credential pause and that 78,214 s remained when 34.5k/23.9k/14.8k s remained; the agent explicitly trusted that figure, committed its only GPU to 50k-update experiments it could not finish, and reached the deadline mid-training with no candidate evaluated, so its final ~9.5 charged hours were planned on false information. Two environment defects also broke the task's own documented tooling (fairchem launcher blocked by the seccomp socket ban; run_local.py and bookkeeping hit EXDEV on the Weka research mount), though the agent worked around both quickly. The published package (100k model, score 31.48 on the agent's fixed panel) was never corrupted, and the agent's own publication gate means a better package is not guaranteed under fair conditions, but the trial as run is not a fair measure of a 48 h budget.", + "recommended_remedy": "targeted repair: fix runtime.py to consume/delete recovery-notice.txt after first use and to emit an accurate per-attempt notice (true cause, recomputed remaining seconds) on Beaker auto-resumes; detach or protect agent jobs from Codex exits on capacity retries (or at least inform the agent); allow loopback sockets or document the fairchem-launcher block; make /workspace/research rename-safe or warn; pull Beaker job records for experiment 01M5H3WG89BKBYE4YTDW39WSGZ to establish why containers 3-5 died. Disclose all of this with the result; rerun this task if it is used for comparative claims against runs that had one or zero interruptions.", + "open_questions": [ + "Why did containers 3, 4 and 5 die (18:24Z, 21:27Z Oct 22, 00:01Z Oct 23)? Only Beaker job statuses (exitCode/canceledFor) for 01M5H3WG89BKBYE4YTDW39WSGZ can distinguish OOM-group kill (cgroup 233.5 GiB; memory.current reached 202 GB, mostly page cache) from node cordon/preemption or Weka-client failure on a 100%-full filesystem.", + "Did the 11:06:10Z 'failed to record rollout items' errors drop any T6 items from the resumed context (minor context loss on the T7 resume)?", + "Is the EXDEV behaviour specific to this Beaker Weka mount configuration (other runs on the same mount would be affected identically)?", + "How much CPU-side validation work was lost per interruption beyond the one measured MOF case (>=9,827 s)? The agent restarted workers from caches but in-flight cases were not itemized except in T9 item_67." + ] +} diff --git a/reviews/fairness-20261031/per-task/crystal-structure-generation.json b/reviews/fairness-20261031/per-task/crystal-structure-generation.json new file mode 100644 index 0000000000000000000000000000000000000000..97679d8498a3f8469b72ed6f8d1d15bf34e0f3c9 --- /dev/null +++ b/reviews/fairness-20261031/per-task/crystal-structure-generation.json @@ -0,0 +1,121 @@ +{ + "task": "crystal-structure-generation", + "run_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/crystal-structure-generation-astra-xhigh-1h100-48h-20261020b", + "containers": 5, + "turns": 5, + "charged_seconds": 172800, + "research_state_error": null, + "container_timeline_utc": { + "C1": "2026-10-21 03:56:17 -> 2026-10-22 06:10:55, cancelled by operator (API key replacement); charged 94466.5 s; trajectory lines 3-11672", + "C2": "2026-10-22 06:17:03 -> 07:09:29, cancelled by operator (second key swap); charged +3130.3 s (97596.8); lines 11675-12274 (249 commands)", + "C3": "2026-10-22 07:12:25 -> 07:28:23, cancelled by operator (stop all runs on OPENAI_API_KEY_WEIWEI); charged +945.5 s (98542.3); lines 12277-12520 (103 commands)", + "gap1": "07:28Z Oct 22 -> 02:43Z Oct 23 uncharged (19 h 15 min)", + "C4": "2026-10-23 ~02:44 -> 11:19:07, supervisor died with ENOSPC on /run-state (storage-failure.log); charged +30908 s +14 s lost-heartbeat penalty (129450.2); lines 12523-17320", + "gap2": "11:19Z -> 21:09Z Oct 23 uncharged (~9 h 50 min)", + "C5": "2026-10-23 21:18:41 -> 2026-10-24 09:21:11, ran to the 172800 s deadline; charged +43349.8 s; lines 17323-22398", + "note": "The 'Oct 23 02:43Z' recovery folder is the restart AFTER the third pause (07:28Z Oct 22), not a fourth pause. There were 3 operator pauses (all Oct 22 within 78 minutes) + 1 storage outage = 4 recoveries. Each container ran exactly one Codex turn (turns=attempt=5, quick_turns=0); no capacity retries (no capacity-retries.jsonl)." + }, + "incidents": [ + { + "kind": "4 (infrastructure interruptions: operator pauses x3)", + "ownership": "operator", + "when_charged_seconds": "94466 (pause 1), 97597 (pause 2), 98542 (pause 3)", + "evidence": [ + "recoveries/20261022T061314.031240Z/recovery.json + operator-pause.json (job 01M5E9G8NWJXCHCEE3D98THBPF canceled by stevenc 06:10:46Z; 'User-requested pause to replace the OpenAI API key')", + "recoveries/20261022T070943.771227Z/recovery.json (job 01M5H3W1Z17N7M8J8Q7P2A19EX canceled 07:09:21Z)", + "recoveries/20261023T024316.445934Z/recovery.json + operator-pause.json / operator-pause-request.json (job 01M5H73G8SNQM2YV38TDECYDS8 canceled 07:28:18Z; stop all runs on OPENAI_API_KEY_WEIWEI; resume_requires_new_user_instruction)", + "trajectory C1 L11088/L11216/L11435 (progress_snapshot: trials 96/97/114 entered ensemble stage at 04:19Z/04:46Z/05:13Z) and L11591 item_6293 (05:44Z: 96/97/114 'ensemble', 108 'initial' 2220/2500)", + "trajectory C2 L11717 item_22, L11732 item_30, L11768 item_49 ('All four evaluations have restarted. Hash checks passed for the 7,500 completed initial relaxations and the fourth trial's 2,448 saved records'), L11734 item_31 (agent recovery record at 06:20:27Z)", + "trajectory C3 L12310 item_18 ('All four evaluations were interrupted in the ensemble stage ... The ensemble runner has no saved per-sample checkpoint, so its interrupted work must be rerun'), L12331 item_29 (restart at 07:12:50Z, pids 947-950), L12514 item_125 ('prototyping an evaluation-only journal for future jobs, because both operator pauses discarded unfinished ensemble work'), L12518 item_127 (eval_journal/ created)", + "trajectory C4 L12547 item_13, L12635 item_59 (journal replay verified 02:49Z), L12654 item_69 ('The four full ensemble evaluations are running again' 02:51Z), L14893 item_1260 -> L14942 item_1286 (06:20-06:36Z: 'saved filename orders from before the pause no longer match the resumed evaluators' orders ... rebuilding those mappings' -> corrected for 9,975 saved returns)", + "workspace/research/volumeprior/score_volume1650_2500/report.json etc. mtimes: trial 108 06:28Z, 97 06:32Z, 96 06:42Z, 114 07:10Z on Oct 23 (the four pause-interrupted evaluations finally completed 3h38m-4h20m into C4)", + "workspace/research/recovery_20261022_0617/recovery.json, recovery_20261022_0712/, recovery_20261023_0245/, RESEARCH_STATUS.md line 11 ('resumed 96/97/108/114 had stale pre-pause filename orders')" + ], + "what_happened": "Three operator-initiated cancellations within 78 minutes on Oct 22 (06:10Z, 07:09Z, 07:28Z) to swap API keys. At pause 1 four full 2,500-structure development evaluations were in flight: trials 96/97/114 had been in the LeMat ensemble stage for 1h52m/1h25m/0h58m (about 4.25 job-hours; the pinned ensemble runner had no per-sample checkpoint, so this progress was lost outright) and trial 108 was in initial relaxation with 2,448/2,500 saved (52 redone). In C2 the agent re-verified all saved relaxation hashes and restarted the four ensemble stages (~06:21-06:25Z); pause 2 killed them ~45 min later. In C3 it restarted them again at 07:13Z; pause 3 killed them 15 min later. C2+C3 (4,075 charged s) were therefore almost entirely recovery work and discarded compute. After the 19 h uncharged gap, C4 restarted them at 02:50Z Oct 23 and they completed 06:28Z-07:10Z, occupying the first ~4 h of C4 to redo work that had been 25-50% done at pause 1. The resumed runs also produced a stale filename-order mismatch in the agent's per-structure diagnostics (official scores unaffected) that cost ~16 min to rebuild at 06:20-06:36Z.", + "agent_response": "Handled well: preserved every completed relaxation record (hash-verified 10,000 input/output pairs), wrote resume_score.py / complete_partial_relaxation.py to rerun only missing work, and after the second loss designed an evaluation 'journal' (eval_journal/, verified by exact replay at C4 start) that caches per-structure ensemble returns so later interruptions preserve ensemble progress. Kept the published package unchanged (d2d3b07e..., 1,170/2,500 = 0.468) across all three pauses. Used the remaining-seconds figure from each pause notice correctly (78,333 / 75,203 / 74,258).", + "estimated_charged_time_lost_seconds": 9500, + "work_lost": "~4.25 job-hours of ensemble-stage compute at pause 1 (trials 96/97/114), ~3 job-hours at pause 2 (4 jobs x ~45 min), ~1 job-hour at pause 3 (4 jobs x ~15 min); a 100-structure shuffle batch interrupted at 71/100 initial relaxations (resumed later from saved records). No checkpoints or publications lost. Estimate = C2+C3 wall time 4,075 s + extra C4 charged time to redo the lost ensemble progress (~13,100-15,600 s of C4 re-run minus the ~5,400-11,000 s the trials would still have needed without the pause) + ~20 min of pause-specific agent engineering (journal verification, order-mapping rebuild); range 8,000-12,000 s.", + "affects_published_results": false, + "notes": "The four delayed trials fed the 56.76% publication at 06:31Z Oct 23 (snapshot 112108) and the research chain that led to the final 66.8% publication, so the pauses delayed but did not corrupt results. Pause 2 and 3 landing 52 and 16 minutes after their predecessors converted each recovery into pure waste; a single pause would have cost roughly a third as much." + }, + { + "kind": "4/3 (infrastructure interruption: shared Weka ENOSPC)", + "ownership": "infrastructure", + "when_charged_seconds": 129436, + "evidence": [ + "storage-incident.json (cause 'shared Weka ENOSPC', job exited 2026-10-23T11:19:07Z, verified_publication 112108-559e69a6d63f)", + "storage-failure.log (status heartbeats normal through 11:18:13Z; OSError Errno 28 writing /run-state/research-state.json.tmp and status.json.tmp at 11:19:06Z)", + "recoveries/20261023T210859.172491Z/recovery.json (hard_stop_additional_charge_seconds 14, storage_failure_additional_charge_seconds 14, remaining 43349.8)", + "publication-storage.json (restored_from snapshots/112108-559e69a6d63f, atomic_exchange_ok true) and recoveries/.../research-state.json last_hash 559e69a6... == last snapshot before death", + "trajectory C4 L17300-L17320 items 2570-2583 (11:11-11:18Z: live_progress shows 178 ensemble 1580->1681 returns, 121 initial 1962->2013, 142 finishing initial relaxation, 209 starting; GPU 86%; no errors)", + "trajectory C5 L17324 item_1, L17328 item_2 (df: /run-state weka 440T 94% used, 30T free at 21:18Z), L17341 item_10, L17389 item_35 (recovery audit: 178 2500 initial + 1699 ensemble payloads verified; 121 2020 initial; 142 2500 initial + 10 ensemble; 209 24 initial; 'loader_order byte_name_order_exact false, explicit_list_recovery_required true'), L17416 item_50 (SESSION_20261023_2125.md written), L17527 item_110 ('All 1709 pre-pause ensemble payloads were exact cache hits')", + "workspace/research/recovery_20261023_2120/{audit.log,integrity_summary.json,recovery_actions.json,ordered_staging.py} and SESSION_20261023_2125.md ('Live work resumed 21:25')", + "agent df outputs: C1 L1755 item_926 (Oct 21: weka 440T 97% used, 14T free); the agent's whole research dir is 104 GB, so the fill was other tenants" + ], + "what_happened": "The shared Weka volume hosting /run-state (and /workspace/research) filled up; the supervisor crashed at 11:19:07Z while persisting state and the container ended, killing four in-flight full evaluations (trial 178 ensemble ~1,699/2,500; 121 initial ~2,020/2,500; 142 ensemble just started; 209 initial 24) and one 100-structure batch. The agent's own commands show normal progress to 11:18:16Z with no ENOSPC symptoms; a targeted grep of the 54 research logs written 09:30-11:30Z found no ENOSPC strings and the agent's integrity audit found no corrupt or partial committed records. Restart came 9h50m later (uncharged). The restored filesystem enumerated directories in a different order, which would have changed the pinned scorer's loader ordinals.", + "agent_response": "Verified the restored publication byte-exact (12 files, trial 108 at 1,419/2,500 = 0.5676), hashed all 10,000 input CIFs, 7,044 saved initial records and 1,709 ensemble payloads, wrote ordered_staging.py to pass the pinned scorer an explicit CIF list preserving the original ordinals (no scorer code change), re-queued the four jobs and resumed at ~21:25Z (6-7 min after start); by 21:31Z confirmed every pre-outage ensemble payload was an exact cache hit. Because the journal built after the pauses was in place, essentially no cached work was lost.", + "estimated_charged_time_lost_seconds": 1200, + "work_lost": "14 s lost-heartbeat charge; ~7 min agent recovery/audit; MLIP reloads and uncommitted in-flight per-structure work (each relaxation <=300 s) for 4 jobs, i.e. roughly 10-15 min before evaluations regained their prior rate. No cached records, checkpoints or publications lost. Range 900-1,500 s.", + "affects_published_results": false, + "notes": "The literal claim that 'earlier pauses cost more than the storage event' does not appear in trajectory.jsonl or the notes; what the agent wrote is C3 item_125 ('both operator pauses discarded unfinished ensemble work') and C5 ('All 1709 pre-pause ensemble payloads were exact cache hits'). The quantification here supports the comparison: pauses ~8 job-hours of evaluation compute + 4,075 s of throwaway container time vs. storage ~20 min, precisely because the pauses forced the agent to build the cache that made the storage outage cheap." + }, + { + "kind": "5/7 (notice text: storage-recovery notice omitted the remaining-budget figure)", + "ownership": "operator", + "when_charged_seconds": 129450, + "evidence": [ + "runner/beaker/recover.py: operator-pause, capacity and gpu-isolation notices include '{remaining:.0f} research seconds remain at recovery'; the storage-exhaustion notice (recovery-notice.txt in run root) says only 'The original externally enforced research budget is preserved; previous research time remains charged'", + "trajectory C5 L17416 item_50 and workspace/research/SESSION_20261023_2125.md ('External original budget remains authoritative; no new remaining-time anchor was supplied. Removed stale wall-clock countdown from live_progress.py'), SESSION_20261024_0713.md, LIVE_STATE.md", + "trajectory C4 L17315 item_2580 (agent's own countdown 43,528 s at 11:17:50Z vs true remaining 43,350 s at the 11:19:07Z death: accurate to ~3 min); RESEARCH_STATUS.md line 27 ('Recovery anchor 74258 research seconds at 2026-10-23T02:45:40UTC')" + ], + "what_happened": "After the three pauses the agent had an accurate deadline model; after the storage recovery the notice gave no figure, so the agent deliberately dropped its countdown and ran the final 43,350 charged seconds (12.0 h) without a deadline estimate.", + "agent_response": "Noted the omission explicitly, kept the submission continuously updated (published trial 142 at 66.8% at ~03:12Z Oct 24, snapshot 150761), and continued experiments to the end; was mid-experiment (tied_identity closure, trial 226 full evaluation incomplete) when the clock expired at 09:21Z.", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "None measurable: trial 226's full evaluation (started 06:05Z, ~437 ensemble returns at ~09:05Z) could not have completed before the deadline even with a known deadline; final submission intact.", + "affects_published_results": false, + "notes": "Inconsistent, not wrong, information. Template fix suggested for future runs (add remaining seconds to the storage-exhaustion notice)." + }, + { + "kind": "benign", + "ownership": "benign", + "when_charged_seconds": null, + "evidence": [ + "codex.stderr: 7 apply_patch 'multiple operations target' (model patch formatting), 2 write_stdin 'Unknown process id' (model), 1 'failed to refresh available models: request timed out' at 2026-10-24T03:24Z (model-list refresh only)", + "trajectory: 5 'error' items = Codex use_legacy_landlock deprecation warning at each container start (L2, L11674, L12276, L12522, L17322)", + "C1 L954/L971 items 500/508 exit 139: agent's own generator segfaulted in spglib standardize_cell on a degenerate sampled cell; fixed by the agent by item_528 (L999)", + "exit 143 x41: the agent's own await_cpu_fit_budget.py wrappers and intentionally stopped probes (e.g. C4 L12581 item_20, 'I stopped it'); C3 item_28 was simply in flight at the cancel", + "ModuleNotFoundError x3 (C4 L16553/L16555 'datasets' under /opt/conda; C5 L17389 'safetensors' under /opt/lemat/.venv): interpreter-choice slips, corrected immediately; both packages exist in their intended environments per the Dockerfile", + "C1 L2134 Permission denied: the agent had chmod -R a-w its own candidate directory", + "'429' (436 hits) are numeric substrings in score outputs; regex for HTTP 429 / rate limit found 0 matches; no capacity-retries.jsonl", + "cgroup memory.events oom_kill 0 at every check (L11363, L12302, L19409); 'OOM' hits are words in the agent's notes" + ], + "what_happened": "Ordinary research friction and model-side slips; none caused by the operator setup.", + "agent_response": "Corrected within seconds to minutes.", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "none", + "affects_published_results": false, + "notes": "" + } + ], + "environment_vs_spec": [ + {"promised": "1x H100 80GB (operator override of task.toml gpus=8), exclusive", "observed": "NVIDIA H100 80GB HBM3, 81,559 MiB, GPU-91ac4bec only (landlock), visible_gpus 1 in all five preflights", "evidence": "gpu-access.json; preflight-result.json; attempts/00{1..4}/preflight-result.json; trajectory C1 L1755, C5 L17328", "material": false}, + {"promised": "22 CPUs requested (experiment.json cpuCount 22)", "observed": "No cgroup CPU quota (cpu.max = 'max 100000'); cpu_affinity_count 180; the agent self-limited to 21-22 (score_limits.json cpu_budget 21). More than promised was available, never less", "evidence": "trajectory C1 L276 item_143, C4 L16987 item_2384, C3 L12302 item_12; preflight.jsonl", "material": false}, + {"promised": "224 GiB RAM", "observed": "cgroup memory.max 250,720,169,984 B (233.5 GiB); peak observed memory.current ~144 GiB (L6378); oom_kill 0 throughout", "evidence": "trajectory L276, L6378, L11363, L16987, L19409", "material": false}, + {"promised": "Dockerfile: pytorch 2.8.0-cuda12.8-cudnn9, Python 3.11, OMatG + LeMat pinned, safetensors, torch-scatter, MPS usable", "observed": "torch 2.8.0+cu128 at /opt/conda (Python 3.11); /opt/lemat/.venv scorer ran; nvidia-cuda-mps-control daemon worked for GPU sharing; no CUDA/cuDNN/NCCL errors in 9,275 commands", "evidence": "trajectory C1 L18 item_8; C3 L12316 item_21; index hit counts", "material": false}, + {"promised": "mp20 train/val/manifest + scorer-assets read-only; no test split; no network", "observed": "development_data_ok, data_readonly, evaluation_roles_absent all true; network_blocked true, unix IPC ok, in every preflight", "evidence": "preflight-result.json; attempts/*/preflight-result.json", "material": false}, + {"promised": "task.toml storage_mb 1,048,576 (1 TiB) writable research space", "observed": "/workspace/research -> /run-state/workspace/research on shared Weka (440 TB) that was 94-97% full for the whole trial (14 TB free Oct 21, 30 TB free Oct 23) and hit ENOSPC on Oct 23 11:19Z; agent's own usage 104 GB. Local overlay / and /tmp 14 TB, 5-8% used", "evidence": "trajectory C1 L1755 item_926, C4 L13660/L15504/L16978, C5 L17328 item_2; storage-incident.json; du of workspace/research", "material": true}, + {"promised": "48 h = 172,800 charged s; recoveries resume same thread", "observed": "research-state/status/trial agree (172,800 s, attempt 5, turns 5, sha ae044a8b == snapshot 150761); all five thread.started share thread 01a15c9a-...; recovery charged_elapsed values match Beaker job durations within ~15 s; C5 Beaker timeout 45,150 s > remaining 43,350 s so no early cut", "evidence": "research-state.json, status.json, snapshots/index.jsonl, recoveries/*/operator-pause.json jobs[].status, experiment.json timeout", "material": false} + ], + "budget_awareness": "The task does not tell the agent its budget, but each of the three operator-pause notices (recover.py template) supplied the correct remaining seconds (78,333 / 75,203 / 74,258), which the agent recorded (workspace/research/recovery_20261022_0617/recovery.json; RESEARCH_STATUS.md 'Recovery anchor 74258 research seconds at 2026-10-23T02:45:40UTC; paused time excluded') and tracked accurately: its live_progress.py reported 43,528 s remaining at 11:17:50Z (C4 L17315) versus the true 43,350 s at the 11:19:07Z death. The storage-exhaustion notice omitted the figure; the agent wrote 'no new remaining-time anchor was supplied' (SESSION_20261023_2125.md, C5 L17416) and ran the final 12.04 h without a deadline model. No status-file contradictions: research-state.json, status.json and the recovery receipts are mutually consistent and the run ended at exactly 172,800 charged seconds with the submission (ae044a8b...) equal to the last snapshot.", + "caches_survived_restarts": "Yes. After pause 1: 7,500 completed initial-relaxation records (trials 96/97/114) + 2,448 of trial 108 were hash-verified and reused (C2 L11768); ensemble-stage progress was NOT cached then and was lost three times. After pause 3 the agent's eval_journal (built in C3/C4, exact-replay verified at C4 L12635) cached per-structure ensemble returns. After the storage outage: 10,000 input CIF hashes, 7,044 initial records and 1,709 ensemble payloads verified intact; all 1,699 (trial 178) + 10 (trial 142) pre-outage ensemble payloads were exact cache hits (C5 L17527 item_110; recovery_20261023_2120/integrity_summary.json). Directory enumeration order changed after the restore, worked around with an explicit CIF list (ordered_staging.py) without modifying scorer code.", + "total_estimated_operator_caused_loss_seconds": 10700, + "verdict": "minor (disclose)", + "verdict_reasoning": "Three operator-initiated API-key pauses inside 78 minutes on Oct 22 destroyed about 8 job-hours of in-flight ensemble evaluation (no per-sample checkpoint existed), made the 52-minute and 16-minute containers C2/C3 (4,075 charged s) essentially throwaway, and pushed the four decisive full-trial results from an expected ~08:00-09:00Z Oct 22 to 06:28-07:10Z Oct 23, roughly 2.5-3 h of charged time; the agent also spent ~20 min on pause-specific engineering (resume helpers, an evaluation journal, an order-mapping rebuild). The shared-Weka ENOSPC death on Oct 23 was infrastructure-caused but, thanks to that journal, cost only ~20 min and zero cached work; the restored publication matched the last snapshot byte-for-byte. The environment otherwise matched or exceeded the disclosed allocation (H100 exclusive, no CPU quota, 233 GiB cgroup, correct torch/CUDA, read-only data, no network, zero OOM kills, zero capacity retries). Total operator-caused loss is ~10,700 s (~3.0 h, ~6% of 48 h) with no lost or corrupted publication and the final 66.8% dev-score package published 6 h before the deadline, so the trial is usable with disclosure rather than unfair.", + "recommended_remedy": "disclose", + "open_questions": [ + "The parent's paraphrase 'earlier pauses cost more than the storage event' is not a literal agent statement in trajectory.jsonl or the notes; closest statements are C3 item_125 (L12514) and C5 item_110 (L17527). If it came from another summary, that source should be cited instead.", + "The full-tree grep for ENOSPC strings across the 104 GB research directory did not finish (slow Weka); the targeted grep over the 54 logs written 09:30-11:30Z on Oct 23 was negative and the agent's integrity audit found no corrupt or partial records, so no corruption is indicated, but the full sweep was not completed.", + "Shared Weka was 94-97% full on every df the agent ran (Oct 21 and Oct 23); other trials in the same batch mounting /run-state on this volume share the same risk and should be checked for silent ENOSPC in background processes.", + "Whether the C5 end state (trial 226 full evaluation unfinished, frozen audit 217 consuming scorer slots) would have been scheduled differently had the storage notice included the remaining-seconds figure; not demonstrable either way." + ] +} diff --git a/reviews/fairness-20261031/per-task/fruit-fly-neuron-reconstruction.json b/reviews/fairness-20261031/per-task/fruit-fly-neuron-reconstruction.json new file mode 100644 index 0000000000000000000000000000000000000000..06d9372cbfda719d484db5957a8d29ad32a785a6 --- /dev/null +++ b/reviews/fairness-20261031/per-task/fruit-fly-neuron-reconstruction.json @@ -0,0 +1,227 @@ +{ + "task": "fruit-fly-neuron-reconstruction", + "run_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/fruit-fly-neuron-reconstruction-astra-xhigh-1h100-48h-20261022a", + "containers": 5, + "turns": 228, + "charged_seconds": 172800, + "research_state_error": null, + "container_timeline": [ + { + "container": 1, + "turns": "1-19", + "charged_s": 16922, + "utc": "2026-10-22T01:28:43 -> 06:10:47", + "end": "operator pause #1 (API key replacement), SIGTERM, graceful, 0 s extra charge" + }, + { + "container": 2, + "turns": "20-26", + "charged_s": 3237, + "utc": "2026-10-22T06:15:19 -> 07:09:21", + "end": "operator pause #2 (API key replacement), graceful" + }, + { + "container": 3, + "turns": "27-29", + "charged_s": 992, + "utc": "2026-10-22T07:11:39 -> 07:28:19", + "end": "operator pause #3 (stop all runs on OPENAI_API_KEY_WEIWEI), graceful; 19.2 h uncharged pause" + }, + { + "container": 4, + "turns": "30-71", + "charged_s": 30859, + "utc": "2026-10-23T02:43:18 -> 11:19:09", + "end": "shared Weka ENOSPC killed supervisor (storage-failure.log); +10 s heartbeat charge; 9.8 h uncharged gap" + }, + { + "container": 5, + "turns": "72-228", + "charged_s": 120800, + "utc": "2026-10-23T21:09:06 -> 2026-10-25T06:53:04", + "end": "budget exhausted at exactly 172800 charged s; phase complete, error null" + } + ], + "incidents": [ + { + "kind": "4 infrastructure interruption (operator pause)", + "ownership": "operator", + "when_charged_seconds": 16922, + "evidence": [ + "recoveries/20261022T061340.612579Z/recovery.json (source_failure 'User-requested pause to replace the OpenAI API key', job canceled by stevenc 06:10:47Z)", + "trajectory turn 19 item_28/item_30 (full-v4 at 38-40/125 windows, 8.5M calls)", + "turn 20 item_26, item_50, item_61 (41 windows retained = 6,897,297 calls, 84 restarted)", + "workspace/research/NOTES.md lines 191-205" + ], + "what_happened": "Container 1 was cancelled by the operator to replace the API key while the agent's full-v4 development replay (4 MPS FFN workers on the one H100, started 03:39Z) was at 40/125 windows. In-flight partial windows were lost: ~8.55M calls done vs 6,897,297 retained => ~1.65M FFN calls (~1,770 s of GPU work at ~932 calls/s) discarded.", + "agent_response": "Turn 20 (06:15:42-06:22:29Z): read notes, inspected native window receipts, wrote a recovery adapter (recover_ffn_v4_operator_v1.py) that hash-verified all 41 saved windows and relaunched the 84 missing ones plus the 3 queued downstream jobs; charged 9,367 s against its own 28,800 s FFN cap. Efficient (~7 min).", + "estimated_charged_time_lost_seconds": 2200, + "work_lost": "~1.65M FFN calls of in-flight windows (recomputed); 0 publications lost (snapshot 007683-885727f7 == latest_submission at pause).", + "affects_published_results": false, + "notes": "GPU-work loss ~1,770 s + recovery turn ~430 s. Pause notice correctly reported 155,878 s remaining." + }, + { + "kind": "4 infrastructure interruption (operator pause)", + "ownership": "operator", + "when_charged_seconds": 20159, + "evidence": [ + "recoveries/20261022T070951.315614Z/recovery.json (job canceled by stevenc 07:09:21Z)", + "turn 26 item_8/item_12 (46 windows complete, 2.79M new calls since restart, 16 windows active)", + "turn 27 item_10, item_29, item_38", + "NOTES.md lines 217-225 (retained calls 6,897,297 -> 7,025,268; +3,181 s charged to FFN cap)" + ], + "what_happened": "Container 2 was cancelled 54 min after the first recovery, again for key replacement. Recovery-1 had made ~2.8M new FFN calls but only 5 small windows (127,971 calls) completed; the 16 large in-flight windows were lost again => ~2.69M calls (~2,885 s GPU) discarded.", + "agent_response": "Turn 27 (07:11:57-07:16:38Z): verified 46 windows, wrote recovery v2, relaunched 79 windows and the downstream queue (~5 min).", + "estimated_charged_time_lost_seconds": 3185, + "work_lost": "~2.69M FFN calls (almost the entire container-2 GPU output) recomputed later.", + "affects_published_results": false, + "notes": "Pause notice reported 152,641 s remaining (recorded by agent in NOTES.md line 219)." + }, + { + "kind": "4 infrastructure interruption (operator pause)", + "ownership": "operator", + "when_charged_seconds": 21150, + "evidence": [ + "recoveries/20261023T024317.979978Z/recovery.json + operator-pause.json (reason: stop all runs using OPENAI_API_KEY_WEIWEI; canceled 07:28:19Z)", + "turn 29 item_16 (721,060 calls since recovery, no completed window)", + "turn 30 item_8, item_18 (46 windows retained, 79 restarted, 15,231 s left of FFN cap)", + "NOTES.md lines 233-241 (recovery 2 stopped at 840 s with no new window)" + ], + "what_happened": "Container 3 was cancelled 17 min after start (third key-related stop); recovery-2 had run 840 s with no completed window, so all of it was lost. Trial then sat paused (uncharged) 19.2 h until 2026-10-23T02:43Z.", + "agent_response": "Turn 30 (02:45:16-02:49:37Z): re-verified 46 windows, recovery v3, relaunched (~4.5 min). The agent's own cap accounting now charged 13,569 s of its 28,800 s FFN cap to the three interruptions; the v4 replay still completed within the cap (NOTES.md line 342: 125/125, no time-limited window, 2026-10-23T06:06:51Z).", + "estimated_charged_time_lost_seconds": 1120, + "work_lost": "~780k FFN calls (840 s GPU) recomputed; nothing published lost.", + "affects_published_results": false, + "notes": "Three operator-initiated kills within 78 minutes of the same long replay; avoidable with a single key swap." + }, + { + "kind": "4 infrastructure interruption (storage outage) + 3 resource shortfall (ENOSPC)", + "ownership": "infrastructure", + "when_charged_seconds": 51999, + "evidence": [ + "storage-incident.json, storage-failure.log (OSError Errno 28 writing /run-state/research-state.json.tmp at 11:19:08Z)", + "turn 1 item_41 (df: /run-state weka 440T used 432T, 99% at trial start; /workspace/research lives on that mount)", + "turn 70 item ~L1316 (df 440T/440T, 112G avail at ~10:30Z) and agent message 'free space is falling beyond what this run has written'", + "turn 71 item_59 (storage available_GiB 30.995 at 11:16:58Z; v5 at 28/125 windows, 6,602,440 model_windows calls)", + "turn 72 item_15, item_24, item_35 (28 windows = 5.12M calls retained, 97 recomputed, 7,442 s charged to FFN cap; staged package /workspace/submission-full-trial-v5 missing, restored from protected copy)", + "attempts/00[1-4]/preflight-result.json research_storage_free_bytes: 8044, 6589, 6317, 2359 GiB (preflight did not block at 2.3 TiB free)" + ], + "what_happened": "Shared Weka (also hosting the agent's persistent /workspace/research) filled up; the supervisor died at 11:19:09Z. The agent's full-v5 replay (started ~09:18Z, 4 GPU workers) was 2.0 h in with 28/125 windows; ~1.5M in-flight calls (~1,700 s GPU) were lost, the container-local staged package was lost, and 97 windows had to be recomputed in container 5. Before the crash the agent spent part of turns 70-71 on storage-capacity workarounds (deduplicating 40.8 GiB of v4 predictions, a 20 GiB->1.9 GiB archive-compression benchmark, capacity checks in its controller).", + "agent_response": "Turn 72 (21:19:51-21:26:13Z): verified restored package hash, hash-checked all 28 windows, restored the staged package from research/run/full-trial-v5/model, relaunched 97 windows (~7 min). v5 later completed with 0 capped windows and was promoted (jobs/full-development-v5/exit.json: nERL 0.005778 vs 0.005594, snapshot 077392).", + "estimated_charged_time_lost_seconds": 3400, + "work_lost": "~1.5M FFN calls recomputed; staged package dir (recovered byte-identically); no snapshot/publication lost (restored 885727f7 == latest at death).", + "affects_published_results": false, + "notes": "GPU loss ~1,720 s + recovery turn ~450 s + storage workaround ~1,200 s + 10 s heartbeat. Notice text was accurate; it did not state remaining seconds (pause notices did)." + }, + { + "kind": "5 runner interference (background processes die at turn end)", + "ownership": "operator", + "when_charged_seconds": 4200, + "evidence": [ + "codex.stderr 2026-10-22T02:39:06 'failed to record rollout items: thread not found' and 02:39:17 'write_stdin failed: Unknown process id 3022'", + "NOTES.md lines 91-95 ('At 02:39 UTC ... full-v2 controller 2728 and parent shell had disappeared; FFN launcher 2760 and four workers survived under orphaned process group 2759. Session 3022 was gone ... Last progress: 3/125 windows, 890,924 calls')", + "turn 2 item_12 (agent stops and archives the orphaned attempt), item_18 (launches detached research_job.py controller)" + ], + "what_happened": "Each runtime turn is a separate `codex exec resume` process; when turn 1 ended normally, the Codex exec session and the agent's background full-v2 pipeline controller were killed (workers orphaned). The agent was not warned about this behaviour.", + "agent_response": "Diagnosed within ~3 min (02:38:49-02:41:30Z), archived the attempt as interrupted, and from then on ran all long jobs through a setsid 'research_job.py' detached controller. Later 'write_stdin failed: Unknown process id' errors (Oct 24 05:05, 23:52; Oct 25 02:10, 02:57, 03:46, 04:02) only killed read-only observer sessions (turns 101/201/211/214/217/219 confirm all jobs live).", + "estimated_charged_time_lost_seconds": 1150, + "work_lost": "full-v2 replay at 3/125 windows (890,924 FFN calls, ~955 s GPU); abandoned rather than recomputed because v3/v4 superseded it.", + "affects_published_results": false, + "notes": "Arguably shared responsibility (agent launched without setsid), but the per-turn process model is ours and undocumented to the agent." + }, + { + "kind": "2 data/mount defect (cross-directory rename returns EXDEV on research mount)", + "ownership": "operator", + "when_charged_seconds": 2600, + "evidence": [ + "turn 1 item_85 (early_gate.log: Triton cache write 'Invalid cross-device link' ... -> /workspace/research/cache/triton/...)", + "turn 1 item_87 (agent probe: 'same parent rename passed; cross parent [Errno 18] Invalid cross-device link ... devices 3700557221 3700557221')", + "turn 1 item_86/item_88 (agent message; local_triton_cache.py added)", + "turn 1 item_41 (df shows /workspace/research on weka /run-state)" + ], + "what_happened": "The persistent research directory (Weka) rejects rename() across parent directories even on the same device, which broke Triton's default kernel-cache commit and crashed the agent's first reconstruction probe.", + "agent_response": "Wrote a local Triton cache shim and moved caches; re-ran the probe. ~15 items inside turn 1.", + "estimated_charged_time_lost_seconds": 400, + "work_lost": "one short smoke probe rerun", + "affects_published_results": false, + "notes": "Minor; the same quirk is why the agent later noted the workspace is reachable via two paths (/workspace/research and /run-state/workspace/research)." + }, + { + "kind": "benign", + "ownership": "benign", + "when_charged_seconds": null, + "evidence": [ + "codex.stderr (3x 'missing field cmd' = model malformed tool call; models-cache parse error 2026-10-23T03:23; models refresh timeout 2026-10-24T16:55 with turn 164 starting 21 s after turn 163)", + "no capacity-retries.jsonl; quick_turns 0", + "traj index: 228 error items all the use_legacy_landlock deprecation notice", + "flagged commands: 'Permission denied' = reading /proc//fd of other processes (T49 item_20, T201 item_128); 'OOM' matches are the agent's own notes stating OOM-kill 0" + ], + "what_happened": "No API capacity retries, stream errors, OOM kills, CUDA/driver errors, missing packages or network blocks beyond the contracted no-network sandbox.", + "agent_response": "n/a", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "none", + "affects_published_results": false, + "notes": "Agent spent ~10 min (turns 165-173) releasing page cache because measured cgroup memory reached 233.5 GiB against the stated 224 GiB request; no OOM occurred (NOTES.md line 891), so this is caution, not a shortfall. The '200 GB development-storage guard' hit in turn 166 is the task's own runtime code (upstream/pathfinder/fetch_axonem.py LIMIT=200_000_000_000), task-design not operator." + } + ], + "environment_vs_spec": [ + { + "promised": "1x H100 (operator override of task's 8 GPUs)", + "observed": "1x NVIDIA H100 80GB HBM3, driver 570.124.06, CUDA 12.8; MPS with 4 workers worked throughout", + "evidence": "turn 1 item_5 nvidia-smi 01:29:03Z; gpu-access.json strict_allocation; preflight-result.json visible_gpus 1", + "material": false + }, + { + "promised": "22 CPUs requested", + "observed": "cpu_affinity_count 180 (agent self-limited to taskset -c 3-24)", + "evidence": "preflight-result.json; jobs/full-development-v5-failed-publication-stage-v1/controller.log affinity list", + "material": false + }, + { + "promised": "224 GiB RAM requested", + "observed": "cgroup memory.current reached 233.5 GiB (file cache) with OOM-kill 0; host shows 2.0 TiB", + "evidence": "NOTES.md line 891; turn 1 item_5 free -h", + "material": false + }, + { + "promised": "task.toml storage_mb 1,048,576 (1 TiB) writable research storage", + "observed": "research dir is on shared Weka that was 99% full at trial start (7.9T free of 440T), fell to 112 GiB then 31 GiB free, then ENOSPC killed container 4; preflights ran at 8.0/6.6/6.3/2.3 TiB free", + "evidence": "turn 1 item_41; turn 70-71 df and status JSON; storage-failure.log; attempts/*/preflight-result.json", + "material": true + }, + { + "promised": "Dockerfile python:3.11.13-slim, pinned requirements.lock (torch, triton, kimimaro...)", + "observed": "/usr/local/lib/python3.11 torch+triton present; no ModuleNotFoundError for task deps (single ModuleNotFoundError in T1 item_239 is the agent's own script log)", + "evidence": "tracebacks in turn 1 item_85; flagged-command index", + "material": false + }, + { + "promised": "no network (contract/task.toml)", + "observed": "network_blocked true, unix IPC ok; agent never needed network", + "evidence": "preflight-result.json", + "material": false + }, + { + "promised": "read-only data mounts training/validation/runtime; FPS kernel built for H100", + "observed": "development_mounts present, data_readonly true, fps_cuda_abi_ok true; gpu-check passed", + "evidence": "preflight-result.json; remaining-preparation-20261022a/.../gpu-check.json", + "material": false + }, + { + "promised": "persistent research files survive restarts", + "observed": "true, but /workspace/research rejects cross-directory rename (EXDEV) and container-local /workspace/submission-* staging dirs are lost on restart (agent re-created from protected copies)", + "evidence": "turn 1 item_87; turn 72 item_15", + "material": false + } + ], + "budget_awareness": "By task design the agent is not told the 48 h budget (task.toml comment) and CONTINUE prompts carry no remaining-time figure. The three key-replacement notices did state remaining seconds (155,878 / 152,641 / 151,649; recorded verbatim in NOTES.md lines 219/235) and these matched research-state.json; the storage-recovery notice omitted the figure. The agent never reasoned about global remaining time in any of 2,838 messages (only per-stage FFN caps), launched a 9,000 s CPU job at 06:52:55Z nine seconds before cutoff, and its v10 full replay was at 3/125 windows at the end. No contradiction between status files: research-state/status/trial agree (elapsed 172800, attempt 5, turns 228, error null) and the frozen submission's four files sha256-match snapshot 164218-6f223ba6 (package.json 87b4d5ec..., published 2026-10-25T04:29:31Z as full v8, nERL 0.0076677).", + "total_estimated_operator_caused_loss_seconds": 11455, + "verdict": "minor (disclose)", + "verdict_reasoning": "The trial reached the full 172,800 charged seconds with an intact, snapshot-verified submission, and no environment/package/GPU defect was found. However, four operator-side container deaths occurred: three operator-initiated API-key pauses within 78 minutes on Oct 22 that each killed the same long single-GPU full replay (losing ~1.65M, ~2.69M and ~0.78M in-flight FFN calls), and the Oct 23 shared-Weka ENOSPC that killed the v5 replay at 28/125 windows after 2 h (~1.5M calls lost, 97 windows recomputed, staged package lost). Adding the turn-boundary kill of the full-v2 replay, the EXDEV Triton workaround and pre-outage storage workarounds, about 11,400 charged seconds (~3.2 h, 6.6% of the budget) of GPU work and re-verification were operator-caused; the agent's recoveries were fast (4-7 min each) and byte-verified. The published v8 package was not corrupted and the next candidate (v10) could not have completed even with the lost time returned, so published results are not affected, but the loss is well above ordinary friction and should be disclosed.", + "recommended_remedy": "disclose", + "open_questions": [ + "Whether a ~6.6% charged-time loss with no effect on the published package meets this review's threshold for 'material' rather than 'minor'.", + "Whether the operator's preflight should have refused to start container 4 at 2.3 TiB shared free space given the trial's own ~228 GB research footprint plus other concurrent runs.", + "Exact calls at the moment of each kill are interpolated from the last status heartbeat (<=3 min before death); losses could be ~5% higher." + ] +} \ No newline at end of file diff --git a/reviews/fairness-20261031/per-task/molecular-pretraining-transfer.json b/reviews/fairness-20261031/per-task/molecular-pretraining-transfer.json new file mode 100644 index 0000000000000000000000000000000000000000..6f65db8c137b6d7c83cf61aa7124fceb25bc8e45 --- /dev/null +++ b/reviews/fairness-20261031/per-task/molecular-pretraining-transfer.json @@ -0,0 +1,209 @@ +{ + "task": "molecular-pretraining-transfer", + "run_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/molecular-pretraining-transfer-astra-xhigh-1h100-48h-20261023a", + "containers": 8, + "turns": 9, + "charged_seconds": 172800, + "research_state_error": null, + "completion_correction": "Original end-of-run state was phase=failed, error='No runnable infer.sh was published' (completion-correction/original-research-state.json, original-status.json; Beaker job 01M5WS4ZB8G7VP1ZYTZAB7X1AM exitCode 1 at 2026-10-26T21:03:16Z). The launcher's post-budget check looked for infer.sh, but this task's contract requires encoder.json + checkpoint.pt (runtime.py submission_entrypoint(); molecular_completion.py docstring: 'The old launcher incorrectly rejected an otherwise captured cutoff package'). The correction (receipt.json, schema molecular-cutoff-entrypoint-correction/v1, applied ~22:58 UTC Oct 26) restored /run-state/submission from snapshot 103193-4fdb6e6246f5 (sha256 4fdb6e62... == research-state.last_hash), set phase=complete, error=null, additional_research_seconds=0. It did NOT affect the agent: the check runs only after the clock stops; the trajectory contains no prompt or output telling the agent about infer.sh (the single 'infer.sh' mention is the agent reading the task file /workspace/evaluation/protocol/infer.sh, container 2 item_2897).", + "incidents": [ + { + "kind": "4 infrastructure interruption (operator pause)", + "ownership": "operator", + "when_charged_seconds": 85, + "evidence": [ + "operator-pause.json (recorded 2026-10-23T02:48:06Z, canceled by stevenc, exit 143)", + "operator-pause-request.json", + "recoveries/20261024T202752.282731Z/recovery.json (charged_elapsed_seconds 85.1, remaining 172714.9)", + "recovery-notice.txt", + "rollout user prompt 2026-10-24T20:30:01Z (first delivery of the notice)", + "trajectory container 1 items item_1..item_15 (lines 1-30)" + ], + "what_happened": "Original container ran 85 s (agent had read the contract and just launched train_smoke.sh) before the operator cancelled it to reduce the queued-task set / replace the API key. Resumed 2026-10-24T20:27Z in a new experiment (01M5QSJCAZ9GTSK9FCVP7WQ65A) with the same thread and a correct notice (172715 s remain).", + "agent_response": "Re-read notes/contract and restarted the smoke run (container 2 item_1-item_6); no confusion.", + "estimated_charged_time_lost_seconds": 250, + "work_lost": "A just-started smoke training run; negligible.", + "affects_published_results": false, + "notes": "Pause itself was uncharged (45 h offline); only the 85 s before it plus a few minutes of re-orientation were charged." + }, + { + "kind": "4 infrastructure interruption (six unplanned container restarts inside the resumed experiment)", + "ownership": "infrastructure", + "when_charged_seconds": [ + 69814, + 112800, + 122900, + 134900, + 155800, + 166100 + ], + "evidence": [ + "trajectory.jsonl thread.started at lines 10838, 17809, 18736, 20130, 21865, 22851 (item ids reset to item_0 at each)", + "attempts/002..007 preflight mtimes (Oct 25 15:54Z, Oct 26 03:53Z, 06:48Z, 10:11Z, 16:04Z) and run-root preflight-result.json (19:12Z); research-state.json attempt=8", + "rollout user prompts at 2026-10-25T15:54:38Z, 10-26T03:53:32Z, 06:48:55Z, 10:11:27Z, 16:04:26Z, 19:12:18Z", + "results/agent-activity-20261026/accounting-checks.json: attempt 2 ended 1792943529 (15:52:09Z), attempt 3 started 1792943678 (149 s gap)", + "completion-correction/receipt.json job_status: last job created 18:56:45Z, scheduled 19:10:01Z, started 19:12:07Z (container 7 died ~18:56Z)", + "codex.stderr 2026-10-26T19:12:26 write_stdin failed: Unknown process id 80872/17252", + "GPU UUID changed every container: a85d7506 (c2), 74db2bd3 (c3), 3452b743 (c4), ca5b232f (c6), b4b531af (c8, gpu-access.json)", + "agent notes: NOTES.md:1877 (15:57Z 'Operator pause killed all prior processes; /tmp corpus cache absent'), STATUS.md:446-449 ('operator/container restart ended ALL processes'), STATUS.md:556 (06:56Z recovery2), :702-707 (10:23Z 'SECOND infrastructure recovery'), :789-793 (16:04Z 'operator reset confirmed'), :843-845 (19:15Z 'Operator recovery1912'); container 3 item_10/item_24; container 8 item_8", + "container 3 tail (line 17808): 120-expanded run at num_updates=5000 and two fine-tunes launched 03:47:34Z just before death; container 5 tail (line 20126): fresh30k at 24,800 at 10:08:08Z; container 6 tail: serial13 at 20,700 at 16:00:14Z; container 7 tail: fine-tunes at epoch 3-4 at 18:55:41Z" + ], + "what_happened": "The Beaker job was killed and auto-resumed six times (each time on a different node/GPU). Every restart killed all agent processes (GPU pretraining run, the two concurrent fixed fine-tunes, CPU caches/controllers) and wiped the container-local /tmp, including the agent's verified ~200 GB local LMDB corpus copy (built in container 2 because 'storage waits remain substantial' on the Weka mount, container 2 item_2080). Work lost: R1 (15:52Z Oct 25) 700 updates of the 180k run + 2 fine-tunes; R2 (03:51Z Oct 26) ~5,000 updates of the 120-expanded 30k run (launched 03:36:58Z, restarted from scratch 04:06:29Z) + 2 fine-tunes; R3 (~06:45Z) >=1,700 parity updates (STATUS.md:637) + Efflux/MPPB fine-tunes; R4 (~10:08Z) 1,000 fresh30k updates + alpha/CV fine-tunes; R5 (~16:00Z) 700 serial13 updates; R6 (~18:56Z) two fine-tunes at epoch 6/15 + an unsaved CPU feature extraction. Before the GPU trainer could resume, the agent had to re-copy and hash-verify the corpus each time (resume at 04:06:29Z, 06:58:03Z, 10:21:42Z, ~16:12Z, 19:19Z; R1 main resumed after 16:05Z), and spent 15-30 min per restart auditing checkpoints/process identities and re-creating its controllers (recovery_20261025_1554, recovery_20261026_0353/_0652/_1011/_1604/_1912).", + "agent_response": "Handled carefully: archived interrupted logs, verified checkpoints, restored the corpus, replayed interrupted fixed fine-tunes from scratch (protocol has no resumable fine-tune), never duplicated jobs, never fabricated results. It mis-attributed every restart to an 'operator pause' because of the re-delivered notice (see next incident).", + "estimated_charged_time_lost_seconds": 7200, + "work_lost": "About 9,100 pretraining updates re-run (~35 min GPU), ~10 interrupted fine-tunes replayed (~40 min of shared-GPU time), six corpus restores (~60 min GPU-idle for the main trainer), plus ~1.5 h of agent attention on recovery bookkeeping (partly overlapping). Each restart also added a 10 s heartbeat penalty (runtime.py load_research_state).", + "affects_published_results": false, + "notes": "Gaps between death and replacement (2-13 min) were not charged. The cause of the deaths is not recorded in the run root (only the final job is in receipt.json; no recovery folders because autoResume kept the same experiment). Last publication (snapshot 103193 = 01:11Z Oct 26) predates R2-R6; every later candidate (restart120, 120-expanded, readout, parity, similarity, fresh30k) was rejected by the agent's own full-24 reviews (STATUS.md:672, 692, 732, 757; CURRENT.md:103-106), so the restarts delayed but did not change the published package." + }, + { + "kind": "5/7 runner prompt problem: stale recovery notice with wrong remaining-budget re-delivered on every restart", + "ownership": "operator", + "when_charged_seconds": [ + 69814, + 112800, + 122900, + 134900, + 155800, + 166100 + ], + "evidence": [ + "runner/beaker/runtime.py lines 570-571 (notice read from STATE/recovery-notice.txt at every research() start) and 629-631 (appended to the first prompt of each container); file is never removed: recovery-notice.txt still present (mtime Oct 24 13:27 PDT)", + "rollout user prompts at 2026-10-25T15:54:38Z, 10-26T03:53:32Z, 06:48:55Z, 10:11:27Z, 16:04:26Z, 19:12:18Z each contain verbatim: 'The operator paused this trial to replace its API credentials ... 172715 research seconds remain at recovery.'", + "agent record container 3 (rollout L28382, 16:03Z Oct 25): STATUS.md header 'User reported172715 research seconds remaining at latest operator recovery15:54UTC' (true remaining ~102,980 s)", + "workspace/research/recovery_20261026_1912/infrastructure_interruption.json (19:13:28Z): 'reason': 'Operator-reported credential pause', 'research_seconds_remaining_as_reported': 172715 (true remaining ~6,590 s)", + "CURRENT.md (20:48/20:55Z): 'CONTINUOUS RESEARCH, no final handoff'; plan = three 30k-update arms + 3x24 fine-tunes + joint review before any publication, with ~15 min of budget left" + ], + "what_happened": "The one-time pause notice (correct on 2026-10-24) was appended again to the agent's prompt at all six unplanned restarts, telling it (a) that the operator had paused it for a credential swap (false) and (b) that 172,715 research seconds remained (false: 102,980 / 60,000 / 49,900 / 37,900 / 17,000 / 6,650 s actually remained). The runtime itself gives no other remaining-time information.", + "agent_response": "Believed it: it logged each restart as an operator pause and, at least twice, explicitly recorded 172715 s as the remaining budget. Its earlier correct budget reasoning (NOTES.md:1712 at 12:14Z Oct 25: 'fits remaining ~32h'; container 2 item_4827/item_5496) was never repeated after the first restart. In its last 1.8 h it started a multi-hour three-arm experiment that could not finish (the training was at 4,100/30,000 updates when the clock stopped).", + "estimated_charged_time_lost_seconds": null, + "work_lost": "No artifact lost. The final ~100 charged minutes were spent on an experiment that could never complete under the real deadline; under the 'there is no end point' design that is expected behavior, so it is not counted as operator loss, but the agent's decisions in that window were made on false information.", + "affects_published_results": false, + "notes": "task.toml says the agent 'is not told' its budget, yet the runner told it a (wrong) number six times. The one-time (capacity-retry) re-prompt at 20:51:47Z correctly carried only the CONTINUE text. Fix for future runs: consume/rename recovery-notice.txt after first use, or regenerate it with the true remaining seconds at each container start." + }, + { + "kind": "6 API-side failure charged to the clock (model at capacity)", + "ownership": "infrastructure", + "when_charged_seconds": 172080, + "evidence": [ + "capacity-retries.jsonl (unix 1793047876.96 = 2026-10-26T20:51:16Z, turn 8, retry 1, delay 30 s)", + "trajectory.jsonl line 23704 turn.failed 'Selected model is at capacity', line 23705 thread.started (container 8, second Codex process)", + "codex.stderr 2026-10-26T20:54:24 write_stdin failed: Unknown process id 18591", + "CURRENT.md:1-3 'RECOVERY 20:55: prior18591 ended with unknown terminal; no checkpoint before1600 logged updates'; STATUS.md:885, :889; container 9 item_3 (production_launch.json 20:48:20Z actual_exec_session 18591)" + ], + "what_happened": "Codex exited on an OpenAI capacity error; the runtime slept 30 s (charged) and relaunched the thread. Because the agent ran its production trainer inside a Codex exec_command session (18591), the Codex exit also killed the trainer at ~1,600 updates before its first checkpoint.", + "agent_response": "Detected the dead session within ~3 min, preserved logs, relaunched the exact recipe (session 81594) at 20:55Z, verified the 2k checkpoint at 20:59Z, reached 4,100 updates by 21:03Z (budget end).", + "estimated_charged_time_lost_seconds": 450, + "work_lost": "~1,600 pretraining updates (~3 min) + 30 s retry + ~4 min recovery, in the final 12 minutes.", + "affects_published_results": false, + "notes": "Only capacity event of the run." + }, + { + "kind": "benign/unattributed: unexplained SIGTERM to one trainer mid-container", + "ownership": "benign", + "when_charged_seconds": 92200, + "evidence": [ + "container 3 item_1909 (agent message: 'ended unexpectedly with SIGTERM near 9,800 updates'), item_1912 (record: observed_exit 143, cause 'Unknown; no requested stop or agent signal', saved 9000, logged 9800, original_session 84190, cgroup oom_kill 0)", + "STATUS.md:213 'Original unexplained SIGTERM143 at ~9800; recovered 9k then finished 10k'" + ], + "what_happened": "At 2026-10-25T22:11Z the response-arm trainer (launched inside Codex exec session 84190) received SIGTERM with no container restart, no OOM and no agent kill. Possibly Codex exec-session lifecycle; could not be attributed from the run root.", + "agent_response": "Resumed from the 9,000-update checkpoint with the same recipe, recorded the FP16-resume caveat.", + "estimated_charged_time_lost_seconds": 450, + "work_lost": "800 updates (~2.5 min) plus resume/audit time; one matched-comparison arm carries a documented restart caveat.", + "affects_published_results": false, + "notes": "Not counted in the operator total. The other 44 exit-143 commands are the agent's own foreground monitors/drivers killed by the Codex tool timeout (e.g. container 2 item_14, item_947, item_2250), a model-side pattern." + }, + { + "kind": "7 budget/bookkeeping error after the clock stopped (wrong entrypoint check)", + "ownership": "operator", + "when_charged_seconds": 172800, + "evidence": [ + "completion-correction/original-research-state.json (phase failed, error 'No runnable infer.sh was published')", + "completion-correction/receipt.json (job 01M5WS4ZB8G7VP1ZYTZAB7X1AM exitCode 1; snapshot 103193-4fdb6e6246f5; required_entrypoint encoder.json; additional_research_seconds 0)", + "runner/beaker/runtime.py research(): 'if not (src / submission_entrypoint()).is_file(): failure = ... No runnable ...'", + "runner/beaker/molecular_completion.py docstring", + "publication-storage.json restored_sha256 4fdb6e62... == research-state.last_hash; submission/ contains encoder.json, checkpoint.pt, user_dir/" + ], + "what_happened": "The launcher image's end-of-run check demanded infer.sh for a task whose contract specifies encoder.json, so the completed trial was recorded as failed and the Beaker job exited 1. Corrected post hoc by molecular_completion.py without rerunning research.", + "agent_response": "None; the agent never saw it (check runs after stop_research()).", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "None; the cutoff package was captured intact.", + "affects_published_results": false, + "notes": "Pure bookkeeping; the restored submission hash equals the last snapshot." + }, + { + "kind": "benign: environment signals checked and dismissed", + "ownership": "benign", + "when_charged_seconds": null, + "evidence": [ + "GPU OOM in the agent's own compact_calibrated30k run (container 2 item_1216, oom_restart20 record item_1228) at its chosen batch; cgroup memory.events oom_kill 0 at every read (container 2 item_978, item_1516, item_1740, item_2319, item_3072; container 3 item_1367, item_2180, item_2321; container 5 item_167)", + "ModuleNotFoundError: matplotlib (container 2 item_146, item_1829, item_3373, item_3671, item_4626, item_5070; container 3 item_1453; container 5 item_262; container 7 item_203) - not in the task Dockerfile; agent rendered figures with Pillow (STATUS.md:662)", + "ModuleNotFoundError unimol2/tasks (container 2 item_1083, container 3 item_2317, item_3322) - path/user-dir usage, matches Dockerfile (Uni-Mol is cloned, not pip-installed)", + "exit 127: rsvg-convert, py-spy, gdb absent (container 2 item_3376; container 5 item_170/171) - not promised", + "Permission denied: rg over /run-state root-owned dirs while searching for AGENTS.md (container 6 item_711)", + "codex.stderr: 1 apply_patch verification failure (model-side stale patch), 1 'failed to refresh available models: request timed out', 7 write_stdin-to-dead-session errors (consequence of restarts)", + "preflight.jsonl item_0 '[features].use_legacy_landlock is deprecated' at every start (harmless)" + ], + "what_happened": "None of these were operator defects.", + "agent_response": "Corrected in seconds or worked around.", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "None", + "affects_published_results": false, + "notes": "" + } + ], + "environment_vs_spec": [ + { + "promised": "1x H100 80GB (disclosed override of the task's 8 GPUs)", + "observed": "1 visible NVIDIA H100 80GB HBM3, driver 570.124.06, CUDA 12.8, cuda_ok; landlock-isolated single device (gpu-access.json, preflight-result.json; container 2 item_3 nvidia-smi)", + "evidence": "preflight-result.json, gpu-access.json, container 2 item_3, container 4 item_3", + "material": false + }, + { + "promised": "22 CPUs (requested)", + "observed": "No cgroup CPU quota (cpu.max 'max 100000', nr_throttled 0), cpu_affinity_count 180; agent measured 8-11 cores in use", + "evidence": "preflight-result.json; container 2 item_1516, item_1930, item_2070, item_2318", + "material": false + }, + { + "promised": "224 GiB RAM", + "observed": "cgroup memory.max 250,720,165,888 B (233.5 GiB); memory.current often at the cap but ~223 GiB of it page cache (anon 4-6 GiB); oom_kill 0 throughout; node had 2 TiB", + "evidence": "container 2 item_1516, item_1520, item_2318, item_3072/3073, item_5451; container 3 item_1364-1367", + "material": false + }, + { + "promised": "task.toml storage 1 TiB; persisted research workspace", + "observed": "Local overlay 14 TB (9-13 TB free); Weka /run-state 440 TB at 95-99% full (25 TB -> 5.3 TB free over the run) but no ENOSPC; /tmp is container-local and wiped at every restart (the agent's 200 GB local corpus copy had to be rebuilt 6 times); agent reported 'substantial storage waits' reading LMDB from Weka", + "evidence": "container 1 item_11 (100% at Oct 23), container 2 item_473, item_1275, item_1993, item_2080, item_5450; container 4 item_56; container 9 item_44", + "material": false + }, + { + "promised": "Dockerfile: pytorch 2.4.0/cu12.1, Python 3.11, Uni-Core ace6fae (installed), Uni-Mol 90f52c4 at /opt/Uni-Mol, rdkit/lmdb/pandas/sklearn/numba", + "observed": "Python 3.11 at /opt/conda, unicore-0.0.1 egg installed, /opt/Uni-Mol/unimol2 present, unicore-train usable; matplotlib absent (not promised)", + "evidence": "container 9 item_58; container 1 item_9-item_13; container 2 item_146", + "material": false + }, + { + "promised": "no network; development data read-only; evaluation roles absent", + "observed": "network_blocked/ipv4/ipv6 blocked, unix_ipc_ok; /workspace/data -> /task-data read-only (pretrain + downstream); evaluation_roles_absent true", + "evidence": "preflight-result.json; container 2 item_1995", + "material": false + }, + { + "promised": "task.toml: 'the agent is not told' its 48 h budget; recovery notice should state true remaining seconds", + "observed": "Agent was told '172715 research seconds remain' once correctly (Oct 24 20:30Z) and six more times incorrectly at each restart (true remaining 102,980 .. 6,650 s)", + "evidence": "see incident 3", + "material": true + } + ], + "budget_awareness": "Correct at first: from the Oct 24 notice the agent derived the real deadline (NOTES.md:1712 at 2026-10-25T12:14Z 'fits remaining ~32h' - true remaining 32.2 h; container 2 item_4827 '11 hours ... fits within the remaining research time', item_5496 'nine hours ... within the remaining budget'). Contradicted by us afterwards: at every unplanned restart the runner re-sent '172715 research seconds remain at recovery', and the agent recorded it as fact (STATUS.md header at 16:03Z Oct 25: 'User reported172715 research seconds remaining at latest operator recovery15:54UTC', true ~102,980 s; recovery_20261026_1912/infrastructure_interruption.json at 19:13Z Oct 26: research_seconds_remaining_as_reported 172715, true ~6,590 s). No remaining-time statement appears after the first restart; CURRENT.md at 20:55Z plans multi-hour work with 8 min left. The run ended at exactly 172,800 charged seconds (research-state.json, status.json) with the submission intact (last_hash 4fdb6e62... == snapshot 103193 == restored /run-state/submission); research-state.error is null after the entrypoint correction.", + "total_estimated_operator_caused_loss_seconds": 7900, + "verdict": "minor (disclose)", + "verdict_reasoning": "The environment met or exceeded every promise (1 H100 visible, no CPU quota vs 22 promised, 233 GiB cgroup vs 224 promised, zero OOM kills, no ENOSPC, image matches the Dockerfile). The real operator/infrastructure problems were: six unplanned container restarts in 48 h (lines 10838/17809/18736/20130/21865/22851) that each killed the agent's GPU run, its fine-tunes and its local corpus copy, costing roughly 2 h of charged time (~4.5% of budget) in re-copying, re-verifying and re-running ~9k updates plus ~10 fine-tunes; a runner bug that re-sent the one-time pause notice with '172715 research seconds remain' at all six restarts, which the agent demonstrably believed (its own records at 16:03Z Oct 25 and 19:13Z Oct 26), so its final hours were planned on a 48 h horizon it did not have; one 30 s capacity retry that also killed its production trainer 12 min before the end; and a post-budget infer.sh/encoder.json check bug that was corrected without touching research time. None of this altered the published package: the final submission is the 103,193 s snapshot published at 01:11Z Oct 26, before five of the six restarts, and every later candidate was rejected by the agent's own full 24-task reviews. The losses are real but bounded and did not cost a publication, so this is a disclose-level case rather than grounds for a rerun.", + "recommended_remedy": "disclose (and fix runtime.py so recovery-notice.txt is consumed after first use and any re-delivered notice states the true remaining seconds)", + "open_questions": [ + "Why did the Beaker job die six times between Oct 25 15:52Z and Oct 26 18:56Z (preemption of an 'urgent' job, node failures, or something in the runtime)? The run root has no per-job records for experiment 01M5QSJCAZ9GTSK9FCVP7WQ65A except the last job in completion-correction/receipt.json; Beaker job history is needed.", + "Was the 2026-10-25T22:11Z SIGTERM to the trainer in Codex exec session 84190 caused by Codex exec-session reaping (harness) or something else? Same mechanism may explain why the capacity-retry Codex restart killed session 18591.", + "Is 'substantial storage waits' on the Weka LMDB mount (which drove the agent to keep a 200 GB local copy that every restart destroyed) considered part of the intended environment? The data mount is on a filesystem that was 95-99% full for the whole run.", + "Should the agent be told remaining seconds at all (task.toml says no), and if so should other runs' restart prompts be checked for the same stale-notice bug (any run with a recovery-notice.txt and attempt > the recovery that created it)?" + ] +} \ No newline at end of file diff --git a/reviews/fairness-20261031/per-task/probabilistic-global-weather.json b/reviews/fairness-20261031/per-task/probabilistic-global-weather.json new file mode 100644 index 0000000000000000000000000000000000000000..ff63493e9b7a6f81c8dd226426149b61e684e8be --- /dev/null +++ b/reviews/fairness-20261031/per-task/probabilistic-global-weather.json @@ -0,0 +1,194 @@ +{ + "task": "probabilistic-global-weather", + "run_root": "/weka/oe-adapt-default/stevenc/science-speedrun-runs/probabilistic-global-weather-astra-xhigh-1h100-48h-20261024f", + "containers": 14, + "containers_note": "3 Beaker experiments (01M5QY04 preempted -> 01M5TFR6 auto-resumed 11 times within the same experiment -> 01M5ZQRX final 899 s) = 14 runtime.py invocations (research-state attempt=14, attempts/001-013 preflight archives). Every one of the 14 Codex turns ended by container death or budget end: trajectory.jsonl has 14 thread.started, 14 turn.started, 1 turn.failed (capacity) and ZERO turn.completed events.", + "turns": 14, + "charged_seconds": 172800, + "research_state_error": null, + "timeline_utc": [ + "A/attempt1 T1 2026-10-24 21:46:49 -> 10-25 ~15:20 hard-killed (status.json phase=running, elapsed 63163; recoveries/preemption-01M5QY04*/recovery.json). Uncharged gap 6.5 h; new experiment created 21:34, container up ~21:51.", + "B/attempt2 T2 21:51 -> 10-26 00:33 died; attempt3 T3 00:38 -> ~03:48 died; attempt4 T4 03:53 -> 06:37 died; attempt5 T5 06:43 -> 10:39 died; attempt6 T6 10:44 -> 14:31 died; attempt7 T7 14:57 -> 16:57 turn.failed 'model at capacity' (capacity-retries.jsonl, 30 s) + T8 16:57 -> 17:08 died; attempt8 T9 17:27 -> 19:29 died; UNCHARGED GAP 5.4 h; attempt9 T10 10-27 00:51 -> 02:58 died; attempt10 T11 03:12 -> 05:11 died; attempt11 T12 05:50 -> ~08:40 died; attempt12 T13 08:59 -> 11:51 died; attempt13 preflight 11:54 FAILED 'Insufficient research storage' (attempts/013/preflight.jsonl) -> job failed; uncharged gap 12 h.", + "C/attempt14 T14 2026-10-27 23:48:47 -> 10-28 00:03:25 (898.8 s remaining per recoveries/storage-preflight-20261027a/recovery.json); elapsed reached 172800; submission restored from snapshot 169524 (publication-storage.json, sha 8381ac7e... == research-state.last_hash)." + ], + "incidents": [ + { + "kind": "4 infrastructure interruptions (repeated container deaths)", + "ownership": "infrastructure", + "when_charged_seconds": "63178 (first death) then roughly every 7,000-14,000 charged s: ~72.8k, ~84k, ~94k, ~108k, ~121k, ~129k, ~136k, ~144k, ~151k, ~161k, ~171.9k", + "evidence": [ + "trajectory.jsonl lines 4726,5340,6009,6365,7444,8397,8992,9502,10123,10828,11831,12877 (thread.started, no preceding turn.completed)", + "T2 item_9, T3 item_6, T4 item_10 (nvidia-smi 0%/1MiB item_3), T5 item_9, T6 item_6, T7 item_25, T9 item_3, T10 item_16, T11 item_6, T12 item_5, T13 item_4, T14 item_6 (agent finds all training/eval processes gone each time)", + "T8 item_2 ps: docker-init etime 02:01:22; T10 item_4 ps: weather_broker.py etime 00:29 (fresh containers)", + "attempts/001..013 preflight archive mtimes; recoveries/preemption-01M5QY04Y8D8XQ5XRBGPCJ7FH3/recovery.json; workspace/research/experiment-00{2,3,6,7}/interruption-00{1,2,3}; RESEARCH.md lines 315-325, 377-381, 423-427, 477-481, 685-687, 806-812, 880-884, 938-948, 1046-1052, 1146-1148" + ], + "what_happened": "Twelve times the research container was hard-killed mid-turn (Beaker job priority urgent, minRuntime 2h, autoResume true; operator labeled the first one 'preemption'); median lifetime of attempts 2-12 was ~2.8 h. Each death killed the single-GPU WN2 training worker (or the development evaluation) the agent had running, and Codex was resumed with the plain CONTINUE prompt (no recovery-notice.txt exists).", + "agent_response": "Model-side mitigation was exemplary: strict checkpoint/Adam restoration under its original deadline, archived interruption records, history reconciliation, bitwise continuity audits, recovery launchers (recover_experiment_007_interruption_00{1,2,3}.py, retry_*.py, observe_completed_stage_reconciliation*.py). Typical time from container start to GPU training running again: 18 s (T9), 1.5 min (T12, T13), 3-6 min (T3, T4, T10), 10 min (T11, after two launcher mistakes), 4 min (T2, T7).", + "estimated_charged_time_lost_seconds": 16500, + "work_lost": "Partial updates/compiles lost at each kill (coarse 32/64 and 24/64 microbatches; native 48/64 ~300 s; AR2 48/64 ~670 s; AR2 compilation; AR7 first batch; AR8 first update ~20-30 min) ~3,000 s; checkpoint reload + XLA recompile/autotune + cold input reads after each restart (restarted updates 248 s vs 52 s, 1164 s vs 890 s, 3126 s) ~5,000 s; agent recovery/re-verification work ~4,500 s; two development evaluations interrupted (003: July forecast lost, July+October re-run, T5 items 9-28; 005: October lost and re-run, T6 items 6-33) ~4,000 s; 12x10 s heartbeat penalties. Bigger uncharged harm: the 6.5 h and 5.4 h outages consumed the agent's per-run 24 h training cap (starter README says interruptions count), so curricula were cut 456->428 updates (T2 items 22/35/38; RESEARCH.md 315-325) and 441->436 updates (analysis/experiment-006-third-interruption-budget-review.json: remaining 10.1 h vs 13.15 h needed).", + "affects_published_results": true, + "notes": "Charging itself was correct: the ~26 h of downtime between containers was not charged (sum of per-turn wall times ~= 172.8k s). The harm is lost GPU work, forced curriculum reductions and roughly 4.5 charged hours of recovery engineering on a task whose core artifact is a 20-24 h single-GPU training run." + }, + { + "kind": "3 resource shortfall / 2 mount defect (shared research storage exhausted)", + "ownership": "operator", + "when_charged_seconds": 171901, + "evidence": [ + "attempts/013/preflight.jsonl: AssertionError: Insufficient research storage", + "recoveries/storage-preflight-20261027a/{recovery.json,status.json}", + "attempts/*/preflight-result.json research_storage_free_bytes: 26.8 TB (10-24) -> 5.4 TB (10-26 20:11) -> 2.25 TB (22:47) -> 2.76 TB (10-27 01:55) -> <2 TiB at 11:54", + "T1 item_151 df: weka /run-state 440T size, 416T used, 25T avail (95%) at trial start" + ], + "what_happened": "The shared Weka volume hosting /workspace/research filled up (other jobs, incl. 9 sibling native-eval runs of this task) until the per-attempt storage probe (task_profiles storage_gib=2048) failed, which turned attempt 12's container death into a job failure; the operator relaunched 10.6 h later with 899 s left.", + "agent_response": "None possible (preflight happens before Codex). In the final 899 s the agent found its 56-member evaluation and rank diagnostic dead and relaunched them (T14 items 6-58); nothing could complete.", + "estimated_charged_time_lost_seconds": 900, + "work_lost": "In-flight 56-member streaming development evaluation of candidate 008 (second lead window) and the 6478/6560-panel rank diagnostic; the final 899 s were effectively useless.", + "affects_published_results": false, + "notes": "Submission 008 (published 11:11:51 UTC, 39 min before the death) survived intact (snapshot 169524 sha 8381ac7e... == final)." + }, + { + "kind": "1 environment/image defect (root-owned git checkouts fail Git safe.directory for uid 1000)", + "ownership": "operator", + "when_charged_seconds": 80, + "evidence": [ + "T1 item_19 (first training launch failed: CalledProcessError git rev-parse HEAD), item_21 ('fatal: detected dubious ownership in repository at /opt/weathernext'), item_22-24 (patch + resume ~21:50), item_31 (GIT_CONFIG env for /opt/weatherbenchX)", + "T6 item_224/227/229; T12 item_190/197; T14 item_37/48 (recurrence on /opt/weatherbenchX in CPU screens)", + "RESEARCH.md line 30, 769" + ], + "what_happened": "The image builds /opt/weathernext and /opt/weatherbenchX as root while the agent runs as uid 1000; the starter's train_stage.py and the evaluator's verify_metric_source() call `git rev-parse HEAD`, which fails with 'dubious ownership'. The very first training launch died on it and three later CPU diagnostics failed the same way.", + "agent_response": "Patched its copy of train_stage.py to pass `git -c safe.directory=...` and used GIT_CONFIG_* env vars; re-fixed in later scripts.", + "estimated_charged_time_lost_seconds": 600, + "work_lost": "None (restarted before any parameter update).", + "affects_published_results": false, + "notes": "Recurred because each fresh script had to carry the workaround; ~2-3 min each." + }, + { + "kind": "2 mount defect (XLA per-fusion autotune cache / cross-directory rename unsupported on the Weka research mount)", + "ownership": "operator", + "when_charged_seconds": 620, + "evidence": [ + "T1 item_72/item_77: XlaRuntimeError UNIMPLEMENTED ...jax-cache/xla_gpu_per_fusion_autotune_cache_dir/tmp/...; Invalid cross-device link (first gradient compile at ~21:57 after 411 s setup)", + "T1 item_74/75 (fix: JAX_PERSISTENT_CACHE_ENABLE_XLA_CACHES='' ; training resumed ~21:59:30)", + "T11 item_53: OSError [Errno 18] Invalid cross-device link on rename within /workspace/research (agent's archival helper)", + "RESEARCH.md lines 34, 54, 165, 946" + ], + "what_happened": "XLA's optional per-fusion autotune cache writes a temp file and links/renames it; the research mount (Weka, reached via the /workspace/research -> /run-state symlink) returns EXDEV, killing the first training attempt at its first compile. The same semantics broke a cross-directory rename in the agent's own recovery helper later.", + "agent_response": "Disabled only the optional XLA per-fusion autotune cache; kept the JAX persistent compilation cache (which works: 'saved compiler artifacts helped the restart reach GPU execution quickly' T3 item_20; inference 219 s -> 47 s with bundled cache) and replaced it with explicit autotune.pb dumps; switched the helper to copy+unlink.", + "estimated_charged_time_lost_seconds": 800, + "work_lost": "~12 min in T1 (setup/compile redone); ~2 min in T11. Did NOT make compilation caching unusable; it only forced re-autotuning on cold compiles, which added a few minutes to each of the 10 post-restart recompiles (counted in incident 1).", + "affects_published_results": false, + "notes": "The starter's train.py already anticipates EXDEV on overlayfs; the task expects a POSIX research disk." + }, + { + "kind": "1/5 environment vs task spec: user namespaces disabled; operator substituted a root-owned inference broker", + "ownership": "operator (disclosed adaptation)", + "when_charged_seconds": 330, + "evidence": [ + "T1 item_32: bwrap: No permissions to create new namespace", + "T1 items 35-56 (agent's own Landlock fallback fails CUDA init), item_57-59 (discovers /opt/speedrun/weather_broker.py, broker probe passes)", + "weather-broker.log = 'WEATHER_BROKER_READY' only; operator/weather_broker.py, weather_bootstrap.py, weather_namespace_adapter.py; adaptation.json; execution-boundary.patch", + "T1 item_254-256 (broker stages package files 0444; agent's cache copy made writable)" + ], + "what_happened": "README/contract promise Bubblewrap namespace isolation for the development evaluator; the Beaker host forbids unprivileged user namespaces. weather_bootstrap.py starts weather_broker.py as root before runtime.py; it listens on /run/weather-inference/broker.sock, copies the submission + public inputs to a staging dir (read-only, 0444/0555), runs infer.sh as UID 10001 under a Landlock/seccomp boundary and copies outputs back; /opt/weathernext/wn2/namespace_inference.py is replaced by the adapter so verify_case/development.py call the broker. The log only prints the ready line; broker errors are returned to callers as JSON, none logged.", + "agent_response": "Spent ~7 min (21:52-21:59) discovering the namespace failure and the broker, then used it for all development inference; added a chmod to its infer.sh cache copy because staged files are read-only (~2 min, 23:21-23:23).", + "estimated_charged_time_lost_seconds": 540, + "work_lost": "None", + "affects_published_results": false, + "notes": "Disclosed in adaptation.json; no broker failures found. Extra staging copies add per-inference overhead (disclosed limitation)." + }, + { + "kind": "6 API-side (capacity retry)", + "ownership": "operator", + "when_charged_seconds": 129000, + "evidence": [ + "capacity-retries.jsonl (turn 7, 30 s, 2026-10-26 16:56:55 UTC)", + "trajectory.jsonl line 8896-8900 (turn.failed 'Selected model is at capacity')", + "codex.stderr: 1 model-refresh timeout, 4 'missing field cmd' arg parse errors, 3 apply_patch verification failures, 2 write_stdin unknown pid" + ], + "what_happened": "One capacity failure ended turn 7; runtime slept 30 s and re-prompted (turn 8).", + "agent_response": "Resumed monitoring immediately.", + "estimated_charged_time_lost_seconds": 90, + "work_lost": "None", + "affects_published_results": false, + "notes": "codex.stderr apply_patch/arg errors are model-side (malformed patches/args), corrected within seconds; 'use_legacy_landlock deprecated' error item at each thread start is benign." + }, + { + "kind": "7 budget/timing: agent never told the 48 h budget or that restarts were occurring", + "ownership": "task-design + operator prompt", + "when_charged_seconds": null, + "evidence": [ + "tasks/.../task.toml comment: 'the agent is not told'", + "runtime.py CONTINUE prompt text (no remaining-time info); no recovery-notice.txt in run root", + "T14 item_1 ('I'll use those results to guide the next experiment') with 899 s left", + "grepmsg for remaining/budget: agent only reasons about its own per-run 24 h deadlines" + ], + "what_happened": "By design the agent is not told the trial budget; the runner also gave no notice after any of the 12 restarts, so the agent had to infer each interruption from missing processes and could not plan the last 899 s.", + "agent_response": "Inferred restarts from process tables; kept a conservative per-run 24 h cap counting downtime.", + "estimated_charged_time_lost_seconds": 0, + "work_lost": "Last 899 s unusable", + "affects_published_results": false, + "notes": "Bookkeeping consistent: research-state/status/trial agree (172800 s, attempt 14, turns 14, error null); preemption recovery elapsed 63177.9 vs status 63163 (+heartbeat); storage recovery remaining 898.8 s." + } + ], + "environment_vs_spec": [ + { + "promised": "1x H100 (disclosed override of 8)", + "observed": "NVIDIA H100 80GB HBM3, 1 visible, CUDA 12.8, driver 570.124.06", + "evidence": "T1 item_2 nvidia-smi; preflight-result.json; gpu-access.json", + "material": false + }, + { + "promised": "22 CPUs", + "observed": "sched affinity 180 CPUs visible (cpu_affinity_count 180); agent voluntarily pinned to cores 3-24", + "evidence": "preflight-result.json; T2 item_26 taskset; RESEARCH.md line 15", + "material": false + }, + { + "promised": "224 GiB RAM, 32 GiB shm", + "observed": "cgroup memory.max 250,720,149,504 B (233.5 GiB); memory.events max>0 from page-cache reclaim, oom/oom_kill 0 throughout; worker HWM 152 GiB", + "evidence": "T2 item_26; T1 item_151; RESEARCH.md 225, 791, 799", + "material": false + }, + { + "promised": "2 TiB research storage (task.toml storage_mb) on a writable POSIX disk", + "observed": "research dir is a symlink into a 440 TB shared Weka mount that was 95% full at start and dropped below 2 TiB free on 10-27 11:54 (preflight assertion failed); EXDEV on XLA autotune-cache link and on cross-directory rename", + "evidence": "T1 item_151 df; attempts/*/preflight-result.json; attempts/013/preflight.jsonl; T1 item_72; T11 item_53", + "material": true + }, + { + "promised": "Bubblewrap namespace isolation for development evaluation (README/contract)", + "observed": "unprivileged user namespaces disabled; operator broker (UID 10001 + Landlock + seccomp) substituted and disclosed", + "evidence": "T1 item_32; adaptation.json; operator/weather_broker.py", + "material": false + }, + { + "promised": "starter train.py/evaluate.py run as-is (git rev-parse of pinned repos)", + "observed": "/opt/weathernext and /opt/weatherbenchX root-owned -> Git 'dubious ownership' for uid 1000", + "evidence": "T1 item_21; T6 item_224; T12 item_190", + "material": true + }, + { + "promised": "no network", + "observed": "IPv4/IPv6 blocked (EPERM), AF_UNIX ok", + "evidence": "preflight-result.json", + "material": false + }, + { + "promised": "uninterrupted 48 h container (implicit)", + "observed": "12 container deaths in 48 charged hours; 74.3 h wall; ~26 h uncharged downtime", + "evidence": "see incident 1", + "material": true + } + ], + "budget_awareness": "The agent was never told the 48 h budget (task design) nor given any restart notice (no recovery-notice.txt; CONTINUE prompt only), and it never mentions the trial budget; it only tracked its own per-training-run 24 h caps (e.g., T3 item_63 '8.4 hours left before the original deadline', T12 item_24 'about 12 minutes before the original deadline'). It entered the final 899 s container believing it had time for the next experiment (T14 item_1). Operator bookkeeping is internally consistent: research-state.json, status.json and trial.json agree (elapsed 172800, attempt 14, turns 14, error null); recoveries record 63177.9 s at the preemption and 898.8 s remaining at the storage recovery; final submission sha 8381ac7e... equals the last snapshot (169524 s) and the publication-storage.json restore.", + "total_estimated_operator_caused_loss_seconds": 19400, + "verdict": "material (unfair)", + "verdict_reasoning": "The run's core activity is a ~20-24 h single-H100 WN2 training curriculum, yet the container was hard-killed 12 times in 48 charged hours (attempt lifetimes mostly 2-4 h; the trajectory contains no turn.completed at all), each time killing the GPU worker or the development evaluation. Beyond roughly 4.5-5.4 charged hours spent on partial-update loss, recompilation, re-verification and re-running interrupted evaluations (~19,000 s, ~11% of budget), the two long uncharged outages (6.5 h and 5.4 h) ate into the task's 24 h per-run training cap and forced the agent to cut its curricula from 456 to 428 and from 441 to 436 updates, so the published model trained less than the model intended. The shared Weka volume then filled below the 2 TiB probe threshold, which converted the twelfth death into a job failure and left only an unusable 899 s final turn. The image defects (root-owned git checkouts; EXDEV on the research mount) cost ~25 min and were worked around cleanly. The agent's own mistakes (two bad relaunch commands in T11, malformed patches) were minor and corrected in minutes; its checkpoint/recovery discipline kept the submission (008, 4-date dev reward 0.7014 vs 005 0.6969) valid, so the result stands but is a lower bound on what this model could do on a stable allocation.", + "recommended_remedy": "full rerun on a non-preemptible allocation with the research mount on a disk that supports rename/link semantics and has guaranteed free space; at minimum disclose the 12 interruptions and the curriculum reductions alongside the score", + "open_questions": [ + "Root cause of the 12 container deaths inside Beaker experiment 01M5TFR6870BT2VYWJ2D0HZCVS (preemption after minRuntime 2h vs node failures): no launch.log/Beaker event log is archived in the run root; only the first death is labeled 'preemption' by the operator.", + "Should operator downtime count against the task's 24 h per-training-run cap? The agent applied the starter README literally ('interruptions count'), which is why the outages translated into fewer training updates.", + "Run suffix 'f': no sibling directories *-20261024a..e exist; the operator's adapted-boundary validation on 10-24 (adapted-boundary-validation-20261024a/probabilistic-global-weather/boundary.log.attempt1-5, attempt1 ModuleNotFoundError adapted_boundary) went through five pre-clock iterations, consistent with a-e being uncharged validation launches rather than abandoned research trials, but this could not be confirmed from the filesystem.", + "What consumed the shared Weka volume between 10-26 20:11 (5.4 TB free) and 10-27 11:54 (<2 TiB): likely the parallel native-eval jobs for this task; the agent's own research directory size was not measured." + ] +} \ No newline at end of file diff --git a/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19-us b/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19-us new file mode 100644 index 0000000000000000000000000000000000000000..cbcbac1de175eedcf88f9a355853bbadca1c430c Binary files /dev/null and b/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19-us differ diff --git a/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19us b/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19us new file mode 100644 index 0000000000000000000000000000000000000000..cbcbac1de175eedcf88f9a355853bbadca1c430c Binary files /dev/null and b/shared/package-files/d6/d60192201c9d72dc0ecb4b9d51754632551ca3d1060a60f9a710950111511895/h19us differ diff --git a/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wy520-24 b/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wy520-24 new file mode 100644 index 0000000000000000000000000000000000000000..9bfbec7c3bf2f2f402d455d816db0dad483a9a8c Binary files /dev/null and b/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wy520-24 differ diff --git a/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wyse520-24 b/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wyse520-24 new file mode 100644 index 0000000000000000000000000000000000000000..9bfbec7c3bf2f2f402d455d816db0dad483a9a8c Binary files /dev/null and b/shared/package-files/d6/d60204d1c6facf9b83b6964a8df47e10b723d271615721353a942ac835a8d33a/wyse520-24 differ diff --git a/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/basic4 b/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/basic4 new file mode 100644 index 0000000000000000000000000000000000000000..c1ead3f9bed05026e5d0873da68c66595ac32118 Binary files /dev/null and b/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/basic4 differ diff --git a/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/mai b/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/mai new file mode 100644 index 0000000000000000000000000000000000000000..c1ead3f9bed05026e5d0873da68c66595ac32118 Binary files /dev/null and b/shared/package-files/d6/d6073d10c880d7f39c13f6c77d6418f6bc372adae5027eae6139c1680f28a6c9/mai differ diff --git a/shared/package-files/d6/d60e39a1cd75e59651dc27cc5b56c23ec785e404f3e177fa221dba351ab28dfb/decomp_cholesky.py b/shared/package-files/d6/d60e39a1cd75e59651dc27cc5b56c23ec785e404f3e177fa221dba351ab28dfb/decomp_cholesky.py new file mode 100644 index 0000000000000000000000000000000000000000..92545a5c6af5fe7a4de13f8746b96696d68b5bd2 --- /dev/null +++ b/shared/package-files/d6/d60e39a1cd75e59651dc27cc5b56c23ec785e404f3e177fa221dba351ab28dfb/decomp_cholesky.py @@ -0,0 +1,21 @@ +# This file is not meant for public use and will be removed in SciPy v2.0.0. +# Use the `scipy.linalg` namespace for importing the functions +# included below. + +from scipy._lib.deprecation import _sub_module_deprecation + + +__all__ = [ # noqa: F822 + 'cholesky', 'cho_factor', 'cho_solve', 'cholesky_banded', + 'cho_solve_banded', 'LinAlgError', 'get_lapack_funcs' +] + + +def __dir__(): + return __all__ + + +def __getattr__(name): + return _sub_module_deprecation(sub_package="linalg", module="decomp_cholesky", + private_modules=["_decomp_cholesky"], all=__all__, + attribute=name) diff --git a/shared/package-files/d6/d611a87944137b0e68d039c28cb579fa139f12e4a8206397181caae4aa403fb0/test_deprecate.py b/shared/package-files/d6/d611a87944137b0e68d039c28cb579fa139f12e4a8206397181caae4aa403fb0/test_deprecate.py new file mode 100644 index 0000000000000000000000000000000000000000..92f422b8269f5ddc6c15ab38ef38ef1d5743286d --- /dev/null +++ b/shared/package-files/d6/d611a87944137b0e68d039c28cb579fa139f12e4a8206397181caae4aa403fb0/test_deprecate.py @@ -0,0 +1,63 @@ +from textwrap import dedent + +import pytest + +from pandas.util._decorators import deprecate + +import pandas._testing as tm + + +def new_func(): + """ + This is the summary. The deprecate directive goes next. + + This is the extended summary. The deprecate directive goes before this. + """ + return "new_func called" + + +def new_func_no_docstring(): + return "new_func_no_docstring called" + + +def new_func_wrong_docstring(): + """Summary should be in the next line.""" + return "new_func_wrong_docstring called" + + +def new_func_with_deprecation(): + """ + This is the summary. The deprecate directive goes next. + + .. deprecated:: 1.0 + Use new_func instead. + + This is the extended summary. The deprecate directive goes before this. + """ + + +def test_deprecate_ok(): + depr_func = deprecate("depr_func", new_func, "1.0", msg="Use new_func instead.") + + with tm.assert_produces_warning(FutureWarning): + result = depr_func() + + assert result == "new_func called" + assert depr_func.__doc__ == dedent(new_func_with_deprecation.__doc__) + + +def test_deprecate_no_docstring(): + depr_func = deprecate( + "depr_func", new_func_no_docstring, "1.0", msg="Use new_func instead." + ) + with tm.assert_produces_warning(FutureWarning): + result = depr_func() + assert result == "new_func_no_docstring called" + + +def test_deprecate_wrong_docstring(): + msg = "deprecate needs a correctly formatted docstring" + with pytest.raises(AssertionError, match=msg): + deprecate( + "depr_func", new_func_wrong_docstring, "1.0", msg="Use new_func instead." + ) diff --git a/shared/package-files/d6/d617f6bdf5c9ff46889dc63e6d9320c794d74f3188e3d6027d5c42858aec2e7a/test_bisect_k_means.py b/shared/package-files/d6/d617f6bdf5c9ff46889dc63e6d9320c794d74f3188e3d6027d5c42858aec2e7a/test_bisect_k_means.py new file mode 100644 index 0000000000000000000000000000000000000000..799ddbc086ce0a14397fe5cb4aef607903c01228 --- /dev/null +++ b/shared/package-files/d6/d617f6bdf5c9ff46889dc63e6d9320c794d74f3188e3d6027d5c42858aec2e7a/test_bisect_k_means.py @@ -0,0 +1,158 @@ +import numpy as np +import pytest + +from sklearn.cluster import BisectingKMeans +from sklearn.metrics import v_measure_score +from sklearn.utils._testing import assert_allclose, assert_array_equal +from sklearn.utils.fixes import CSR_CONTAINERS + + +@pytest.mark.parametrize("bisecting_strategy", ["biggest_inertia", "largest_cluster"]) +@pytest.mark.parametrize("init", ["k-means++", "random"]) +def test_three_clusters(bisecting_strategy, init): + """Tries to perform bisect k-means for three clusters to check + if splitting data is performed correctly. + """ + X = np.array( + [[1, 1], [10, 1], [3, 1], [10, 0], [2, 1], [10, 2], [10, 8], [10, 9], [10, 10]] + ) + bisect_means = BisectingKMeans( + n_clusters=3, + random_state=0, + bisecting_strategy=bisecting_strategy, + init=init, + ) + bisect_means.fit(X) + + expected_centers = [[2, 1], [10, 1], [10, 9]] + expected_labels = [0, 1, 0, 1, 0, 1, 2, 2, 2] + + assert_allclose( + sorted(expected_centers), sorted(bisect_means.cluster_centers_.tolist()) + ) + assert_allclose(v_measure_score(expected_labels, bisect_means.labels_), 1.0) + + +@pytest.mark.parametrize("csr_container", CSR_CONTAINERS) +def test_sparse(csr_container): + """Test Bisecting K-Means with sparse data. + + Checks if labels and centers are the same between dense and sparse. + """ + + rng = np.random.RandomState(0) + + X = rng.rand(20, 2) + X[X < 0.8] = 0 + X_csr = csr_container(X) + + bisect_means = BisectingKMeans(n_clusters=3, random_state=0) + + bisect_means.fit(X_csr) + sparse_centers = bisect_means.cluster_centers_ + + bisect_means.fit(X) + normal_centers = bisect_means.cluster_centers_ + + # Check if results is the same for dense and sparse data + assert_allclose(normal_centers, sparse_centers, atol=1e-8) + + +@pytest.mark.parametrize("n_clusters", [4, 5]) +def test_n_clusters(n_clusters): + """Test if resulting labels are in range [0, n_clusters - 1].""" + + rng = np.random.RandomState(0) + X = rng.rand(10, 2) + + bisect_means = BisectingKMeans(n_clusters=n_clusters, random_state=0) + bisect_means.fit(X) + + assert_array_equal(np.unique(bisect_means.labels_), np.arange(n_clusters)) + + +def test_one_cluster(): + """Test single cluster.""" + + X = np.array([[1, 2], [10, 2], [10, 8]]) + + bisect_means = BisectingKMeans(n_clusters=1, random_state=0).fit(X) + + # All labels from fit or predict should be equal 0 + assert all(bisect_means.labels_ == 0) + assert all(bisect_means.predict(X) == 0) + + assert_allclose(bisect_means.cluster_centers_, X.mean(axis=0).reshape(1, -1)) + + +@pytest.mark.parametrize("csr_container", CSR_CONTAINERS + [None]) +def test_fit_predict(csr_container): + """Check if labels from fit(X) method are same as from fit(X).predict(X).""" + rng = np.random.RandomState(0) + + X = rng.rand(10, 2) + + if csr_container is not None: + X[X < 0.8] = 0 + X = csr_container(X) + + bisect_means = BisectingKMeans(n_clusters=3, random_state=0) + bisect_means.fit(X) + + assert_array_equal(bisect_means.labels_, bisect_means.predict(X)) + + +@pytest.mark.parametrize("csr_container", CSR_CONTAINERS + [None]) +def test_dtype_preserved(csr_container, global_dtype): + """Check that centers dtype is the same as input data dtype.""" + rng = np.random.RandomState(0) + X = rng.rand(10, 2).astype(global_dtype, copy=False) + + if csr_container is not None: + X[X < 0.8] = 0 + X = csr_container(X) + + km = BisectingKMeans(n_clusters=3, random_state=0) + km.fit(X) + + assert km.cluster_centers_.dtype == global_dtype + + +@pytest.mark.parametrize("csr_container", CSR_CONTAINERS + [None]) +def test_float32_float64_equivalence(csr_container): + """Check that the results are the same between float32 and float64.""" + rng = np.random.RandomState(0) + X = rng.rand(10, 2) + + if csr_container is not None: + X[X < 0.8] = 0 + X = csr_container(X) + + km64 = BisectingKMeans(n_clusters=3, random_state=0).fit(X) + km32 = BisectingKMeans(n_clusters=3, random_state=0).fit(X.astype(np.float32)) + + assert_allclose(km32.cluster_centers_, km64.cluster_centers_) + assert_array_equal(km32.labels_, km64.labels_) + + +@pytest.mark.parametrize("algorithm", ("lloyd", "elkan")) +def test_no_crash_on_empty_bisections(algorithm): + # Non-regression test for: + # https://github.com/scikit-learn/scikit-learn/issues/27081 + rng = np.random.RandomState(0) + X_train = rng.rand(3000, 10) + bkm = BisectingKMeans(n_clusters=10, algorithm=algorithm).fit(X_train) + + # predict on scaled data to trigger pathologic case + # where the inner mask leads to empty bisections. + X_test = 50 * rng.rand(100, 10) + labels = bkm.predict(X_test) # should not crash with idiv by 0 + assert np.isin(np.unique(labels), np.arange(10)).all() + + +def test_one_feature(): + # Check that no error is raised when there is only one feature + # Non-regression test for: + # https://github.com/scikit-learn/scikit-learn/issues/27236 + X = np.random.normal(size=(128, 1)) + BisectingKMeans(bisecting_strategy="biggest_inertia", random_state=0).fit(X) diff --git a/shared/package-files/d6/d61a25ad2b1d631a7512ca1adb27d11cb8e26250918b78d8672db25a6eb66155/alias.py b/shared/package-files/d6/d61a25ad2b1d631a7512ca1adb27d11cb8e26250918b78d8672db25a6eb66155/alias.py new file mode 100644 index 0000000000000000000000000000000000000000..e7b4d5456a7fa18d31d8ab4e9ef120b42e61ef13 --- /dev/null +++ b/shared/package-files/d6/d61a25ad2b1d631a7512ca1adb27d11cb8e26250918b78d8672db25a6eb66155/alias.py @@ -0,0 +1,78 @@ +from distutils.errors import DistutilsOptionError + +from setuptools.command.setopt import edit_config, option_base, config_file + + +def shquote(arg): + """Quote an argument for later parsing by shlex.split()""" + for c in '"', "'", "\\", "#": + if c in arg: + return repr(arg) + if arg.split() != [arg]: + return repr(arg) + return arg + + +class alias(option_base): + """Define a shortcut that invokes one or more commands""" + + description = "define a shortcut to invoke one or more commands" + command_consumes_arguments = True + + user_options = [ + ('remove', 'r', 'remove (unset) the alias'), + ] + option_base.user_options + + boolean_options = option_base.boolean_options + ['remove'] + + def initialize_options(self): + option_base.initialize_options(self) + self.args = None + self.remove = None + + def finalize_options(self): + option_base.finalize_options(self) + if self.remove and len(self.args) != 1: + raise DistutilsOptionError( + "Must specify exactly one argument (the alias name) when " + "using --remove" + ) + + def run(self): + aliases = self.distribution.get_option_dict('aliases') + + if not self.args: + print("Command Aliases") + print("---------------") + for alias in aliases: + print("setup.py alias", format_alias(alias, aliases)) + return + + elif len(self.args) == 1: + (alias,) = self.args + if self.remove: + command = None + elif alias in aliases: + print("setup.py alias", format_alias(alias, aliases)) + return + else: + print("No alias definition found for %r" % alias) + return + else: + alias = self.args[0] + command = ' '.join(map(shquote, self.args[1:])) + + edit_config(self.filename, {'aliases': {alias: command}}, self.dry_run) + + +def format_alias(name, aliases): + source, command = aliases[name] + if source == config_file('global'): + source = '--global-config ' + elif source == config_file('user'): + source = '--user-config ' + elif source == config_file('local'): + source = '' + else: + source = '--filename=%r' % source + return source + name + ' ' + command diff --git a/shared/package-files/d6/d61cbc9dfcc6668ecbad20a8bfd94b72662f2caf744c8f6e85e11c1749207480/CUDAGeneratorImpl.h b/shared/package-files/d6/d61cbc9dfcc6668ecbad20a8bfd94b72662f2caf744c8f6e85e11c1749207480/CUDAGeneratorImpl.h new file mode 100644 index 0000000000000000000000000000000000000000..2fe8a6f6c8f4fe9ac6a8bc8f78c145ae48e15c9c --- /dev/null +++ b/shared/package-files/d6/d61cbc9dfcc6668ecbad20a8bfd94b72662f2caf744c8f6e85e11c1749207480/CUDAGeneratorImpl.h @@ -0,0 +1,138 @@ +#pragma once + +#include +#include +#include +#include +#include + +namespace at { +/** + * Note [CUDA Graph-safe RNG states] + * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * + * Strategy: + * ~~~~~~~~~ + * (It helps to look at + * cuda/detail/PhiloxCudaStateRaw.cuh and + * cuda/detail/UnpackRaw.cuh + * while you read this.) + * + * A CUDA graph containing multiple RNG ops behaves like a + * single giant kernel from the perspective of ops external + * to the graph. During graph capture, logic in CUDAGeneratorImpl + * records the total of all offset increments that occur in the + * graphed region, and records the final total as the offset for + * the entire graph. + * + * When the graph reruns, the logic that reruns it + * increments this device's CUDA generator's offset + * by that total. + * + * Meanwhile, within the graph, at capture time, instead of + * populating PhiloxCudaStates with the uint64_t offset pulled + * directly from the global state, PhiloxCudaState uses a pointer + * to a one-element stream-local int64_t device tensor + * holding an initial offset value, and a uint64_t holding an + * intra-graph offset. (The intra-graph offset starts from zero + * when capture begins.) In each consumer kernel, + * at::cuda::philox::unpack computes the offset to use for this kernel + * as intra-graph offset + *initial offset. + * + * When the graph reruns, the logic that reruns it first + * fill_s the initial offset tensor with this device's + * CUDA generator's current offset. + * + * The control flow above ensures graphed execution is bitwise + * identical to eager execution as long as RNG ops are enqueued + * from a single thread, even if RNG ops and graphs containing + * RNG ops are enqueued and run simultaneously on multiple streams. + * + * Usage: + * ~~~~~~ + * PhiloxCudaState in this file, and unpack() in + * cuda/CUDAGraphsUtils.cuh allow non-divergent use of + * CUDAGeneratorImpl whether graph capture is underway or not. + * + * Each PhiloxCudaState instance should be used for one and only one + * consumer kernel. + * + * Example (see e.g. native/cuda/Dropout.cu): + * + * #include + * #include + * + * __global__ void kernel(..., PhiloxCudaState philox_args) { + * auto seeds = at::cuda::philox::unpack(philox_args); + * IndexType idx = blockIdx.x * blockDim.x + threadIdx.x; + * curandStatePhilox4_32_10_t state; + * curand_init(std::get<0>(seeds), // seed + * idx, // per-thread subsequence + * std::get<1>(seeds), // offset in subsequence + * &state); + * ... + * } + * + * host_caller(...) { + * PhiloxCudaState rng_engine_inputs; + * { + * // See Note [Acquire lock when using random generators] + * std::lock_guard lock(gen->mutex_); + * + * // gen could be HostState or DevState here! No divergent code needed! + * rng_engine_inputs = gen->philox_cuda_state(offset_increment); + * } + * kernel<<<...>>>(..., rng_engine_inputs); + * } + * + */ + +struct TORCH_CUDA_CPP_API CUDAGeneratorImpl : public c10::GeneratorImpl { + // Constructors + CUDAGeneratorImpl(DeviceIndex device_index = -1); + ~CUDAGeneratorImpl() override = default; + + // CUDAGeneratorImpl methods + std::shared_ptr clone() const; + void set_current_seed(uint64_t seed) override; + void set_offset(uint64_t offset) override; + uint64_t get_offset() const override; + uint64_t current_seed() const override; + uint64_t seed() override; + void set_state(const c10::TensorImpl& new_state) override; + c10::intrusive_ptr get_state() const override; + void set_philox_offset_per_thread(uint64_t offset); + uint64_t philox_offset_per_thread() const; + void capture_prologue(int64_t* seed_extragraph, int64_t* offset_extragraph); + uint64_t capture_epilogue(); + PhiloxCudaState philox_cuda_state(uint64_t increment); + + bool reset_rnn_state() { + return !no_reset_rnn_state_.test_and_set(); + } + + // Temporarily accommodates call sites that use philox_engine_inputs. + // Allows incremental refactor of call sites to use philox_cuda_state. + std::pair philox_engine_inputs(uint64_t increment); + + static c10::DeviceType device_type(); + +private: + CUDAGeneratorImpl* clone_impl() const override; + uint64_t seed_ = default_rng_seed_val; + uint64_t philox_offset_per_thread_ = 0; + int64_t* seed_extragraph_{}; + int64_t* offset_extragraph_{}; + uint32_t offset_intragraph_ = 0; + bool graph_expects_this_gen_ = false; + std::atomic_flag no_reset_rnn_state_; +}; + +namespace cuda::detail { + +TORCH_CUDA_CPP_API const Generator& getDefaultCUDAGenerator( + DeviceIndex device_index = -1); +TORCH_CUDA_CPP_API Generator createCUDAGenerator(DeviceIndex device_index = -1); + +} // namespace cuda::detail +} // namespace at diff --git a/shared/package-files/d6/d61cbd1738894ba8f836c0545ff843b578996848c9aca201b2ba8882dea2be43/_semi_structured_conversions.py b/shared/package-files/d6/d61cbd1738894ba8f836c0545ff843b578996848c9aca201b2ba8882dea2be43/_semi_structured_conversions.py new file mode 100644 index 0000000000000000000000000000000000000000..c487b151495df9b1a4e6b7a7ca553277a0586bc8 --- /dev/null +++ b/shared/package-files/d6/d61cbd1738894ba8f836c0545ff843b578996848c9aca201b2ba8882dea2be43/_semi_structured_conversions.py @@ -0,0 +1,275 @@ +import torch + + +# This is PyTorch implementation of main part of reorder_meta() +# function, from tools/util/include/cutlass/util/host_reorder.h file +# of CUTLASS source tree. Furthermore, CUTLASS template for sparse +# GEMM decides upon layout of this matrix, and at the moment for the +# sparse GEMM executed on tensor cores, this is layout described by +# ColumnMajorInterleaved<2> data structure, in +# include/cutlass/layout/matrix.h of CUTLASS source tree. The +# reordering of meta matrix into meta_reordered matrix calculated +# according to these segments of CUTLASS code is re-implemented here. +# Note that this calculation produces offsets for scattering metadata +# matrix elements into reordered metadata matrix elements (or, +# equivalently, for gathering reordered metadata matrix element back +# into metadata matrix elements). +def _calculate_meta_reordering_scatter_offsets(m, meta_ncols, meta_dtype, device): + dst_rows = torch.arange(0, m, device=device)[:, None].repeat(1, meta_ncols) + dst_cols = torch.arange(0, meta_ncols, device=device).repeat(m, 1) + + # Reorder the rows, then swizzle the 2x2 blocks. + group = 32 if meta_dtype.itemsize == 2 else 16 + interweave = 4 if meta_dtype.itemsize == 2 else 2 + dst_rows = ( + dst_rows // group * group + + (dst_rows % 8) * interweave + + (dst_rows % group) // 8 + ) + + topright = ((dst_rows % 2 == 0) & (dst_cols % 2 == 1)).to(torch.int8) + bottomleft = ((dst_rows % 2 == 1) & (dst_cols % 2 == 0)).to(torch.int8) + dst_rows += topright - bottomleft + dst_cols -= topright - bottomleft + + # Assumed that meta tensor is to be stored in CUTLASS + # InterleavedColumnMajor layout, and reverse engineered + # corresponding code to store values into this tensor. + interleave = 2 + cols_maj = dst_cols // interleave + cols_min = dst_cols % interleave + return (cols_maj * m * interleave + dst_rows * interleave + cols_min).view(-1) + + +# This function converts dense matrix into sparse semi-structured +# representation, producing "compressed" matrix, in the layout used by +# CUTLASS backend, and corresponding metadata matrix. +def sparse_semi_structured_from_dense_cutlass(dense): + if dense.dim() != 2: + raise RuntimeError( + f"Expected 2-dimensional dense tensor, got {dense.dim()}-dimensional tensor" + ) + + m, k = dense.shape + device = dense.device + + meta_dtype = torch.int8 + if dense.dtype == torch.int8: + meta_dtype = torch.int32 + elif dense.dtype in [torch.half, torch.bfloat16, torch.float]: + meta_dtype = torch.int16 + else: + raise RuntimeError(f"Invalid datatype {dense.dtype} of dense matrix") + quadbits_per_meta_elem = meta_dtype.itemsize * 8 // 4 + if quadbits_per_meta_elem not in (4, 8): + raise RuntimeError("Invalid number of elements per meta element calculated") + + if meta_dtype == torch.int32: + if m % 16 != 0: + raise RuntimeError( + f"Number of rows of dense matrix {m} must be divisible by 16" + ) + else: + if m % 32 != 0: + raise RuntimeError( + f"Number of rows of dense matrix {m} must be divisible by 32" + ) + if k % (4 * quadbits_per_meta_elem) != 0: + raise RuntimeError( + f"Number of columns of dense matrix {k} must be divisible by {4 * quadbits_per_meta_elem}" + ) + + if dense.dtype != torch.float: + ksparse = 4 + dense_4 = dense.view(-1, k // ksparse, ksparse) + m0, m1, m2, m3 = (dense_4 != 0).unbind(-1) + else: + ksparse = 2 + dense_2 = dense.view(-1, k // ksparse, ksparse) + m0, m2 = m1, m3 = (dense_2 != 0).unbind(-1) + meta_ncols = k // (ksparse * quadbits_per_meta_elem) + + # Encoding quadruples of True/False values as follows: + # [True, True, False, False] -> 0b0100 + # [True, False, True, False] -> 0b1000 + # [False, True, True, False] -> 0b1001 + # [True, False, False, True ] -> 0b1100 + # [False, True, False, True ] -> 0b1101 + # [False, False, True, True ] -> 0b1110 + # Thus, lower two bits in the encoding are index of the True value + # at the lowest index in the quadruple, and the higher two bits in + # the encoding are index of the other True value in the quadruple. + # In case there are less than two True values, than False value or + # values at some index or indices are considered True for the + # encoding. In case there are more than two True values, then the + # excess True value(s) at some indices are considered False for + # the encoding. The exact encodings used for these cases are as + # follows: + # [False, False, False, False] -> 0b1110 + # [False, False, False, True ] -> 0b1110 + # [False, False, True, False] -> 0b1110 + # [False, True, False, False] -> 0b1001 + # [False, True, True, True ] -> 0b1101 + # [True, False, False, False] -> 0b1000 + # [True, False, True, True ] -> 0b1100 + # [True, True, False, True ] -> 0b0100 + # [True, True, True, False] -> 0b0100 + # [True, True, True, True ] -> 0b0100 + # These particular encodings are chosen, with the help of Espresso + # logic minimizer software, for the purpose of minimization of + # corresponding Boolean functions, that translate non-zero flags + # into encoding bits. Note also possible choices for the first + # and last of these encodings were limited only to (0b0100, + # 0b1110), in order to produce valid encodings for 1:2 sparsity + # case. + + expr0 = m0 & m1 + expr1 = ~m0 & m1 + expr2 = ~m0 & ~m1 + bit0 = expr1 + bit1 = expr2 + bit2 = expr0 | expr2 | m3 + bit3 = expr1 | ~m1 + idxs0 = bit0 | (bit1.to(torch.int64) << 1) + idxs1 = bit2 | (bit3.to(torch.int64) << 1) + + if dense.dtype != torch.float: + sparse0 = dense_4.gather(-1, idxs0.unsqueeze(-1)) # type: ignore[possibly-undefined] + sparse1 = dense_4.gather(-1, idxs1.unsqueeze(-1)) + sparse = torch.stack((sparse0, sparse1), dim=-1).view(m, k // 2) + else: + sparse = dense_2.gather(-1, idxs0.unsqueeze(-1) // 2).view(m, k // 2) # type: ignore[possibly-undefined] + + meta_4 = idxs0 | (idxs1 << 2) + meta_n = meta_4.view((-1, meta_ncols, quadbits_per_meta_elem)).to(meta_dtype) + + if quadbits_per_meta_elem == 4: + meta = ( + meta_n[:, :, 0] + | (meta_n[:, :, 1] << 4) + | (meta_n[:, :, 2] << 8) + | (meta_n[:, :, 3] << 12) + ) + elif quadbits_per_meta_elem == 8: + meta = ( + meta_n[:, :, 0] + | (meta_n[:, :, 1] << 4) + | (meta_n[:, :, 2] << 8) + | (meta_n[:, :, 3] << 12) + | (meta_n[:, :, 4] << 16) + | (meta_n[:, :, 5] << 20) + | (meta_n[:, :, 6] << 24) + | (meta_n[:, :, 7] << 28) + ) + + # Reorder meta tensor elements. + meta_reordered = meta.new_empty((m * meta_ncols,)) # type: ignore[possibly-undefined] + meta_offsets = _calculate_meta_reordering_scatter_offsets( + m, meta_ncols, meta_dtype, device + ) + meta_reordered.scatter_(0, meta_offsets, meta.view(-1)) + + return (sparse, meta_reordered.view(m, meta_ncols)) + + +# This function performs reverse of the function above - it +# reconstructs dense matrix from a pair of "compressed" matrix, given +# in the layout used by CUTLASS backend, and accompanying metadata +# matrix. +def sparse_semi_structured_to_dense_cutlass(sparse, meta_reordered): + if sparse.dim() != 2: + raise RuntimeError( + f"Expected 2-dimensional sparse tensor, got {sparse.dim()}-dimensional tensor" + ) + + m, k = sparse.shape + device = sparse.device + + if meta_reordered.dim() != 2: + raise RuntimeError( + f"Expected 2-dimensional meta tensor, got {meta_reordered.dim()}-dimensional tensor" + ) + if meta_reordered.device != device: + raise RuntimeError( + f"Expected meta matrix to be on {device} device, got matrix on {meta_reordered.device} device" + ) + + meta_dtype = meta_reordered.dtype + if meta_dtype not in (torch.int16, torch.int32): + raise RuntimeError(f"Invalid datatype {meta_dtype} of meta matrix") + quadbits_per_meta_elem = meta_dtype.itemsize * 8 // 4 + + if sparse.dtype != torch.float: + ksparse = 4 + else: + ksparse = 2 + + meta_nrows, meta_ncols = meta_reordered.shape + if meta_nrows != m: + raise RuntimeError( + f"Number of rows of meta matrix {meta_nrows} must be equal to number of columns of spase matrix {m}" + ) + if meta_ncols * ksparse * quadbits_per_meta_elem != 2 * k: + raise RuntimeError( + f"Number of columns of sparse matrix {k} different from the {meta_ncols * ksparse * quadbits_per_meta_elem // 2}, " + "expected according to the number of columns of meta matrix" + ) + + # Undo meta tensor elements reordering. + meta_offsets = _calculate_meta_reordering_scatter_offsets( + m, meta_ncols, meta_dtype, device + ) + meta = torch.gather(meta_reordered.view(-1), 0, meta_offsets).view(m, meta_ncols) + + # Unpack sparse tensor back to original dense tensor, using + # information provided by meta tensor. Note that torch.float + # datatype is handled pretty much the same as + # torch.half/torch.bfloat16, as metadata for a pair of torch.float + # value is encoded as if underlying 8 bytes contain four + # torch.half/torch.bfloat16 values, where either first two or last + # two are zeros. + meta_2 = torch.empty( + (m, meta_ncols, 2 * quadbits_per_meta_elem), + dtype=meta_dtype, + device=device, + ) + if quadbits_per_meta_elem == 4: + meta_2[:, :, 0] = meta & 0b11 + meta_2[:, :, 1] = (meta >> 2) & 0b11 + meta_2[:, :, 2] = (meta >> 4) & 0b11 + meta_2[:, :, 3] = (meta >> 6) & 0b11 + meta_2[:, :, 4] = (meta >> 8) & 0b11 + meta_2[:, :, 5] = (meta >> 10) & 0b11 + meta_2[:, :, 6] = (meta >> 12) & 0b11 + meta_2[:, :, 7] = (meta >> 14) & 0b11 + elif quadbits_per_meta_elem == 8: + meta_2[:, :, 0] = meta & 0b11 + meta_2[:, :, 1] = (meta >> 2) & 0b11 + meta_2[:, :, 2] = (meta >> 4) & 0b11 + meta_2[:, :, 3] = (meta >> 6) & 0b11 + meta_2[:, :, 4] = (meta >> 8) & 0b11 + meta_2[:, :, 5] = (meta >> 10) & 0b11 + meta_2[:, :, 6] = (meta >> 12) & 0b11 + meta_2[:, :, 7] = (meta >> 14) & 0b11 + meta_2[:, :, 8] = (meta >> 16) & 0b11 + meta_2[:, :, 9] = (meta >> 18) & 0b11 + meta_2[:, :, 10] = (meta >> 20) & 0b11 + meta_2[:, :, 11] = (meta >> 22) & 0b11 + meta_2[:, :, 12] = (meta >> 24) & 0b11 + meta_2[:, :, 13] = (meta >> 26) & 0b11 + meta_2[:, :, 14] = (meta >> 28) & 0b11 + meta_2[:, :, 15] = (meta >> 30) & 0b11 + + dense_offsets = meta_2.view(-1) + ( + torch.arange(0, 2 * m * k // ksparse, device=device) * 4 + ).view(-1, 1).repeat(1, 2).view(-1) + + dense = torch.zeros((m * 2 * k,), dtype=sparse.dtype, device=device) + if sparse.dtype != torch.float: + dense.scatter_(0, dense_offsets, sparse.view(-1)) + else: + dense.view(torch.half).scatter_( + 0, dense_offsets, sparse.view(torch.half).view(-1) + ) + + return dense.view(m, 2 * k) diff --git a/shared/package-files/d6/d61cf1c1a30d2506cc308ae812295e691a24a866cb3fc860177e4152bedda3d2/binary_cross_entropy_backward_native.h b/shared/package-files/d6/d61cf1c1a30d2506cc308ae812295e691a24a866cb3fc860177e4152bedda3d2/binary_cross_entropy_backward_native.h new file mode 100644 index 0000000000000000000000000000000000000000..a103684b51adad393e222bd0a11fc9be04e8dd7a --- /dev/null +++ b/shared/package-files/d6/d61cf1c1a30d2506cc308ae812295e691a24a866cb3fc860177e4152bedda3d2/binary_cross_entropy_backward_native.h @@ -0,0 +1,24 @@ +#pragma once + +// @generated by torchgen/gen.py from NativeFunction.h + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace at { +namespace native { +TORCH_API at::Tensor binary_cross_entropy_backward_cpu(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, const c10::optional & weight={}, int64_t reduction=at::Reduction::Mean); +TORCH_API at::Tensor & binary_cross_entropy_backward_out_cpu(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, const c10::optional & weight, int64_t reduction, at::Tensor & grad_input); +TORCH_API at::Tensor binary_cross_entropy_backward_cuda(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, const c10::optional & weight={}, int64_t reduction=at::Reduction::Mean); +TORCH_API at::Tensor & binary_cross_entropy_backward_out_cuda(const at::Tensor & grad_output, const at::Tensor & self, const at::Tensor & target, const c10::optional & weight, int64_t reduction, at::Tensor & grad_input); +} // namespace native +} // namespace at diff --git a/shared/package-files/d6/d6299b00fb957aeff2f9dd718a5f4c25471e6e51704738855a1391ad7e676796/results_exact_initial_local_linear_trend_R.csv b/shared/package-files/d6/d6299b00fb957aeff2f9dd718a5f4c25471e6e51704738855a1391ad7e676796/results_exact_initial_local_linear_trend_R.csv new file mode 100644 index 0000000000000000000000000000000000000000..d34dcb9b6d0514f67eb610d54e0ca23bddb6f779 --- /dev/null +++ b/shared/package-files/d6/d6299b00fb957aeff2f9dd718a5f4c25471e6e51704738855a1391ad7e676796/results_exact_initial_local_linear_trend_R.csv @@ -0,0 +1,12 @@ +"r_1","r_2","r0_1","r0_2","r1_1","r1_2","sumN","sumN0","sumN1","sumN2","m_1","v_1","F_1","Finf_1","a_1","a_2","sumP","sumPinf","att_1","att_2","sumPtt","alphahat_1","alphahat_2","sumV","muhat_1","sumVmu","etahat_1","etahat_2","sumVeta","epshat_1","Veps_1","llf" +0,0,0,0,9.72422585109483,-2.4212757752195,0,0,2,-4.1254118726452,0,10.2394,1.993,1,0,0,0,2,10.2394,0,0.9965,9.72422585109483,-2.4212757752195,4.1254118726452,9.72422585109483,1.78897970994046,-2.13333279022294,0.603319851251709,8.78748511553388,0.515174148905165,1.78897970994046,-21.1364983872324 +0,0,-0.258491795737664,0.258491795737664,-2.4212757752195,0,0,0,1,-3.71701622659957,10.2394,-6.0355,12.239,1,10.2394,0,12.58,4,4.2039,-6.0355,9.2795,5.16961728565239,-1.81795592396779,3.93514567728326,5.16961728565239,1.47322425474258,1.86569619045403,0.0756893037514425,8.05444975507323,-0.965717285652394,1.47322425474258,NA +0.226062788132076,0.032429007605588,0.226062788132076,0.032429007605588,0,0,0.051363991244706,0.051363991244706,0,0,-1.8316,7.954723,30.798,NA,-1.8316,-6.0355,78.844,NA,5.60835701068251,-1.75671757198519,13.749163922982,5.21735755213863,-1.74226662021634,3.60076175360198,5.21735755213863,1.47286280067942,-1.88507262098594,0.608799626952847,7.4387710112529,0.905765447861367,1.47286280067943,NA +-0.228410592631279,0.260839600236867,NA,NA,NA,NA,0.080687059729398,NA,NA,NA,3.85163943869732,-2.85163943869732,22.250346743295,NA,3.85163943869732,-1.75671757198519,48.7242243976881,NA,1.25542601501419,-2.91892501722355,9.16473520710951,1.59001831093635,-1.1334669932635,3.44977255623722,1.59001831093635,1.47107882801791,0.558189356012382,0.45094018712092,7.18360558861604,-0.590018310936346,1.47107882801791,NA +0.0676347214361302,0.193204878800737,NA,NA,NA,NA,0.0918518103125956,NA,NA,NA,-1.66349900220936,2.66349900220936,20.3194339439886,NA,-1.66349900220936,-2.91892501722355,42.1882350771407,NA,0.73875485281549,-1.94280306025839,8.10697982907794,1.01474067368523,-0.682526806142577,3.40417641537387,1.01474067368523,1.47005925030176,0.61923038959202,0.275817961347531,7.09409485861663,-0.0147406736852317,1.47005925030176,NA +0.0750309450614346,0.118173933739302,NA,NA,NA,NA,0.0953539315927209,NA,NA,NA,-1.2040482074429,2.2040482074429,19.7436685873651,NA,-1.2040482074429,-1.94280306025839,40.2635281749167,NA,0.777515102727931,-1.16474757404214,7.78903665265676,0.951444257134675,-0.406708844795046,3.41779499251488,0.951444257134675,1.47005925030176,0.41816137510756,0.157559310008498,7.06776435408301,0.0485557428653252,1.47005925030176,NA +0.0506678026302629,0.0675061311090392,NA,NA,NA,NA,0.0953539315927209,NA,NA,NA,-0.387232471314205,1.38723247131421,19.5578741215719,NA,-0.387232471314205,-1.16474757404214,39.6448274460767,NA,0.858637278359423,-0.681255709019103,7.68611246288461,0.962896787447189,-0.249149534786548,3.51108468447222,0.962896787447189,1.47107882801791,0.264517213944311,0.0827521880715023,7.06946955440421,0.0371032125528116,1.47107882801791,NA +0.032051037676519,0.0354550934325202,NA,NA,NA,NA,0.0918518103125956,NA,NA,NA,0.17738156934032,0.82261843065968,19.4963427441272,NA,0.17738156934032,-0.681255709019103,39.4401675462981,NA,0.915908406318996,-0.395782473854191,7.65198356932808,0.978264466604951,-0.166397346715046,3.81786955269073,0.978264466604951,1.47286280067943,0.174510511932601,0.0333995242097925,7.08451748207039,0.0217355333950489,1.47286280067943,NA +0.0211451001978191,0.0143099932347011,NA,NA,NA,NA,0.080687059729398,NA,NA,NA,0.520125932464805,0.479874067535195,19.4757829323051,NA,0.520125932464805,-0.395782473854191,39.3718080383884,NA,0.950893423903834,-0.229493137203491,7.64057446288005,0.986377631822506,-0.132997822505254,4.85378169531128,0.986377631822506,1.47322425474257,0.118100374165989,0,7.08849536606466,0.0136223681774941,1.47322425474258,NA +0.0143099932347011,0,NA,NA,NA,NA,0.051363991244706,NA,NA,NA,0.721400286700344,0.278599713299656,19.4688920344185,NA,0.721400286700344,-0.229493137203491,39.3488989452308,NA,0.971480183483241,-0.132997822505254,7.63674986537858,0.971480183483241,-0.132997822505254,9.22058000043485,0.971480183483241,1.78897970994046,0,0,10.587,0.0285198165167594,1.78897970994046,NA +0,0,NA,NA,NA,NA,0,NA,NA,NA,NA,NA,NA,NA,0.838482360977987,-0.132997822505254,39.3412127441284,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA,NA diff --git a/shared/package-files/d6/d62e704a0000340ef3d7def67fd9b42f2b5e112734e3293de037e703cea2ad70/att5420-nl b/shared/package-files/d6/d62e704a0000340ef3d7def67fd9b42f2b5e112734e3293de037e703cea2ad70/att5420-nl new file mode 100644 index 0000000000000000000000000000000000000000..d2713dab0c39706fe4d74cc25f7988b72c299f5f Binary files /dev/null and b/shared/package-files/d6/d62e704a0000340ef3d7def67fd9b42f2b5e112734e3293de037e703cea2ad70/att5420-nl differ diff --git a/shared/package-files/d6/d6318382b231dfe4d638234c482e33c6665aecb1f2314ebd0d7877875d818da8/test_spectral_bipartivity.py b/shared/package-files/d6/d6318382b231dfe4d638234c482e33c6665aecb1f2314ebd0d7877875d818da8/test_spectral_bipartivity.py new file mode 100644 index 0000000000000000000000000000000000000000..b940649793d40aa73606914f3d48348761c329df --- /dev/null +++ b/shared/package-files/d6/d6318382b231dfe4d638234c482e33c6665aecb1f2314ebd0d7877875d818da8/test_spectral_bipartivity.py @@ -0,0 +1,80 @@ +import pytest + +pytest.importorskip("scipy") + +import networkx as nx +from networkx.algorithms.bipartite import spectral_bipartivity as sb + +# Examples from Figure 1 +# E. Estrada and J. A. Rodríguez-Velázquez, "Spectral measures of +# bipartivity in complex networks", PhysRev E 72, 046105 (2005) + + +class TestSpectralBipartivity: + def test_star_like(self): + # star-like + + G = nx.star_graph(2) + G.add_edge(1, 2) + assert sb(G) == pytest.approx(0.843, abs=1e-3) + + G = nx.star_graph(3) + G.add_edge(1, 2) + assert sb(G) == pytest.approx(0.871, abs=1e-3) + + G = nx.star_graph(4) + G.add_edge(1, 2) + assert sb(G) == pytest.approx(0.890, abs=1e-3) + + def test_k23_like(self): + # K2,3-like + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(0, 1) + assert sb(G) == pytest.approx(0.769, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + assert sb(G) == pytest.approx(0.829, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + G.add_edge(3, 4) + assert sb(G) == pytest.approx(0.731, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(0, 1) + G.add_edge(2, 4) + assert sb(G) == pytest.approx(0.692, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + G.add_edge(3, 4) + G.add_edge(0, 1) + assert sb(G) == pytest.approx(0.645, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + G.add_edge(3, 4) + G.add_edge(2, 3) + assert sb(G) == pytest.approx(0.645, abs=1e-3) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + G.add_edge(3, 4) + G.add_edge(2, 3) + G.add_edge(0, 1) + assert sb(G) == pytest.approx(0.597, abs=1e-3) + + def test_single_nodes(self): + # single nodes + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(2, 4) + sbn = sb(G, nodes=[1, 2]) + assert sbn[1] == pytest.approx(0.85, abs=1e-2) + assert sbn[2] == pytest.approx(0.77, abs=1e-2) + + G = nx.complete_bipartite_graph(2, 3) + G.add_edge(0, 1) + sbn = sb(G, nodes=[1, 2]) + assert sbn[1] == pytest.approx(0.73, abs=1e-2) + assert sbn[2] == pytest.approx(0.82, abs=1e-2) diff --git a/shared/package-files/d6/d63221cd4ede06f637a5b5b72d9a09842394d8a5aa82dcb91e043a541608a795/utils.py b/shared/package-files/d6/d63221cd4ede06f637a5b5b72d9a09842394d8a5aa82dcb91e043a541608a795/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..f774519609005dface41fd15021c7f237f091341 --- /dev/null +++ b/shared/package-files/d6/d63221cd4ede06f637a5b5b72d9a09842394d8a5aa82dcb91e043a541608a795/utils.py @@ -0,0 +1,187 @@ +import os +import sys +import stat +import select +import time +import errno + +try: + InterruptedError +except NameError: + # Alias Python2 exception to Python3 + InterruptedError = select.error + +if sys.version_info[0] >= 3: + string_types = (str,) +else: + string_types = (unicode, str) + + +def is_executable_file(path): + """Checks that path is an executable regular file, or a symlink towards one. + + This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``. + """ + # follow symlinks, + fpath = os.path.realpath(path) + + if not os.path.isfile(fpath): + # non-files (directories, fifo, etc.) + return False + + mode = os.stat(fpath).st_mode + + if (sys.platform.startswith('sunos') + and os.getuid() == 0): + # When root on Solaris, os.X_OK is True for *all* files, irregardless + # of their executability -- instead, any permission bit of any user, + # group, or other is fine enough. + # + # (This may be true for other "Unix98" OS's such as HP-UX and AIX) + return bool(mode & (stat.S_IXUSR | + stat.S_IXGRP | + stat.S_IXOTH)) + + return os.access(fpath, os.X_OK) + + +def which(filename, env=None): + '''This takes a given filename; tries to find it in the environment path; + then checks if it is executable. This returns the full path to the filename + if found and executable. Otherwise this returns None.''' + + # Special case where filename contains an explicit path. + if os.path.dirname(filename) != '' and is_executable_file(filename): + return filename + if env is None: + env = os.environ + p = env.get('PATH') + if not p: + p = os.defpath + pathlist = p.split(os.pathsep) + for path in pathlist: + ff = os.path.join(path, filename) + if is_executable_file(ff): + return ff + return None + + +def split_command_line(command_line): + + '''This splits a command line into a list of arguments. It splits arguments + on spaces, but handles embedded quotes, doublequotes, and escaped + characters. It's impossible to do this with a regular expression, so I + wrote a little state machine to parse the command line. ''' + + arg_list = [] + arg = '' + + # Constants to name the states we can be in. + state_basic = 0 + state_esc = 1 + state_singlequote = 2 + state_doublequote = 3 + # The state when consuming whitespace between commands. + state_whitespace = 4 + state = state_basic + + for c in command_line: + if state == state_basic or state == state_whitespace: + if c == '\\': + # Escape the next character + state = state_esc + elif c == r"'": + # Handle single quote + state = state_singlequote + elif c == r'"': + # Handle double quote + state = state_doublequote + elif c.isspace(): + # Add arg to arg_list if we aren't in the middle of whitespace. + if state == state_whitespace: + # Do nothing. + None + else: + arg_list.append(arg) + arg = '' + state = state_whitespace + else: + arg = arg + c + state = state_basic + elif state == state_esc: + arg = arg + c + state = state_basic + elif state == state_singlequote: + if c == r"'": + state = state_basic + else: + arg = arg + c + elif state == state_doublequote: + if c == r'"': + state = state_basic + else: + arg = arg + c + + if arg != '': + arg_list.append(arg) + return arg_list + + +def select_ignore_interrupts(iwtd, owtd, ewtd, timeout=None): + + '''This is a wrapper around select.select() that ignores signals. If + select.select raises a select.error exception and errno is an EINTR + error then it is ignored. Mainly this is used to ignore sigwinch + (terminal resize). ''' + + # if select() is interrupted by a signal (errno==EINTR) then + # we loop back and enter the select() again. + if timeout is not None: + end_time = time.time() + timeout + while True: + try: + return select.select(iwtd, owtd, ewtd, timeout) + except InterruptedError: + err = sys.exc_info()[1] + if err.args[0] == errno.EINTR: + # if we loop back we have to subtract the + # amount of time we already waited. + if timeout is not None: + timeout = end_time - time.time() + if timeout < 0: + return([], [], []) + else: + # something else caused the select.error, so + # this actually is an exception. + raise + + +def poll_ignore_interrupts(fds, timeout=None): + '''Simple wrapper around poll to register file descriptors and + ignore signals.''' + + if timeout is not None: + end_time = time.time() + timeout + + poller = select.poll() + for fd in fds: + poller.register(fd, select.POLLIN | select.POLLPRI | select.POLLHUP | select.POLLERR) + + while True: + try: + timeout_ms = None if timeout is None else timeout * 1000 + results = poller.poll(timeout_ms) + return [afd for afd, _ in results] + except InterruptedError: + err = sys.exc_info()[1] + if err.args[0] == errno.EINTR: + # if we loop back we have to subtract the + # amount of time we already waited. + if timeout is not None: + timeout = end_time - time.time() + if timeout < 0: + return [] + else: + # something else caused the select.error, so + # this actually is an exception. + raise diff --git a/shared/package-files/d6/d635f1005b25da2bd7953f52b0638ceecd6ebd2d94284b96ccd600fdb4ed4ba5/contains.py b/shared/package-files/d6/d635f1005b25da2bd7953f52b0638ceecd6ebd2d94284b96ccd600fdb4ed4ba5/contains.py new file mode 100644 index 0000000000000000000000000000000000000000..997a4d8e16853a49f65021bfd4da3d6cbca321b1 --- /dev/null +++ b/shared/package-files/d6/d635f1005b25da2bd7953f52b0638ceecd6ebd2d94284b96ccd600fdb4ed4ba5/contains.py @@ -0,0 +1,48 @@ +from sympy.core import S +from sympy.core.relational import Eq, Ne +from sympy.logic.boolalg import BooleanFunction +from sympy.utilities.misc import func_name +from .sets import Set + + +class Contains(BooleanFunction): + """ + Asserts that x is an element of the set S. + + Examples + ======== + + >>> from sympy import Symbol, Integer, S, Contains + >>> Contains(Integer(2), S.Integers) + True + >>> Contains(Integer(-2), S.Naturals) + False + >>> i = Symbol('i', integer=True) + >>> Contains(i, S.Naturals) + Contains(i, Naturals) + + References + ========== + + .. [1] https://en.wikipedia.org/wiki/Element_%28mathematics%29 + """ + @classmethod + def eval(cls, x, s): + + if not isinstance(s, Set): + raise TypeError('expecting Set, not %s' % func_name(s)) + + ret = s.contains(x) + if not isinstance(ret, Contains) and ( + ret in (S.true, S.false) or isinstance(ret, Set)): + return ret + + @property + def binary_symbols(self): + return set().union(*[i.binary_symbols + for i in self.args[1].args + if i.is_Boolean or i.is_Symbol or + isinstance(i, (Eq, Ne))]) + + def as_set(self): + return self.args[1] diff --git a/shared/package-files/d6/d6373e1408ef90a9e60a3873f3ec908042ab37fb159b3022f03568cbdfcaf004/Casey b/shared/package-files/d6/d6373e1408ef90a9e60a3873f3ec908042ab37fb159b3022f03568cbdfcaf004/Casey new file mode 100644 index 0000000000000000000000000000000000000000..84f1c61e5c7c35090fd2e628e307cff72389fb02 Binary files /dev/null and b/shared/package-files/d6/d6373e1408ef90a9e60a3873f3ec908042ab37fb159b3022f03568cbdfcaf004/Casey differ diff --git a/shared/package-files/d6/d63e4b7887f677be27d65cef98e4133d3bab49f264d85230576a1cf00f071416/group_norm_expanded_weights.py b/shared/package-files/d6/d63e4b7887f677be27d65cef98e4133d3bab49f264d85230576a1cf00f071416/group_norm_expanded_weights.py new file mode 100644 index 0000000000000000000000000000000000000000..fe29b1eafbe2c0be87a96f4e24d8c026b310b3d7 --- /dev/null +++ b/shared/package-files/d6/d63e4b7887f677be27d65cef98e4133d3bab49f264d85230576a1cf00f071416/group_norm_expanded_weights.py @@ -0,0 +1,64 @@ +from functools import reduce +import operator +import torch +import torch.nn.functional as F +from .expanded_weights_impl import ExpandedWeight, implements_per_sample_grads +from .expanded_weights_utils import standard_kwargs, \ + forward_helper, set_grad_sample_if_exists, unpack_expanded_weight_or_tensor +from typing import List, Optional + +@implements_per_sample_grads(F.group_norm) +class GroupNormPerSampleGrad(torch.autograd.Function): + @staticmethod + def forward(ctx, kwarg_names, _, *expanded_args_and_kwargs): + expanded_args, expanded_kwargs = standard_kwargs(kwarg_names, expanded_args_and_kwargs) + input, num_groups = expanded_args + N = input.shape[0] + C = input.shape[1] + HxW = reduce(operator.mul, input.shape[2:], 1) + weight, bias, eps = expanded_kwargs['weight'], expanded_kwargs['bias'], expanded_kwargs['eps'] + output, mean, rstd = forward_helper(torch.native_group_norm, (input, weight, bias, N, C, HxW, num_groups, eps), {}) + ctx.input, ctx.num_groups = input, num_groups + ctx.weight, ctx.eps = weight, eps + ctx.mean, ctx.rstd = mean, rstd + if isinstance(bias, ExpandedWeight): + ctx.bias = bias + if input.requires_grad and isinstance(weight, ExpandedWeight): + ctx.weight = weight + return output + + @staticmethod + def backward(ctx, grad_output): + input, num_groups = ctx.input, ctx.num_groups + weight, bias, eps = ctx.weight, ctx.bias, ctx.eps + mean, rstd = ctx.mean, ctx.rstd + + results: List[Optional[torch.Tensor]] = [] + results.append(None) # for kwarg names + results.append(None) # for op reference + + if input.requires_grad: + weight_c = unpack_expanded_weight_or_tensor(weight, lambda t: t.contiguous()) + input_c = input.contiguous() + grad_output_c = grad_output.contiguous() if grad_output is not None else None + N = input.shape[0] + C = input.shape[1] + HxW = 1 + for s in input.shape[2:]: + HxW *= s + bw_fn = torch.ops.aten.native_group_norm_backward + results.append(bw_fn(grad_output_c, input_c, + mean, rstd, weight_c, N, C, HxW, num_groups, (True, False, False))[0]) + else: + results.append(None) + + # weight and bias don't compute batched gradients; no other arguments are differentiable + results = results + [None] * 4 + + # set grad_sample field for weight and bias with per sample gradients + if hasattr(ctx, "weight"): + set_grad_sample_if_exists(weight, + lambda _: torch.einsum("ni...->ni", F.group_norm(input, num_groups, eps=eps) * grad_output)) + if hasattr(ctx, "bias"): + set_grad_sample_if_exists(bias, lambda _: torch.einsum("ni...->ni", grad_output)) + return tuple(results) diff --git a/shared/package-files/d6/d63eb28e9e3f5a5c5c0d748128e93e21fac46d6b42e07bdb2081de336c76e72b/test_to_timestamp.py b/shared/package-files/d6/d63eb28e9e3f5a5c5c0d748128e93e21fac46d6b42e07bdb2081de336c76e72b/test_to_timestamp.py new file mode 100644 index 0000000000000000000000000000000000000000..0e7e1d595d6be9250638932e7690f420b9a12fc0 --- /dev/null +++ b/shared/package-files/d6/d63eb28e9e3f5a5c5c0d748128e93e21fac46d6b42e07bdb2081de336c76e72b/test_to_timestamp.py @@ -0,0 +1,154 @@ +from datetime import timedelta + +import numpy as np +import pytest + +from pandas import ( + DataFrame, + DatetimeIndex, + PeriodIndex, + Series, + Timedelta, + date_range, + period_range, + to_datetime, +) +import pandas._testing as tm + + +def _get_with_delta(delta, freq="YE-DEC"): + return date_range( + to_datetime("1/1/2001") + delta, + to_datetime("12/31/2009") + delta, + freq=freq, + ) + + +class TestToTimestamp: + def test_to_timestamp(self, frame_or_series): + K = 5 + index = period_range(freq="Y", start="1/1/2001", end="12/1/2009") + obj = DataFrame( + np.random.default_rng(2).standard_normal((len(index), K)), + index=index, + columns=["A", "B", "C", "D", "E"], + ) + obj["mix"] = "a" + obj = tm.get_obj(obj, frame_or_series) + + exp_index = date_range("1/1/2001", end="12/31/2009", freq="YE-DEC") + exp_index = exp_index + Timedelta(1, "D") - Timedelta(1, "ns") + result = obj.to_timestamp("D", "end") + tm.assert_index_equal(result.index, exp_index) + tm.assert_numpy_array_equal(result.values, obj.values) + if frame_or_series is Series: + assert result.name == "A" + + exp_index = date_range("1/1/2001", end="1/1/2009", freq="YS-JAN") + result = obj.to_timestamp("D", "start") + tm.assert_index_equal(result.index, exp_index) + + result = obj.to_timestamp(how="start") + tm.assert_index_equal(result.index, exp_index) + + delta = timedelta(hours=23) + result = obj.to_timestamp("H", "end") + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "h") - Timedelta(1, "ns") + tm.assert_index_equal(result.index, exp_index) + + delta = timedelta(hours=23, minutes=59) + result = obj.to_timestamp("T", "end") + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "m") - Timedelta(1, "ns") + tm.assert_index_equal(result.index, exp_index) + + result = obj.to_timestamp("S", "end") + delta = timedelta(hours=23, minutes=59, seconds=59) + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "s") - Timedelta(1, "ns") + tm.assert_index_equal(result.index, exp_index) + + def test_to_timestamp_columns(self): + K = 5 + index = period_range(freq="Y", start="1/1/2001", end="12/1/2009") + df = DataFrame( + np.random.default_rng(2).standard_normal((len(index), K)), + index=index, + columns=["A", "B", "C", "D", "E"], + ) + df["mix"] = "a" + + # columns + df = df.T + + exp_index = date_range("1/1/2001", end="12/31/2009", freq="YE-DEC") + exp_index = exp_index + Timedelta(1, "D") - Timedelta(1, "ns") + result = df.to_timestamp("D", "end", axis=1) + tm.assert_index_equal(result.columns, exp_index) + tm.assert_numpy_array_equal(result.values, df.values) + + exp_index = date_range("1/1/2001", end="1/1/2009", freq="YS-JAN") + result = df.to_timestamp("D", "start", axis=1) + tm.assert_index_equal(result.columns, exp_index) + + delta = timedelta(hours=23) + result = df.to_timestamp("H", "end", axis=1) + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "h") - Timedelta(1, "ns") + tm.assert_index_equal(result.columns, exp_index) + + delta = timedelta(hours=23, minutes=59) + result = df.to_timestamp("min", "end", axis=1) + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "m") - Timedelta(1, "ns") + tm.assert_index_equal(result.columns, exp_index) + + result = df.to_timestamp("S", "end", axis=1) + delta = timedelta(hours=23, minutes=59, seconds=59) + exp_index = _get_with_delta(delta) + exp_index = exp_index + Timedelta(1, "s") - Timedelta(1, "ns") + tm.assert_index_equal(result.columns, exp_index) + + result1 = df.to_timestamp("5min", axis=1) + result2 = df.to_timestamp("min", axis=1) + expected = date_range("2001-01-01", "2009-01-01", freq="YS") + assert isinstance(result1.columns, DatetimeIndex) + assert isinstance(result2.columns, DatetimeIndex) + tm.assert_numpy_array_equal(result1.columns.asi8, expected.asi8) + tm.assert_numpy_array_equal(result2.columns.asi8, expected.asi8) + # PeriodIndex.to_timestamp always use 'infer' + assert result1.columns.freqstr == "YS-JAN" + assert result2.columns.freqstr == "YS-JAN" + + def test_to_timestamp_invalid_axis(self): + index = period_range(freq="Y", start="1/1/2001", end="12/1/2009") + obj = DataFrame( + np.random.default_rng(2).standard_normal((len(index), 5)), index=index + ) + + # invalid axis + with pytest.raises(ValueError, match="axis"): + obj.to_timestamp(axis=2) + + def test_to_timestamp_hourly(self, frame_or_series): + index = period_range(freq="h", start="1/1/2001", end="1/2/2001") + obj = Series(1, index=index, name="foo") + if frame_or_series is not Series: + obj = obj.to_frame() + + exp_index = date_range("1/1/2001 00:59:59", end="1/2/2001 00:59:59", freq="h") + result = obj.to_timestamp(how="end") + exp_index = exp_index + Timedelta(1, "s") - Timedelta(1, "ns") + tm.assert_index_equal(result.index, exp_index) + if frame_or_series is Series: + assert result.name == "foo" + + def test_to_timestamp_raises(self, index, frame_or_series): + # GH#33327 + obj = frame_or_series(index=index, dtype=object) + + if not isinstance(index, PeriodIndex): + msg = f"unsupported Type {type(index).__name__}" + with pytest.raises(TypeError, match=msg): + obj.to_timestamp() diff --git a/shared/package-files/d6/d63fa4403cf0fe8a47451939edb425f1d3f9005ee0f2333f12e76bb2c53979c5/constant_propagation.h b/shared/package-files/d6/d63fa4403cf0fe8a47451939edb425f1d3f9005ee0f2333f12e76bb2c53979c5/constant_propagation.h new file mode 100644 index 0000000000000000000000000000000000000000..62293c8d7abc9bc2344ccab38d3a30c18af2fe9d --- /dev/null +++ b/shared/package-files/d6/d63fa4403cf0fe8a47451939edb425f1d3f9005ee0f2333f12e76bb2c53979c5/constant_propagation.h @@ -0,0 +1,32 @@ +#pragma once + +#include + +namespace torch { +namespace jit { + +// Runs constant propagation on all objects unless ignore_custom_classes is +// specified as true, in which case user defined classes are skipped. This is +// useful to prevent early fusion of packing operations, which end up lowering +// away information about their constructors (e.g. packed::linear_clamp_prepack +// and prepacked::conv2d_clamp_prepack) +// Returns True if the pass made a change to the graph +TORCH_API bool ConstantPropagation( + std::shared_ptr& graph, + bool ignore_custom_classes = false); + +// runs constant propagation only on ops that have non-aliasing inputs & outputs +// Returns True if the pass made a change to the graph +TORCH_API bool ConstantPropagationImmutableTypes(std::shared_ptr& graph); + +// Runs the node if its inputs are constants. Callers of this function must +// make their own determination if constant prop is appropriate - for example +// non-deterministic ops or ops with side effects. If ignore_custom_classes is +// specified, nodes that output user defined classes are not run. +TORCH_API c10::optional runNodeIfInputsAreConstant( + const Node* node, + bool ignore_custom_classes = false, + AliasDb* db = nullptr); + +} // namespace jit +} // namespace torch diff --git a/shared/package-files/d6/d64431841511ea36f8fcaa8040769fdbdced56a386692807193dbc8301fe2ac8/test_to_csv.py b/shared/package-files/d6/d64431841511ea36f8fcaa8040769fdbdced56a386692807193dbc8301fe2ac8/test_to_csv.py new file mode 100644 index 0000000000000000000000000000000000000000..ba75c7786ef72095c0888b815a778b5bc1446c03 --- /dev/null +++ b/shared/package-files/d6/d64431841511ea36f8fcaa8040769fdbdced56a386692807193dbc8301fe2ac8/test_to_csv.py @@ -0,0 +1,179 @@ +from datetime import datetime +from io import StringIO + +import numpy as np +import pytest + +import pandas as pd +from pandas import Series +import pandas._testing as tm + +from pandas.io.common import get_handle + + +class TestSeriesToCSV: + def read_csv(self, path, **kwargs): + params = {"index_col": 0, "header": None} + params.update(**kwargs) + + header = params.get("header") + out = pd.read_csv(path, **params).squeeze("columns") + + if header is None: + out.name = out.index.name = None + + return out + + def test_from_csv(self, datetime_series, string_series): + # freq doesn't round-trip + datetime_series.index = datetime_series.index._with_freq(None) + + with tm.ensure_clean() as path: + datetime_series.to_csv(path, header=False) + ts = self.read_csv(path, parse_dates=True) + tm.assert_series_equal(datetime_series, ts, check_names=False) + + assert ts.name is None + assert ts.index.name is None + + # see gh-10483 + datetime_series.to_csv(path, header=True) + ts_h = self.read_csv(path, header=0) + assert ts_h.name == "ts" + + string_series.to_csv(path, header=False) + series = self.read_csv(path) + tm.assert_series_equal(string_series, series, check_names=False) + + assert series.name is None + assert series.index.name is None + + string_series.to_csv(path, header=True) + series_h = self.read_csv(path, header=0) + assert series_h.name == "series" + + with open(path, "w", encoding="utf-8") as outfile: + outfile.write("1998-01-01|1.0\n1999-01-01|2.0") + + series = self.read_csv(path, sep="|", parse_dates=True) + check_series = Series( + {datetime(1998, 1, 1): 1.0, datetime(1999, 1, 1): 2.0} + ) + tm.assert_series_equal(check_series, series) + + series = self.read_csv(path, sep="|", parse_dates=False) + check_series = Series({"1998-01-01": 1.0, "1999-01-01": 2.0}) + tm.assert_series_equal(check_series, series) + + def test_to_csv(self, datetime_series): + with tm.ensure_clean() as path: + datetime_series.to_csv(path, header=False) + + with open(path, newline=None, encoding="utf-8") as f: + lines = f.readlines() + assert lines[1] != "\n" + + datetime_series.to_csv(path, index=False, header=False) + arr = np.loadtxt(path) + tm.assert_almost_equal(arr, datetime_series.values) + + def test_to_csv_unicode_index(self): + buf = StringIO() + s = Series(["\u05d0", "d2"], index=["\u05d0", "\u05d1"]) + + s.to_csv(buf, encoding="UTF-8", header=False) + buf.seek(0) + + s2 = self.read_csv(buf, index_col=0, encoding="UTF-8") + tm.assert_series_equal(s, s2) + + def test_to_csv_float_format(self): + with tm.ensure_clean() as filename: + ser = Series([0.123456, 0.234567, 0.567567]) + ser.to_csv(filename, float_format="%.2f", header=False) + + rs = self.read_csv(filename) + xp = Series([0.12, 0.23, 0.57]) + tm.assert_series_equal(rs, xp) + + def test_to_csv_list_entries(self): + s = Series(["jack and jill", "jesse and frank"]) + + split = s.str.split(r"\s+and\s+") + + buf = StringIO() + split.to_csv(buf, header=False) + + def test_to_csv_path_is_none(self): + # GH 8215 + # Series.to_csv() was returning None, inconsistent with + # DataFrame.to_csv() which returned string + s = Series([1, 2, 3]) + csv_str = s.to_csv(path_or_buf=None, header=False) + assert isinstance(csv_str, str) + + @pytest.mark.parametrize( + "s,encoding", + [ + ( + Series([0.123456, 0.234567, 0.567567], index=["A", "B", "C"], name="X"), + None, + ), + # GH 21241, 21118 + (Series(["abc", "def", "ghi"], name="X"), "ascii"), + (Series(["123", "你好", "世界"], name="中文"), "gb2312"), + ( + Series(["123", "Γειά σου", "Κόσμε"], name="Ελληνικά"), # noqa: RUF001 + "cp737", + ), + ], + ) + def test_to_csv_compression(self, s, encoding, compression): + with tm.ensure_clean() as filename: + s.to_csv(filename, compression=compression, encoding=encoding, header=True) + # test the round trip - to_csv -> read_csv + result = pd.read_csv( + filename, + compression=compression, + encoding=encoding, + index_col=0, + ).squeeze("columns") + tm.assert_series_equal(s, result) + + # test the round trip using file handle - to_csv -> read_csv + with get_handle( + filename, "w", compression=compression, encoding=encoding + ) as handles: + s.to_csv(handles.handle, encoding=encoding, header=True) + + result = pd.read_csv( + filename, + compression=compression, + encoding=encoding, + index_col=0, + ).squeeze("columns") + tm.assert_series_equal(s, result) + + # explicitly ensure file was compressed + with tm.decompress_file(filename, compression) as fh: + text = fh.read().decode(encoding or "utf8") + assert s.name in text + + with tm.decompress_file(filename, compression) as fh: + tm.assert_series_equal( + s, + pd.read_csv(fh, index_col=0, encoding=encoding).squeeze("columns"), + ) + + def test_to_csv_interval_index(self, using_infer_string): + # GH 28210 + s = Series(["foo", "bar", "baz"], index=pd.interval_range(0, 3)) + + with tm.ensure_clean("__tmp_to_csv_interval_index__.csv") as path: + s.to_csv(path, header=False) + result = self.read_csv(path, index_col=0) + + # can't roundtrip intervalindex via read_csv so check string repr (GH 23595) + expected = s + expected.index = expected.index.astype("str") + tm.assert_series_equal(result, expected) diff --git a/shared/package-files/d6/d6456b0a1ce260e9f3f1ad9bac56981344dac7e82628a078434a75fe9aafc124/_convert_indices_from_coo_to_csr.h b/shared/package-files/d6/d6456b0a1ce260e9f3f1ad9bac56981344dac7e82628a078434a75fe9aafc124/_convert_indices_from_coo_to_csr.h new file mode 100644 index 0000000000000000000000000000000000000000..58d64bcb4324c86a235ff4b506376314b32eec17 --- /dev/null +++ b/shared/package-files/d6/d6456b0a1ce260e9f3f1ad9bac56981344dac7e82628a078434a75fe9aafc124/_convert_indices_from_coo_to_csr.h @@ -0,0 +1,39 @@ +#pragma once + +// @generated by torchgen/gen.py from Function.h + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + +#include + +namespace at { + + +// aten::_convert_indices_from_coo_to_csr(Tensor self, int size, *, bool out_int32=False) -> Tensor +inline at::Tensor _convert_indices_from_coo_to_csr(const at::Tensor & self, int64_t size, bool out_int32=false) { + return at::_ops::_convert_indices_from_coo_to_csr::call(self, size, out_int32); +} + +// aten::_convert_indices_from_coo_to_csr.out(Tensor self, int size, *, bool out_int32=False, Tensor(a!) out) -> Tensor(a!) +inline at::Tensor & _convert_indices_from_coo_to_csr_out(at::Tensor & out, const at::Tensor & self, int64_t size, bool out_int32=false) { + return at::_ops::_convert_indices_from_coo_to_csr_out::call(self, size, out_int32, out); +} +// aten::_convert_indices_from_coo_to_csr.out(Tensor self, int size, *, bool out_int32=False, Tensor(a!) out) -> Tensor(a!) +inline at::Tensor & _convert_indices_from_coo_to_csr_outf(const at::Tensor & self, int64_t size, bool out_int32, at::Tensor & out) { + return at::_ops::_convert_indices_from_coo_to_csr_out::call(self, size, out_int32, out); +} + +} diff --git a/shared/package-files/d6/d64be755da43107b26fa96414d885b356200b5c3335a80cf2642e921d789146a/_knn.py b/shared/package-files/d6/d64be755da43107b26fa96414d885b356200b5c3335a80cf2642e921d789146a/_knn.py new file mode 100644 index 0000000000000000000000000000000000000000..1b7ef06edc256372890cbd9cb85123239b37e3e9 --- /dev/null +++ b/shared/package-files/d6/d64be755da43107b26fa96414d885b356200b5c3335a80cf2642e921d789146a/_knn.py @@ -0,0 +1,411 @@ +# Authors: The scikit-learn developers +# SPDX-License-Identifier: BSD-3-Clause + +from numbers import Integral + +import numpy as np + +from ..base import _fit_context +from ..metrics import pairwise_distances_chunked +from ..metrics.pairwise import _NAN_METRICS +from ..neighbors._base import _get_weights +from ..utils._mask import _get_mask +from ..utils._missing import is_scalar_nan +from ..utils._param_validation import Hidden, Interval, StrOptions +from ..utils.validation import ( + FLOAT_DTYPES, + _check_feature_names_in, + check_is_fitted, + validate_data, +) +from ._base import _BaseImputer + + +class KNNImputer(_BaseImputer): + """Imputation for completing missing values using k-Nearest Neighbors. + + Each sample's missing values are imputed using the mean value from + `n_neighbors` nearest neighbors found in the training set. Two samples are + close if the features that neither is missing are close. + + Read more in the :ref:`User Guide `. + + .. versionadded:: 0.22 + + Parameters + ---------- + missing_values : int, float, str, np.nan or None, default=np.nan + The placeholder for the missing values. All occurrences of + `missing_values` will be imputed. For pandas' dataframes with + nullable integer dtypes with missing values, `missing_values` + should be set to np.nan, since `pd.NA` will be converted to np.nan. + + n_neighbors : int, default=5 + Number of neighboring samples to use for imputation. + + weights : {'uniform', 'distance'} or callable, default='uniform' + Weight function used in prediction. Possible values: + + - 'uniform' : uniform weights. All points in each neighborhood are + weighted equally. + - 'distance' : weight points by the inverse of their distance. + in this case, closer neighbors of a query point will have a + greater influence than neighbors which are further away. + - callable : a user-defined function which accepts an + array of distances, and returns an array of the same shape + containing the weights. + + metric : {'nan_euclidean'} or callable, default='nan_euclidean' + Distance metric for searching neighbors. Possible values: + + - 'nan_euclidean' + - callable : a user-defined function which conforms to the definition + of ``func_metric(x, y, *, missing_values=np.nan)``. `x` and `y` + corresponds to a row (i.e. 1-D arrays) of `X` and `Y`, respectively. + The callable should returns a scalar distance value. + + copy : bool, default=True + If True, a copy of X will be created. If False, imputation will + be done in-place whenever possible. + + add_indicator : bool, default=False + If True, a :class:`MissingIndicator` transform will stack onto the + output of the imputer's transform. This allows a predictive estimator + to account for missingness despite imputation. If a feature has no + missing values at fit/train time, the feature won't appear on the + missing indicator even if there are missing values at transform/test + time. + + keep_empty_features : bool, default=False + If True, features that consist exclusively of missing values when + `fit` is called are returned in results when `transform` is called. + The imputed value is always `0`. + + .. versionadded:: 1.2 + + Attributes + ---------- + indicator_ : :class:`~sklearn.impute.MissingIndicator` + Indicator used to add binary indicators for missing values. + ``None`` if add_indicator is False. + + n_features_in_ : int + Number of features seen during :term:`fit`. + + .. versionadded:: 0.24 + + feature_names_in_ : ndarray of shape (`n_features_in_`,) + Names of features seen during :term:`fit`. Defined only when `X` + has feature names that are all strings. + + .. versionadded:: 1.0 + + See Also + -------- + SimpleImputer : Univariate imputer for completing missing values + with simple strategies. + IterativeImputer : Multivariate imputer that estimates values to impute for + each feature with missing values from all the others. + + References + ---------- + * `Olga Troyanskaya, Michael Cantor, Gavin Sherlock, Pat Brown, Trevor + Hastie, Robert Tibshirani, David Botstein and Russ B. Altman, Missing + value estimation methods for DNA microarrays, BIOINFORMATICS Vol. 17 + no. 6, 2001 Pages 520-525. + `_ + + Examples + -------- + >>> import numpy as np + >>> from sklearn.impute import KNNImputer + >>> X = [[1, 2, np.nan], [3, 4, 3], [np.nan, 6, 5], [8, 8, 7]] + >>> imputer = KNNImputer(n_neighbors=2) + >>> imputer.fit_transform(X) + array([[1. , 2. , 4. ], + [3. , 4. , 3. ], + [5.5, 6. , 5. ], + [8. , 8. , 7. ]]) + + For a more detailed example see + :ref:`sphx_glr_auto_examples_impute_plot_missing_values.py`. + """ + + _parameter_constraints: dict = { + **_BaseImputer._parameter_constraints, + "n_neighbors": [Interval(Integral, 1, None, closed="left")], + "weights": [StrOptions({"uniform", "distance"}), callable, Hidden(None)], + "metric": [StrOptions(set(_NAN_METRICS)), callable], + "copy": ["boolean"], + } + + def __init__( + self, + *, + missing_values=np.nan, + n_neighbors=5, + weights="uniform", + metric="nan_euclidean", + copy=True, + add_indicator=False, + keep_empty_features=False, + ): + super().__init__( + missing_values=missing_values, + add_indicator=add_indicator, + keep_empty_features=keep_empty_features, + ) + self.n_neighbors = n_neighbors + self.weights = weights + self.metric = metric + self.copy = copy + + def _calc_impute(self, dist_pot_donors, n_neighbors, fit_X_col, mask_fit_X_col): + """Helper function to impute a single column. + + Parameters + ---------- + dist_pot_donors : ndarray of shape (n_receivers, n_potential_donors) + Distance matrix between the receivers and potential donors from + training set. There must be at least one non-nan distance between + a receiver and a potential donor. + + n_neighbors : int + Number of neighbors to consider. + + fit_X_col : ndarray of shape (n_potential_donors,) + Column of potential donors from training set. + + mask_fit_X_col : ndarray of shape (n_potential_donors,) + Missing mask for fit_X_col. + + Returns + ------- + imputed_values: ndarray of shape (n_receivers,) + Imputed values for receiver. + """ + # Get donors + donors_idx = np.argpartition(dist_pot_donors, n_neighbors - 1, axis=1)[ + :, :n_neighbors + ] + + # Get weight matrix from distance matrix + donors_dist = dist_pot_donors[ + np.arange(donors_idx.shape[0])[:, None], donors_idx + ] + + weight_matrix = _get_weights(donors_dist, self.weights) + + # fill nans with zeros + if weight_matrix is not None: + weight_matrix[np.isnan(weight_matrix)] = 0.0 + else: + weight_matrix = np.ones_like(donors_dist) + weight_matrix[np.isnan(donors_dist)] = 0.0 + + # Retrieve donor values and calculate kNN average + donors = fit_X_col.take(donors_idx) + donors_mask = mask_fit_X_col.take(donors_idx) + donors = np.ma.array(donors, mask=donors_mask) + + return np.ma.average(donors, axis=1, weights=weight_matrix).data + + @_fit_context(prefer_skip_nested_validation=True) + def fit(self, X, y=None): + """Fit the imputer on X. + + Parameters + ---------- + X : array-like shape of (n_samples, n_features) + Input data, where `n_samples` is the number of samples and + `n_features` is the number of features. + + y : Ignored + Not used, present here for API consistency by convention. + + Returns + ------- + self : object + The fitted `KNNImputer` class instance. + """ + # Check data integrity and calling arguments + if not is_scalar_nan(self.missing_values): + ensure_all_finite = True + else: + ensure_all_finite = "allow-nan" + + X = validate_data( + self, + X, + accept_sparse=False, + dtype=FLOAT_DTYPES, + ensure_all_finite=ensure_all_finite, + copy=self.copy, + ) + + self._fit_X = X + self._mask_fit_X = _get_mask(self._fit_X, self.missing_values) + self._valid_mask = ~np.all(self._mask_fit_X, axis=0) + + super()._fit_indicator(self._mask_fit_X) + + return self + + def transform(self, X): + """Impute all missing values in X. + + Parameters + ---------- + X : array-like of shape (n_samples, n_features) + The input data to complete. + + Returns + ------- + X : array-like of shape (n_samples, n_output_features) + The imputed dataset. `n_output_features` is the number of features + that is not always missing during `fit`. + """ + + check_is_fitted(self) + if not is_scalar_nan(self.missing_values): + ensure_all_finite = True + else: + ensure_all_finite = "allow-nan" + X = validate_data( + self, + X, + accept_sparse=False, + dtype=FLOAT_DTYPES, + force_writeable=True, + ensure_all_finite=ensure_all_finite, + copy=self.copy, + reset=False, + ) + + mask = _get_mask(X, self.missing_values) + mask_fit_X = self._mask_fit_X + valid_mask = self._valid_mask + + X_indicator = super()._transform_indicator(mask) + + # Removes columns where the training data is all nan + if not np.any(mask[:, valid_mask]): + # No missing values in X + if self.keep_empty_features: + Xc = X + Xc[:, ~valid_mask] = 0 + else: + Xc = X[:, valid_mask] + + # Even if there are no missing values in X, we still concatenate Xc + # with the missing value indicator matrix, X_indicator. + # This is to ensure that the output maintains consistency in terms + # of columns, regardless of whether missing values exist in X or not. + return super()._concatenate_indicator(Xc, X_indicator) + + row_missing_idx = np.flatnonzero(mask[:, valid_mask].any(axis=1)) + + non_missing_fix_X = np.logical_not(mask_fit_X) + + # Maps from indices from X to indices in dist matrix + dist_idx_map = np.zeros(X.shape[0], dtype=int) + dist_idx_map[row_missing_idx] = np.arange(row_missing_idx.shape[0]) + + def process_chunk(dist_chunk, start): + row_missing_chunk = row_missing_idx[start : start + len(dist_chunk)] + + # Find and impute missing by column + for col in range(X.shape[1]): + if not valid_mask[col]: + # column was all missing during training + continue + + col_mask = mask[row_missing_chunk, col] + if not np.any(col_mask): + # column has no missing values + continue + + (potential_donors_idx,) = np.nonzero(non_missing_fix_X[:, col]) + + # receivers_idx are indices in X + receivers_idx = row_missing_chunk[np.flatnonzero(col_mask)] + + # distances for samples that needed imputation for column + dist_subset = dist_chunk[dist_idx_map[receivers_idx] - start][ + :, potential_donors_idx + ] + + # receivers with all nan distances impute with mean + all_nan_dist_mask = np.isnan(dist_subset).all(axis=1) + all_nan_receivers_idx = receivers_idx[all_nan_dist_mask] + + if all_nan_receivers_idx.size: + col_mean = np.ma.array( + self._fit_X[:, col], mask=mask_fit_X[:, col] + ).mean() + X[all_nan_receivers_idx, col] = col_mean + + if len(all_nan_receivers_idx) == len(receivers_idx): + # all receivers imputed with mean + continue + + # receivers with at least one defined distance + receivers_idx = receivers_idx[~all_nan_dist_mask] + dist_subset = dist_chunk[dist_idx_map[receivers_idx] - start][ + :, potential_donors_idx + ] + + n_neighbors = min(self.n_neighbors, len(potential_donors_idx)) + value = self._calc_impute( + dist_subset, + n_neighbors, + self._fit_X[potential_donors_idx, col], + mask_fit_X[potential_donors_idx, col], + ) + X[receivers_idx, col] = value + + # process in fixed-memory chunks + gen = pairwise_distances_chunked( + X[row_missing_idx, :], + self._fit_X, + metric=self.metric, + missing_values=self.missing_values, + ensure_all_finite=ensure_all_finite, + reduce_func=process_chunk, + ) + for chunk in gen: + # process_chunk modifies X in place. No return value. + pass + + if self.keep_empty_features: + Xc = X + Xc[:, ~valid_mask] = 0 + else: + Xc = X[:, valid_mask] + + return super()._concatenate_indicator(Xc, X_indicator) + + def get_feature_names_out(self, input_features=None): + """Get output feature names for transformation. + + Parameters + ---------- + input_features : array-like of str or None, default=None + Input features. + + - If `input_features` is `None`, then `feature_names_in_` is + used as feature names in. If `feature_names_in_` is not defined, + then the following input feature names are generated: + `["x0", "x1", ..., "x(n_features_in_ - 1)"]`. + - If `input_features` is an array-like, then `input_features` must + match `feature_names_in_` if `feature_names_in_` is defined. + + Returns + ------- + feature_names_out : ndarray of str objects + Transformed feature names. + """ + check_is_fitted(self, "n_features_in_") + input_features = _check_feature_names_in(self, input_features) + names = input_features[self._valid_mask] + return self._concatenate_indicator_feature_names_out(names, input_features) diff --git a/shared/package-files/d6/d64eaf3a093a6c3eff4219a0750ce20823d67b80838ea1bcfe005b369ca971a9/narrow_copy_ops.h b/shared/package-files/d6/d64eaf3a093a6c3eff4219a0750ce20823d67b80838ea1bcfe005b369ca971a9/narrow_copy_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..3bbf91c63275a2b435f7030991fce1eedb1d39e5 --- /dev/null +++ b/shared/package-files/d6/d64eaf3a093a6c3eff4219a0750ce20823d67b80838ea1bcfe005b369ca971a9/narrow_copy_ops.h @@ -0,0 +1,39 @@ +#pragma once + +// @generated by torchgen/gen.py from Operator.h + +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { +namespace _ops { + + +struct TORCH_API narrow_copy { + using schema = at::Tensor (const at::Tensor &, int64_t, c10::SymInt, c10::SymInt); + using ptr_schema = schema*; + // See Note [static constexpr char* members for windows NVCC] + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::narrow_copy") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "narrow_copy(Tensor self, int dim, SymInt start, SymInt length) -> Tensor") + static at::Tensor call(const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length); + static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length); +}; + +struct TORCH_API narrow_copy_out { + using schema = at::Tensor & (const at::Tensor &, int64_t, c10::SymInt, c10::SymInt, at::Tensor &); + using ptr_schema = schema*; + // See Note [static constexpr char* members for windows NVCC] + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::narrow_copy") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "out") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "narrow_copy.out(Tensor self, int dim, SymInt start, SymInt length, *, Tensor(a!) out) -> Tensor(a!)") + static at::Tensor & call(const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length, at::Tensor & out); + static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, int64_t dim, c10::SymInt start, c10::SymInt length, at::Tensor & out); +}; + +}} // namespace at::_ops diff --git a/shared/package-files/d6/d654e7dbb66735047c936f6caaf1089e79d23db7e9f4eeb9642cba995c00017d/att620-103k-w b/shared/package-files/d6/d654e7dbb66735047c936f6caaf1089e79d23db7e9f4eeb9642cba995c00017d/att620-103k-w new file mode 100644 index 0000000000000000000000000000000000000000..3e681222bfdd2b4ff2dd1ce71e8edc029b5c53a8 Binary files /dev/null and b/shared/package-files/d6/d654e7dbb66735047c936f6caaf1089e79d23db7e9f4eeb9642cba995c00017d/att620-103k-w differ diff --git a/shared/package-files/d6/d658a0be19c1975e06e2be07afd0ff1b8baccfcd44ce0c702039256393f58410/ros.py b/shared/package-files/d6/d658a0be19c1975e06e2be07afd0ff1b8baccfcd44ce0c702039256393f58410/ros.py new file mode 100644 index 0000000000000000000000000000000000000000..4738a9873abe419ac92b8ca21b8328cdcb5fa715 --- /dev/null +++ b/shared/package-files/d6/d658a0be19c1975e06e2be07afd0ff1b8baccfcd44ce0c702039256393f58410/ros.py @@ -0,0 +1,612 @@ +""" +Implementation of Regression on Order Statistics for imputing left- +censored (non-detect data) + +Method described in *Nondetects and Data Analysis* by Dennis R. +Helsel (John Wiley, 2005) to estimate the left-censored (non-detect) +values of a dataset. + +Author: Paul M. Hobson +Company: Geosyntec Consultants (Portland, OR) +Date: 2016-06-14 + +""" + +import warnings + +import numpy as np +import pandas as pd +from scipy import stats + +from statsmodels.tools.sm_exceptions import SpecificationWarning + + +def _ros_sort(df, observations, censorship, warn=False): + """ + Prepare a dataframe for ROS + + It sorts ascending with + left-censored observations first. Censored observations larger than + the maximum uncensored observations are removed from the dataframe. + + Parameters + ---------- + df : DataFrame + The data to be sorted. + + observations : str + Name of the column in the dataframe that contains observed + values. Censored values should be set to the detection (upper) + limit. + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + warn : bool, optional + Whether to warn when censored observations larger than the + maximum uncensored observation are dropped. + + Returns + ------- + sorted_df : DataFrame + The sorted dataframe with all columns dropped except the + observation and censorship columns. + """ + + # separate uncensored data from censored data + censored = df[df[censorship]].sort_values(observations, axis=0) + uncensored = df[~df[censorship]].sort_values(observations, axis=0) + + if censored[observations].max() > uncensored[observations].max(): + censored = censored[censored[observations] <= uncensored[observations].max()] + + if warn: + msg = ( + "Dropping censored observations greater than " + "the max uncensored observation." + ) + warnings.warn(msg, SpecificationWarning, stacklevel=2) + + combined = pd.concat([censored, uncensored], axis=0) + return combined[[observations, censorship]].reset_index(drop=True) + + +def cohn_numbers(df, observations, censorship): + r""" + Compute the Cohn numbers for the detection limits in the dataset + + The Cohn Numbers are: + + - :math:`A_j =` the number of uncensored obs above the jth + threshold. + - :math:`B_j =` the number of observations (cen & uncen) below + the jth threshold. + - :math:`C_j =` the number of censored observations at the jth + threshold. + - :math:`\mathrm{PE}_j =` the probability of exceeding the jth + threshold + - :math:`\mathrm{DL}_j =` the unique, sorted detection limits + - :math:`\mathrm{DL}_{j+1} = \mathrm{DL}_j` shifted down a + single index (row) + + Parameters + ---------- + df : DataFrame + The data used to compute the Cohn numbers. + + observations : str + Name of the column in the dataframe that contains observed + values. Censored values should be set to the detection (upper) + limit. + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + Returns + ------- + cohn : DataFrame + The dataframe of Cohn numbers. + """ + + def nuncen_above(row): + """A, the number of uncensored obs above the given threshold""" + + # index of observations above the lower_dl DL + above = df[observations] >= row["lower_dl"] + + # index of observations below the upper_dl DL + below = df[observations] < row["upper_dl"] + + # index of non-detect observations + detect = ~df[censorship] + + # return the number of observations where all conditions are True + return df[above & below & detect].shape[0] + + def nobs_below(row): + """B, the number of observations (cen and uncen) below the given threshold""" + + # index of data less than the lower_dl DL + less_than = df[observations] < row["lower_dl"] + + # index of data less than or equal to the lower_dl DL + less_thanequal = df[observations] <= row["lower_dl"] + + # index of detects, non-detects + uncensored = ~df[censorship] + censored = df[censorship] + + # number observations less than or equal to lower_dl DL and non-detect + LTE_censored = df[less_thanequal & censored].shape[0] + + # number of observations less than lower_dl DL and detected + LT_uncensored = df[less_than & uncensored].shape[0] + + # return the sum + return LTE_censored + LT_uncensored + + def ncen_equal(row): + """C, the number of censored observations at the given threshold""" + + censored_index = df[censorship] + censored_data = df[observations][censored_index] + censored_below = censored_data == row["lower_dl"] + return censored_below.sum() + + def set_upper_limit(cohn): + """Set the upper_dl DL for each row of the Cohn dataframe""" + if cohn.shape[0] > 1: + return cohn["lower_dl"].shift(-1).fillna(value=np.inf) + else: + return [np.inf] + + def compute_PE(A, B): + """Compute the probability of exceedance for each row of the Cohn dataframe""" + N = len(A) + PE = np.empty(N, dtype="float64") + PE[-1] = 0.0 + for j in range(N - 2, -1, -1): + PE[j] = PE[j + 1] + (1 - PE[j + 1]) * A[j] / (A[j] + B[j]) + + return PE + + # unique, sorted detection limts + censored_data = df[censorship] + DLs = pd.unique(df.loc[censored_data, observations]) + DLs.sort() + + # if there is a observations smaller than the minimum detection limit, + # add that value to the array + if DLs.shape[0] > 0: + if df[observations].min() < DLs.min(): + DLs = np.hstack([df[observations].min(), DLs]) + + # create a dataframe + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + cohn = pd.DataFrame(DLs, columns=["lower_dl"]) + cohn.loc[:, "upper_dl"] = set_upper_limit(cohn) + cohn.loc[:, "nuncen_above"] = cohn.apply(nuncen_above, axis=1) + cohn.loc[:, "nobs_below"] = cohn.apply(nobs_below, axis=1) + cohn.loc[:, "ncen_equal"] = cohn.apply(ncen_equal, axis=1) + cohn = cohn.reindex(range(DLs.shape[0] + 1)) + cohn.loc[:, "prob_exceedance"] = compute_PE( + cohn["nuncen_above"], cohn["nobs_below"] + ) + + else: + dl_cols = [ + "lower_dl", + "upper_dl", + "nuncen_above", + "nobs_below", + "ncen_equal", + "prob_exceedance", + ] + cohn = pd.DataFrame(np.empty((0, len(dl_cols))), columns=dl_cols) + + return cohn + + +def _detection_limit_index(obs, cohn): + """ + Locates the corresponding detection limit for each observation. + + Basically, creates an array of indices for the detection limits + (Cohn numbers) corresponding to each data point. + + Parameters + ---------- + obs : float + A single observation from the larger dataset. + + cohn : DataFrame + DataFrame of Cohn numbers. + + Returns + ------- + det_limit_index : int + The index of the corresponding detection limit in `cohn` + + See Also + -------- + cohn_numbers + """ + + if cohn.shape[0] > 0: + (index,) = np.where(cohn["lower_dl"] <= obs) + det_limit_index = index[-1] + else: + det_limit_index = 0 + + return det_limit_index + + +def _ros_group_rank(df, dl_idx, censorship): + """ + Ranks each observation within the data groups. + + In this case, the groups are defined by the record's detection + limit index and censorship status. + + Parameters + ---------- + df : DataFrame + + dl_idx : str + Name of the column in the dataframe the index of the + observations' corresponding detection limit in the `cohn` + dataframe. + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + Returns + ------- + ranks : Series + Series of ranks for the dataset. + """ + + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + ranks = df.copy() + ranks.loc[:, "rank"] = 1 + ranks = ranks.groupby(by=[dl_idx, censorship])["rank"].transform( + lambda g: g.cumsum() + ) + return ranks + + +def _ros_plot_pos(row, censorship, cohn): + """ + ROS-specific plotting positions. + + Computes the plotting position for an observation based on its rank, + censorship status, and detection limit index. + + Parameters + ---------- + row : Series or dict + Full observation (row) from a censored dataset. Requires a + 'rank', 'det_limit_index', and `censorship` column. + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + cohn : DataFrame + DataFrame of Cohn numbers. + + Returns + ------- + plotting_position : float + + See Also + -------- + cohn_numbers + """ + + DL_index = row["det_limit_index"] + rank = row["rank"] + censored = row[censorship] + + dl_1 = cohn.iloc[DL_index] + dl_2 = cohn.iloc[DL_index + 1] + if censored: + return (1 - dl_1["prob_exceedance"]) * rank / (dl_1["ncen_equal"] + 1) + else: + return (1 - dl_1["prob_exceedance"]) + ( + dl_1["prob_exceedance"] - dl_2["prob_exceedance"] + ) * rank / (dl_1["nuncen_above"] + 1) + + +def _norm_plot_pos(observations): + """ + Computes standard normal (Gaussian) plotting positions using scipy. + + Parameters + ---------- + observations : array_like + Sequence of observed quantities. + + Returns + ------- + plotting_position : ndarray + Array of standard normal plotting positions. + """ + ppos, sorted_res = stats.probplot(observations, fit=False) + return stats.norm.cdf(ppos) + + +def plotting_positions(df, censorship, cohn): + """ + Compute the plotting positions for the observations. + + The ROS-specific plotting positions are based on the observations' + rank, censorship status, and corresponding detection limit. + + Parameters + ---------- + df : DataFrame + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + cohn : DataFrame + DataFrame of Cohn numbers. + + Returns + ------- + plotting_position : Series + Series of plotting positions. + + See Also + -------- + cohn_numbers + """ + + plot_pos = df.apply(lambda r: _ros_plot_pos(r, censorship, cohn), axis=1) + + # correctly sort the plotting positions of the ND data: + ND_plotpos = plot_pos[df[censorship]] + ND_plotpos_arr = np.sort(np.array(ND_plotpos)) + plot_pos.loc[df[censorship].index[df[censorship]]] = ND_plotpos_arr + + return plot_pos + + +def _impute(df, observations, censorship, transform_in, transform_out): + """ + Execute the basic regression on order stat (ROS) procedure + + Uses ROS to impute censored from the best-fit line of a + probability plot of the uncensored values. + + Parameters + ---------- + df : DataFrame + The data to be imputed. Must contain a "Zprelim" column of + normal scores used to fit the regression line. + observations : str + Name of the column in the dataframe that contains observed + values. Censored values should be set to the detection (upper) + limit. + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + transform_in, transform_out : callable + Transformations to be applied to the data prior to fitting + the line and after estimated values from that line. Typically, + `np.log` and `np.exp` are used, respectively. + + Returns + ------- + estimated : DataFrame + A new dataframe with two new columns: "estimated" and "final". + The "estimated" column contains of the values inferred from the + best-fit line. The "final" column contains the estimated values + only where the original observations were censored, and the original + observations everywhere else. + """ + + # detect/non-detect selectors + uncensored_mask = ~df[censorship] + censored_mask = df[censorship] + + # fit a line to the logs of the detected data + fit_params = stats.linregress( + df["Zprelim"][uncensored_mask], transform_in(df[observations][uncensored_mask]) + ) + + # pull out the slope and intercept for use later + slope, intercept = fit_params[:2] + + # model the data based on the best-fit curve + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + df.loc[:, "estimated"] = transform_out( + slope * df["Zprelim"][censored_mask] + intercept + ) + df.loc[:, "final"] = np.where(df[censorship], df["estimated"], df[observations]) + + return df + + +def _do_ros(df, observations, censorship, transform_in, transform_out): + """ + DataFrame-centric function to impute censored values with ROS + + Prepares a dataframe for, and then estimates the values of a censored + dataset using Regression on Order Statistics. + + Parameters + ---------- + df : DataFrame + The data to be imputed. + + observations : str + Name of the column in the dataframe that contains observed + values. Censored values should be set to the detection (upper) + limit. + + censorship : str + Name of the column in the dataframe that indicates that a + observation is left-censored. (i.e., True -> censored, + False -> uncensored) + + transform_in, transform_out : callable + Transformations to be applied to the data prior to fitting + the line and after estimated values from that line. Typically, + `np.log` and `np.exp` are used, respectively. + + Returns + ------- + estimated : DataFrame + A new dataframe with two new columns: "estimated" and "final". + The "estimated" column contains of the values inferred from the + best-fit line. The "final" column contains the estimated values + only where the original observations were censored, and the original + observations everywhere else. + """ + + # compute the Cohn numbers + cohn = cohn_numbers(df, observations=observations, censorship=censorship) + + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + modeled = _ros_sort(df, observations=observations, censorship=censorship) + modeled.loc[:, "det_limit_index"] = modeled[observations].apply( + _detection_limit_index, args=(cohn,) + ) + modeled.loc[:, "rank"] = _ros_group_rank(modeled, "det_limit_index", censorship) + modeled.loc[:, "plot_pos"] = plotting_positions(modeled, censorship, cohn) + modeled.loc[:, "Zprelim"] = stats.norm.ppf(modeled["plot_pos"]) + + return _impute(modeled, observations, censorship, transform_in, transform_out) + + +def impute_ros( + observations, + censorship, + df=None, + min_uncensored=2, + max_fraction_censored=0.8, + substitution_fraction=0.5, + transform_in=np.log, + transform_out=np.exp, + as_array=True, +): + """ + Impute censored dataset using Regression on Order Statistics (ROS) + + Method described in *Nondetects and Data Analysis* by Dennis R. + Helsel (John Wiley, 2005) to estimate the left-censored (non-detect) + values of a dataset. When there is insufficient non-censored data, + simple substitution is used. + + Parameters + ---------- + observations : str or array_like + Label of the column or the float array of censored observations + + censorship : str or array_like + Label of the column or the bool array of the censorship + status of the observations. + + * True if censored, + * False if uncensored + + df : DataFrame, optional + If `observations` and `censorship` are labels, this is the + DataFrame that contains those columns. + + min_uncensored : int, optional + The minimum number of uncensored values required before ROS + can be used to impute the censored observations. When this + criterion is not met, simple substitution is used instead. + Default is 2. + + max_fraction_censored : float, optional + The maximum fraction of censored data below which ROS can be + used to impute the censored observations. When this fraction is + exceeded, simple substituion is used instead. Default is 0.8. + + substitution_fraction : float, optional + The fraction of the detection limit to be used during simple + substitution of the censored values. Default is 0.5. + + transform_in : callable, optional + Transformation to be applied to the values prior to fitting a + line to the plotting positions vs. uncensored values. Default + is ``np.log``. + + transform_out : callable, optional + Transformation to be applied to the imputed censored values + estimated from the previously computed best-fit line. Default + is ``np.exp``. + + as_array : bool, optional + When True, a numpy array of the imputed observations is + returned. Otherwise, a modified copy of the original dataframe + with all of the intermediate calculations is returned. Default + is True. + + Returns + ------- + imputed : ndarray or DataFrame + The final observations where the censored values have either been + imputed through ROS or substituted as a fraction of the + detection limit. + + Notes + ----- + This function requires pandas 0.14 or more recent. + """ + + # process arrays into a dataframe, if necessary + if df is None: + df = pd.DataFrame({"obs": observations, "cen": censorship}) + observations = "obs" + censorship = "cen" + + # basic counts/metrics of the dataset + N_observations = df.shape[0] + N_censored = df[censorship].astype(int).sum() + N_uncensored = N_observations - N_censored + fraction_censored = N_censored / N_observations + + # add plotting positions if there are no censored values + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + if N_censored == 0: + output = df[[observations, censorship]].copy() + output.loc[:, "final"] = df[observations] + + # substitute w/ fraction of the DLs if there's insufficient + # uncensored data + # (editted for pandas 0.14 compatibility; see commit 63f162e + # when `pipe` and `assign` are available) + elif (N_uncensored < min_uncensored) or (fraction_censored > max_fraction_censored): + output = df[[observations, censorship]].copy() + output.loc[:, "final"] = df[observations] + output.loc[df[censorship], "final"] *= substitution_fraction + + # normal ROS stuff + else: + output = _do_ros(df, observations, censorship, transform_in, transform_out) + + # convert to an array if necessary + if as_array: + output = output["final"].values + + return output diff --git a/shared/package-files/d6/d65c2a89d2a4e5cdd32a87a7db71b6f5fd65c8bd74fb4774f7dc35b254593873/cudnn_affine_grid_generator_native.h b/shared/package-files/d6/d65c2a89d2a4e5cdd32a87a7db71b6f5fd65c8bd74fb4774f7dc35b254593873/cudnn_affine_grid_generator_native.h new file mode 100644 index 0000000000000000000000000000000000000000..b30bbd728621cf7c5247294c0b368f9fed50802b --- /dev/null +++ b/shared/package-files/d6/d65c2a89d2a4e5cdd32a87a7db71b6f5fd65c8bd74fb4774f7dc35b254593873/cudnn_affine_grid_generator_native.h @@ -0,0 +1,22 @@ +#pragma once + +// @generated by torchgen/gen.py from NativeFunction.h + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +namespace at { +namespace native { +TORCH_API at::Tensor & cudnn_affine_grid_generator_out(const at::Tensor & theta, int64_t N, int64_t C, int64_t H, int64_t W, at::Tensor & out); +TORCH_API at::Tensor cudnn_affine_grid_generator_forward(const at::Tensor & theta, int64_t N, int64_t C, int64_t H, int64_t W); +} // namespace native +} // namespace at diff --git a/shared/package-files/d6/d668b1518304dba5f75c2f51d689eb9db1fdd5be52f7828fa6755945cd19d020/cyaml.pyi b/shared/package-files/d6/d668b1518304dba5f75c2f51d689eb9db1fdd5be52f7828fa6755945cd19d020/cyaml.pyi new file mode 100644 index 0000000000000000000000000000000000000000..50f7af2f178c9e2cf4f2c29893ebfd00e57e53d9 --- /dev/null +++ b/shared/package-files/d6/d668b1518304dba5f75c2f51d689eb9db1fdd5be52f7828fa6755945cd19d020/cyaml.pyi @@ -0,0 +1,63 @@ +from _typeshed import SupportsRead +from typing import IO, Any, Mapping, Optional, Sequence, Text, Union + +from yaml.constructor import BaseConstructor, Constructor, SafeConstructor +from yaml.representer import BaseRepresenter, Representer, SafeRepresenter +from yaml.resolver import BaseResolver, Resolver +from yaml.serializer import Serializer + +_Readable = SupportsRead[Union[Text, bytes]] + +class CParser: + def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... + +class CBaseLoader(CParser, BaseConstructor, BaseResolver): + def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... + +class CLoader(CParser, SafeConstructor, Resolver): + def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... + +class CSafeLoader(CParser, SafeConstructor, Resolver): + def __init__(self, stream: Union[str, bytes, _Readable]) -> None: ... + +class CDangerLoader(CParser, Constructor, Resolver): ... # undocumented + +class CEmitter(object): + def __init__( + self, + stream: IO[Any], + canonical: Optional[Any] = ..., + indent: Optional[int] = ..., + width: Optional[int] = ..., + allow_unicode: Optional[Any] = ..., + line_break: Optional[str] = ..., + encoding: Optional[Text] = ..., + explicit_start: Optional[Any] = ..., + explicit_end: Optional[Any] = ..., + version: Optional[Sequence[int]] = ..., + tags: Optional[Mapping[Text, Text]] = ..., + ) -> None: ... + +class CBaseDumper(CEmitter, BaseRepresenter, BaseResolver): + def __init__( + self, + stream: IO[Any], + default_style: Optional[str] = ..., + default_flow_style: Optional[bool] = ..., + canonical: Optional[Any] = ..., + indent: Optional[int] = ..., + width: Optional[int] = ..., + allow_unicode: Optional[Any] = ..., + line_break: Optional[str] = ..., + encoding: Optional[Text] = ..., + explicit_start: Optional[Any] = ..., + explicit_end: Optional[Any] = ..., + version: Optional[Sequence[int]] = ..., + tags: Optional[Mapping[Text, Text]] = ..., + ) -> None: ... + +class CDumper(CEmitter, SafeRepresenter, Resolver): ... + +CSafeDumper = CDumper + +class CDangerDumper(CEmitter, Serializer, Representer, Resolver): ... # undocumented diff --git a/shared/package-files/d6/d66ab1c4b5c4492ce5888976e2e0a29c01707a0b8bf213d2d3aa4a3d27fab3f2/slow_conv3d_forward_ops.h b/shared/package-files/d6/d66ab1c4b5c4492ce5888976e2e0a29c01707a0b8bf213d2d3aa4a3d27fab3f2/slow_conv3d_forward_ops.h new file mode 100644 index 0000000000000000000000000000000000000000..e312b4b670c447bc0ebcd4bd376033b87d051b82 --- /dev/null +++ b/shared/package-files/d6/d66ab1c4b5c4492ce5888976e2e0a29c01707a0b8bf213d2d3aa4a3d27fab3f2/slow_conv3d_forward_ops.h @@ -0,0 +1,39 @@ +#pragma once + +// @generated by torchgen/gen.py from Operator.h + +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { +namespace _ops { + + +struct TORCH_API slow_conv3d_forward_output { + using schema = at::Tensor & (const at::Tensor &, const at::Tensor &, c10::SymIntArrayRef, const c10::optional &, c10::SymIntArrayRef, c10::SymIntArrayRef, at::Tensor &); + using ptr_schema = schema*; + // See Note [static constexpr char* members for windows NVCC] + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::slow_conv3d_forward") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "output") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "slow_conv3d_forward.output(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding, *, Tensor(a!) output) -> Tensor(a!)") + static at::Tensor & call(const at::Tensor & self, const at::Tensor & weight, c10::SymIntArrayRef kernel_size, const c10::optional & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, at::Tensor & output); + static at::Tensor & redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & weight, c10::SymIntArrayRef kernel_size, const c10::optional & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding, at::Tensor & output); +}; + +struct TORCH_API slow_conv3d_forward { + using schema = at::Tensor (const at::Tensor &, const at::Tensor &, c10::SymIntArrayRef, const c10::optional &, c10::SymIntArrayRef, c10::SymIntArrayRef); + using ptr_schema = schema*; + // See Note [static constexpr char* members for windows NVCC] + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(name, "aten::slow_conv3d_forward") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(overload_name, "") + STATIC_CONSTEXPR_STR_INL_EXCEPT_WIN_CUDA(schema_str, "slow_conv3d_forward(Tensor self, Tensor weight, SymInt[3] kernel_size, Tensor? bias, SymInt[3] stride, SymInt[3] padding) -> Tensor") + static at::Tensor call(const at::Tensor & self, const at::Tensor & weight, c10::SymIntArrayRef kernel_size, const c10::optional & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding); + static at::Tensor redispatch(c10::DispatchKeySet dispatchKeySet, const at::Tensor & self, const at::Tensor & weight, c10::SymIntArrayRef kernel_size, const c10::optional & bias, c10::SymIntArrayRef stride, c10::SymIntArrayRef padding); +}; + +}} // namespace at::_ops diff --git a/shared/package-files/d6/d66fbf2ce0769a5dfcaaf71fd504355ddd80af0c263fb4695d1dded0feed0be7/_testing.py b/shared/package-files/d6/d66fbf2ce0769a5dfcaaf71fd504355ddd80af0c263fb4695d1dded0feed0be7/_testing.py new file mode 100644 index 0000000000000000000000000000000000000000..6582bb763641e8027be9e069156c8ae1e9f7aa61 --- /dev/null +++ b/shared/package-files/d6/d66fbf2ce0769a5dfcaaf71fd504355ddd80af0c263fb4695d1dded0feed0be7/_testing.py @@ -0,0 +1,1454 @@ +"""Testing utilities.""" + +# Authors: The scikit-learn developers +# SPDX-License-Identifier: BSD-3-Clause + +import atexit +import contextlib +import functools +import importlib +import inspect +import os +import os.path as op +import re +import shutil +import sys +import tempfile +import textwrap +import unittest +import warnings +from collections import defaultdict, namedtuple +from collections.abc import Iterable +from dataclasses import dataclass +from difflib import context_diff +from functools import wraps +from inspect import signature +from itertools import chain, groupby +from subprocess import STDOUT, CalledProcessError, TimeoutExpired, check_output + +import joblib +import numpy as np +import scipy as sp +from numpy.testing import assert_allclose as np_assert_allclose +from numpy.testing import ( + assert_almost_equal, + assert_array_almost_equal, + assert_array_equal, + assert_array_less, +) + +import sklearn +from sklearn.utils import ( + ClassifierTags, + RegressorTags, + Tags, + TargetTags, + TransformerTags, +) +from sklearn.utils._array_api import _check_array_api_dispatch +from sklearn.utils.fixes import ( + _IS_32BIT, + VisibleDeprecationWarning, + _in_unstable_openblas_configuration, +) +from sklearn.utils.multiclass import check_classification_targets +from sklearn.utils.validation import ( + check_array, + check_is_fitted, + check_X_y, +) + +__all__ = [ + "SkipTest", + "assert_allclose", + "assert_almost_equal", + "assert_array_almost_equal", + "assert_array_equal", + "assert_array_less", + "assert_run_python_script_without_output", +] + +SkipTest = unittest.case.SkipTest + + +def ignore_warnings(obj=None, category=Warning): + """Context manager and decorator to ignore warnings. + + Note: Using this (in both variants) will clear all warnings + from all python modules loaded. In case you need to test + cross-module-warning-logging, this is not your tool of choice. + + Parameters + ---------- + obj : callable, default=None + callable where you want to ignore the warnings. + category : warning class, default=Warning + The category to filter. If Warning, all categories will be muted. + + Examples + -------- + >>> import warnings + >>> from sklearn.utils._testing import ignore_warnings + >>> with ignore_warnings(): + ... warnings.warn('buhuhuhu') + + >>> def nasty_warn(): + ... warnings.warn('buhuhuhu') + ... print(42) + + >>> ignore_warnings(nasty_warn)() + 42 + """ + if isinstance(obj, type) and issubclass(obj, Warning): + # Avoid common pitfall of passing category as the first positional + # argument which result in the test not being run + warning_name = obj.__name__ + raise ValueError( + "'obj' should be a callable where you want to ignore warnings. " + "You passed a warning class instead: 'obj={warning_name}'. " + "If you want to pass a warning class to ignore_warnings, " + "you should use 'category={warning_name}'".format(warning_name=warning_name) + ) + elif callable(obj): + return _IgnoreWarnings(category=category)(obj) + else: + return _IgnoreWarnings(category=category) + + +class _IgnoreWarnings: + """Improved and simplified Python warnings context manager and decorator. + + This class allows the user to ignore the warnings raised by a function. + Copied from Python 2.7.5 and modified as required. + + Parameters + ---------- + category : tuple of warning class, default=Warning + The category to filter. By default, all the categories will be muted. + + """ + + def __init__(self, category): + self._record = True + self._module = sys.modules["warnings"] + self._entered = False + self.log = [] + self.category = category + + def __call__(self, fn): + """Decorator to catch and hide warnings without visual nesting.""" + + @wraps(fn) + def wrapper(*args, **kwargs): + with warnings.catch_warnings(): + warnings.simplefilter("ignore", self.category) + return fn(*args, **kwargs) + + return wrapper + + def __repr__(self): + args = [] + if self._record: + args.append("record=True") + if self._module is not sys.modules["warnings"]: + args.append("module=%r" % self._module) + name = type(self).__name__ + return "%s(%s)" % (name, ", ".join(args)) + + def __enter__(self): + if self._entered: + raise RuntimeError("Cannot enter %r twice" % self) + self._entered = True + self._filters = self._module.filters + self._module.filters = self._filters[:] + self._showwarning = self._module.showwarning + warnings.simplefilter("ignore", self.category) + + def __exit__(self, *exc_info): + if not self._entered: + raise RuntimeError("Cannot exit %r without entering first" % self) + self._module.filters = self._filters + self._module.showwarning = self._showwarning + self.log[:] = [] + + +def assert_allclose( + actual, desired, rtol=None, atol=0.0, equal_nan=True, err_msg="", verbose=True +): + """dtype-aware variant of numpy.testing.assert_allclose + + This variant introspects the least precise floating point dtype + in the input argument and automatically sets the relative tolerance + parameter to 1e-4 float32 and use 1e-7 otherwise (typically float64 + in scikit-learn). + + `atol` is always left to 0. by default. It should be adjusted manually + to an assertion-specific value in case there are null values expected + in `desired`. + + The aggregate tolerance is `atol + rtol * abs(desired)`. + + Parameters + ---------- + actual : array_like + Array obtained. + desired : array_like + Array desired. + rtol : float, optional, default=None + Relative tolerance. + If None, it is set based on the provided arrays' dtypes. + atol : float, optional, default=0. + Absolute tolerance. + equal_nan : bool, optional, default=True + If True, NaNs will compare equal. + err_msg : str, optional, default='' + The error message to be printed in case of failure. + verbose : bool, optional, default=True + If True, the conflicting values are appended to the error message. + + Raises + ------ + AssertionError + If actual and desired are not equal up to specified precision. + + See Also + -------- + numpy.testing.assert_allclose + + Examples + -------- + >>> import numpy as np + >>> from sklearn.utils._testing import assert_allclose + >>> x = [1e-5, 1e-3, 1e-1] + >>> y = np.arccos(np.cos(x)) + >>> assert_allclose(x, y, rtol=1e-5, atol=0) + >>> a = np.full(shape=10, fill_value=1e-5, dtype=np.float32) + >>> assert_allclose(a, 1e-5) + """ + dtypes = [] + + actual, desired = np.asanyarray(actual), np.asanyarray(desired) + dtypes = [actual.dtype, desired.dtype] + + if rtol is None: + rtols = [1e-4 if dtype == np.float32 else 1e-7 for dtype in dtypes] + rtol = max(rtols) + + np_assert_allclose( + actual, + desired, + rtol=rtol, + atol=atol, + equal_nan=equal_nan, + err_msg=err_msg, + verbose=verbose, + ) + + +def assert_allclose_dense_sparse(x, y, rtol=1e-07, atol=1e-9, err_msg=""): + """Assert allclose for sparse and dense data. + + Both x and y need to be either sparse or dense, they + can't be mixed. + + Parameters + ---------- + x : {array-like, sparse matrix} + First array to compare. + + y : {array-like, sparse matrix} + Second array to compare. + + rtol : float, default=1e-07 + relative tolerance; see numpy.allclose. + + atol : float, default=1e-9 + absolute tolerance; see numpy.allclose. Note that the default here is + more tolerant than the default for numpy.testing.assert_allclose, where + atol=0. + + err_msg : str, default='' + Error message to raise. + """ + if sp.sparse.issparse(x) and sp.sparse.issparse(y): + x = x.tocsr() + y = y.tocsr() + x.sum_duplicates() + y.sum_duplicates() + assert_array_equal(x.indices, y.indices, err_msg=err_msg) + assert_array_equal(x.indptr, y.indptr, err_msg=err_msg) + assert_allclose(x.data, y.data, rtol=rtol, atol=atol, err_msg=err_msg) + elif not sp.sparse.issparse(x) and not sp.sparse.issparse(y): + # both dense + assert_allclose(x, y, rtol=rtol, atol=atol, err_msg=err_msg) + else: + raise ValueError( + "Can only compare two sparse matrices, not a sparse matrix and an array." + ) + + +def set_random_state(estimator, random_state=0): + """Set random state of an estimator if it has the `random_state` param. + + Parameters + ---------- + estimator : object + The estimator. + random_state : int, RandomState instance or None, default=0 + Pseudo random number generator state. + Pass an int for reproducible results across multiple function calls. + See :term:`Glossary `. + """ + if "random_state" in estimator.get_params(): + estimator.set_params(random_state=random_state) + + +def _is_numpydoc(): + try: + import numpydoc # noqa: F401 + except (ImportError, AssertionError): + return False + else: + return True + + +try: + _check_array_api_dispatch(True) + ARRAY_API_COMPAT_FUNCTIONAL = True +except (ImportError, RuntimeError): + ARRAY_API_COMPAT_FUNCTIONAL = False + +try: + import pytest + + skip_if_32bit = pytest.mark.skipif(_IS_32BIT, reason="skipped on 32bit platforms") + fails_if_unstable_openblas = pytest.mark.xfail( + _in_unstable_openblas_configuration(), + reason="OpenBLAS is unstable for this configuration", + ) + skip_if_no_parallel = pytest.mark.skipif( + not joblib.parallel.mp, reason="joblib is in serial mode" + ) + skip_if_array_api_compat_not_configured = pytest.mark.skipif( + not ARRAY_API_COMPAT_FUNCTIONAL, + reason="SCIPY_ARRAY_API not set, or versions of NumPy/SciPy too old.", + ) + + # Decorator for tests involving both BLAS calls and multiprocessing. + # + # Under POSIX (e.g. Linux or OSX), using multiprocessing in conjunction + # with some implementation of BLAS (or other libraries that manage an + # internal posix thread pool) can cause a crash or a freeze of the Python + # process. + # + # In practice all known packaged distributions (from Linux distros or + # Anaconda) of BLAS under Linux seems to be safe. So we this problem seems + # to only impact OSX users. + # + # This wrapper makes it possible to skip tests that can possibly cause + # this crash under OS X with. + # + # Under Python 3.4+ it is possible to use the `forkserver` start method + # for multiprocessing to avoid this issue. However it can cause pickling + # errors on interactively defined functions. It therefore not enabled by + # default. + + if_safe_multiprocessing_with_blas = pytest.mark.skipif( + sys.platform == "darwin", reason="Possible multi-process bug with some BLAS" + ) + skip_if_no_numpydoc = pytest.mark.skipif( + not _is_numpydoc(), + reason="numpydoc is required to test the docstrings", + ) +except ImportError: + pass + + +def check_skip_network(): + if int(os.environ.get("SKLEARN_SKIP_NETWORK_TESTS", 0)): + raise SkipTest("Text tutorial requires large dataset download") + + +def _delete_folder(folder_path, warn=False): + """Utility function to cleanup a temporary folder if still existing. + + Copy from joblib.pool (for independence). + """ + try: + if os.path.exists(folder_path): + # This can fail under windows, + # but will succeed when called by atexit + shutil.rmtree(folder_path) + except OSError: + if warn: + warnings.warn("Could not delete temporary folder %s" % folder_path) + + +class TempMemmap: + """ + Parameters + ---------- + data + mmap_mode : str, default='r' + """ + + def __init__(self, data, mmap_mode="r"): + self.mmap_mode = mmap_mode + self.data = data + + def __enter__(self): + data_read_only, self.temp_folder = create_memmap_backed_data( + self.data, mmap_mode=self.mmap_mode, return_folder=True + ) + return data_read_only + + def __exit__(self, exc_type, exc_val, exc_tb): + _delete_folder(self.temp_folder) + + +def create_memmap_backed_data(data, mmap_mode="r", return_folder=False): + """ + Parameters + ---------- + data + mmap_mode : str, default='r' + return_folder : bool, default=False + """ + temp_folder = tempfile.mkdtemp(prefix="sklearn_testing_") + atexit.register(functools.partial(_delete_folder, temp_folder, warn=True)) + filename = op.join(temp_folder, "data.pkl") + joblib.dump(data, filename) + memmap_backed_data = joblib.load(filename, mmap_mode=mmap_mode) + result = ( + memmap_backed_data if not return_folder else (memmap_backed_data, temp_folder) + ) + return result + + +# Utils to test docstrings + + +def _get_args(function, varargs=False): + """Helper to get function arguments.""" + + try: + params = signature(function).parameters + except ValueError: + # Error on builtin C function + return [] + args = [ + key + for key, param in params.items() + if param.kind not in (param.VAR_POSITIONAL, param.VAR_KEYWORD) + ] + if varargs: + varargs = [ + param.name + for param in params.values() + if param.kind == param.VAR_POSITIONAL + ] + if len(varargs) == 0: + varargs = None + return args, varargs + else: + return args + + +def _get_func_name(func): + """Get function full name. + + Parameters + ---------- + func : callable + The function object. + + Returns + ------- + name : str + The function name. + """ + parts = [] + module = inspect.getmodule(func) + if module: + parts.append(module.__name__) + + qualname = func.__qualname__ + if qualname != func.__name__: + parts.append(qualname[: qualname.find(".")]) + + parts.append(func.__name__) + return ".".join(parts) + + +def check_docstring_parameters(func, doc=None, ignore=None): + """Helper to check docstring. + + Parameters + ---------- + func : callable + The function object to test. + doc : str, default=None + Docstring if it is passed manually to the test. + ignore : list, default=None + Parameters to ignore. + + Returns + ------- + incorrect : list + A list of string describing the incorrect results. + """ + from numpydoc import docscrape + + incorrect = [] + ignore = [] if ignore is None else ignore + + func_name = _get_func_name(func) + if not func_name.startswith("sklearn.") or func_name.startswith( + "sklearn.externals" + ): + return incorrect + # Don't check docstring for property-functions + if inspect.isdatadescriptor(func): + return incorrect + # Don't check docstring for setup / teardown pytest functions + if func_name.split(".")[-1] in ("setup_module", "teardown_module"): + return incorrect + # Dont check estimator_checks module + if func_name.split(".")[2] == "estimator_checks": + return incorrect + # Get the arguments from the function signature + param_signature = list(filter(lambda x: x not in ignore, _get_args(func))) + # drop self + if len(param_signature) > 0 and param_signature[0] == "self": + param_signature.remove("self") + + # Analyze function's docstring + if doc is None: + records = [] + with warnings.catch_warnings(record=True): + warnings.simplefilter("error", UserWarning) + try: + doc = docscrape.FunctionDoc(func) + except UserWarning as exp: + if "potentially wrong underline length" in str(exp): + # Catch warning raised as of numpydoc 1.2 when + # the underline length for a section of a docstring + # is not consistent. + message = str(exp).split("\n")[:3] + incorrect += [f"In function: {func_name}"] + message + return incorrect + records.append(str(exp)) + except Exception as exp: + incorrect += [func_name + " parsing error: " + str(exp)] + return incorrect + if len(records): + raise RuntimeError("Error for %s:\n%s" % (func_name, records[0])) + + param_docs = [] + for name, type_definition, param_doc in doc["Parameters"]: + # Type hints are empty only if parameter name ended with : + if not type_definition.strip(): + if ":" in name and name[: name.index(":")][-1:].strip(): + incorrect += [ + func_name + + " There was no space between the param name and colon (%r)" % name + ] + elif name.rstrip().endswith(":"): + incorrect += [ + func_name + + " Parameter %r has an empty type spec. Remove the colon" + % (name.lstrip()) + ] + + # Create a list of parameters to compare with the parameters gotten + # from the func signature + if "*" not in name: + param_docs.append(name.split(":")[0].strip("` ")) + + # If one of the docstring's parameters had an error then return that + # incorrect message + if len(incorrect) > 0: + return incorrect + + # Remove the parameters that should be ignored from list + param_docs = list(filter(lambda x: x not in ignore, param_docs)) + + # The following is derived from pytest, Copyright (c) 2004-2017 Holger + # Krekel and others, Licensed under MIT License. See + # https://github.com/pytest-dev/pytest + + message = [] + for i in range(min(len(param_docs), len(param_signature))): + if param_signature[i] != param_docs[i]: + message += [ + "There's a parameter name mismatch in function" + " docstring w.r.t. function signature, at index %s" + " diff: %r != %r" % (i, param_signature[i], param_docs[i]) + ] + break + if len(param_signature) > len(param_docs): + message += [ + "Parameters in function docstring have less items w.r.t." + " function signature, first missing item: %s" + % param_signature[len(param_docs)] + ] + + elif len(param_signature) < len(param_docs): + message += [ + "Parameters in function docstring have more items w.r.t." + " function signature, first extra item: %s" + % param_docs[len(param_signature)] + ] + + # If there wasn't any difference in the parameters themselves between + # docstring and signature including having the same length then return + # empty list + if len(message) == 0: + return [] + + import difflib + import pprint + + param_docs_formatted = pprint.pformat(param_docs).splitlines() + param_signature_formatted = pprint.pformat(param_signature).splitlines() + + message += ["Full diff:"] + + message.extend( + line.strip() + for line in difflib.ndiff(param_signature_formatted, param_docs_formatted) + ) + + incorrect.extend(message) + + # Prepend function name + incorrect = ["In function: " + func_name] + incorrect + + return incorrect + + +def _check_item_included(item_name, args): + """Helper to check if item should be included in checking.""" + if args.include is not True and item_name not in args.include: + return False + if args.exclude is not None and item_name in args.exclude: + return False + return True + + +def _diff_key(line): + """Key for grouping output from `context_diff`.""" + if line.startswith(" "): + return " " + elif line.startswith("- "): + return "- " + elif line.startswith("+ "): + return "+ " + elif line.startswith("! "): + return "! " + return None + + +def _get_diff_msg(docstrings_grouped): + """Get message showing the difference between type/desc docstrings of all objects. + + `docstrings_grouped` keys should be the type/desc docstrings and values are a list + of objects with that docstring. Objects with the same type/desc docstring are + thus grouped together. + """ + msg_diff = "" + ref_str = "" + ref_group = [] + for docstring, group in docstrings_grouped.items(): + if not ref_str and not ref_group: + ref_str += docstring + ref_group.extend(group) + diff = list( + context_diff( + ref_str.split(), + docstring.split(), + fromfile=str(ref_group), + tofile=str(group), + n=8, + ) + ) + # Add header + msg_diff += "".join((diff[:3])) + # Group consecutive 'diff' words to shorten error message + for start, group in groupby(diff[3:], key=_diff_key): + if start is None: + msg_diff += "\n" + "\n".join(group) + else: + msg_diff += "\n" + start + " ".join(word[2:] for word in group) + # Add new lines at end of diff, to separate comparisons + msg_diff += "\n\n" + return msg_diff + + +def _check_consistency_items( + items_docs, + type_or_desc, + section, + n_objects, + descr_regex_pattern="", + ignore_types=tuple(), +): + """Helper to check docstring consistency of all `items_docs`. + + If item is not present in all objects, checking is skipped and warning raised. + If `regex` provided, match descriptions to all descriptions. + + Parameters + ---------- + items_doc : dict of dict of str + Dictionary where the key is the string type or description, value is + a dictionary where the key is "type description" or "description" + and the value is a list of object names with the same string type or + description. + + type_or_desc : {"type description", "description"} + Whether to check type description or description between objects. + + section : {"Parameters", "Attributes", "Returns"} + Name of the section type. + + n_objects : int + Total number of objects. + + descr_regex_pattern : str, default="" + Regex pattern to match for description of all objects. + Ignored when `type_or_desc="type description". + + ignore_types : tuple of str, default=() + Tuple of parameter/attribute/return names for which type description + matching is ignored. Ignored when `type_or_desc="description". + """ + skipped = [] + for item_name, docstrings_grouped in items_docs.items(): + # If item not found in all objects, skip + if sum([len(objs) for objs in docstrings_grouped.values()]) < n_objects: + skipped.append(item_name) + # If regex provided, match to all descriptions + elif type_or_desc == "description" and descr_regex_pattern: + not_matched = [] + for docstring, group in docstrings_grouped.items(): + if not re.search(descr_regex_pattern, docstring): + not_matched.extend(group) + if not_matched: + msg = textwrap.fill( + f"The description of {section[:-1]} '{item_name}' in {not_matched}" + f" does not match 'descr_regex_pattern': {descr_regex_pattern} " + ) + raise AssertionError(msg) + # Skip type checking for items in `ignore_types` + elif type_or_desc == "type specification" and item_name in ignore_types: + continue + # Otherwise, if more than one key, docstrings not consistent between objects + elif len(docstrings_grouped.keys()) > 1: + msg_diff = _get_diff_msg(docstrings_grouped) + obj_groups = " and ".join( + str(group) for group in docstrings_grouped.values() + ) + msg = textwrap.fill( + f"The {type_or_desc} of {section[:-1]} '{item_name}' is inconsistent " + f"between {obj_groups}:" + ) + msg += msg_diff + raise AssertionError(msg) + if skipped: + warnings.warn( + f"Checking was skipped for {section}: {skipped} as they were " + "not found in all objects." + ) + + +def assert_docstring_consistency( + objects, + include_params=False, + exclude_params=None, + include_attrs=False, + exclude_attrs=None, + include_returns=False, + exclude_returns=None, + descr_regex_pattern=None, + ignore_types=tuple(), +): + r"""Check consistency between docstring parameters/attributes/returns of objects. + + Checks if parameters/attributes/returns have the same type specification and + description (ignoring whitespace) across `objects`. Intended to be used for + related classes/functions/data descriptors. + + Entries that do not appear across all `objects` are ignored. + + Parameters + ---------- + objects : list of {classes, functions, data descriptors} + Objects to check. + Objects may be classes, functions or data descriptors with docstrings that + can be parsed by numpydoc. + + include_params : list of str or bool, default=False + List of parameters to be included. If True, all parameters are included, + if False, checking is skipped for parameters. + Can only be set if `exclude_params` is None. + + exclude_params : list of str or None, default=None + List of parameters to be excluded. If None, no parameters are excluded. + Can only be set if `include_params` is True. + + include_attrs : list of str or bool, default=False + List of attributes to be included. If True, all attributes are included, + if False, checking is skipped for attributes. + Can only be set if `exclude_attrs` is None. + + exclude_attrs : list of str or None, default=None + List of attributes to be excluded. If None, no attributes are excluded. + Can only be set if `include_attrs` is True. + + include_returns : list of str or bool, default=False + List of returns to be included. If True, all returns are included, + if False, checking is skipped for returns. + Can only be set if `exclude_returns` is None. + + exclude_returns : list of str or None, default=None + List of returns to be excluded. If None, no returns are excluded. + Can only be set if `include_returns` is True. + + descr_regex_pattern : str, default=None + Regular expression to match to all descriptions of included + parameters/attributes/returns. If None, will revert to default behavior + of comparing descriptions between objects. + + ignore_types : tuple of str, default=tuple() + Tuple of parameter/attribute/return names to exclude from type description + matching between objects. + + Examples + -------- + >>> from sklearn.metrics import (accuracy_score, classification_report, + ... mean_absolute_error, mean_squared_error, median_absolute_error) + >>> from sklearn.utils._testing import assert_docstring_consistency + ... # doctest: +SKIP + >>> assert_docstring_consistency([mean_absolute_error, mean_squared_error], + ... include_params=['y_true', 'y_pred', 'sample_weight']) # doctest: +SKIP + >>> assert_docstring_consistency([median_absolute_error, mean_squared_error], + ... include_params=True) # doctest: +SKIP + >>> assert_docstring_consistency([accuracy_score, classification_report], + ... include_params=["y_true"], + ... descr_regex_pattern=r"Ground truth \(correct\) (labels|target values)") + ... # doctest: +SKIP + """ + from numpydoc.docscrape import NumpyDocString + + Args = namedtuple("args", ["include", "exclude", "arg_name"]) + + def _create_args(include, exclude, arg_name, section_name): + if exclude and include is not True: + raise TypeError( + f"The 'exclude_{arg_name}' argument can be set only when the " + f"'include_{arg_name}' argument is True." + ) + if include is False: + return {} + return {section_name: Args(include, exclude, arg_name)} + + section_args = { + **_create_args(include_params, exclude_params, "params", "Parameters"), + **_create_args(include_attrs, exclude_attrs, "attrs", "Attributes"), + **_create_args(include_returns, exclude_returns, "returns", "Returns"), + } + + objects_doc = dict() + for obj in objects: + if ( + inspect.isdatadescriptor(obj) + or inspect.isfunction(obj) + or inspect.isclass(obj) + ): + objects_doc[obj.__name__] = NumpyDocString(inspect.getdoc(obj)) + else: + raise TypeError( + "All 'objects' must be one of: function, class or descriptor, " + f"got a: {type(obj)}." + ) + + n_objects = len(objects) + for section, args in section_args.items(): + type_items = defaultdict(lambda: defaultdict(list)) + desc_items = defaultdict(lambda: defaultdict(list)) + for obj_name, obj_doc in objects_doc.items(): + for item_name, type_def, desc in obj_doc[section]: + if _check_item_included(item_name, args): + # Normalize white space + type_def = " ".join(type_def.strip().split()) + desc = " ".join(chain.from_iterable(line.split() for line in desc)) + # Use string type/desc as key, to group consistent objs together + type_items[item_name][type_def].append(obj_name) + desc_items[item_name][desc].append(obj_name) + + _check_consistency_items( + type_items, + "type specification", + section, + n_objects, + ignore_types=ignore_types, + ) + _check_consistency_items( + desc_items, + "description", + section, + n_objects, + descr_regex_pattern=descr_regex_pattern, + ) + + +def assert_run_python_script_without_output(source_code, pattern=".+", timeout=60): + """Utility to check assertions in an independent Python subprocess. + + The script provided in the source code should return 0 and the stdtout + + stderr should not match the pattern `pattern`. + + This is a port from cloudpickle https://github.com/cloudpipe/cloudpickle + + Parameters + ---------- + source_code : str + The Python source code to execute. + pattern : str + Pattern that the stdout + stderr should not match. By default, unless + stdout + stderr are both empty, an error will be raised. + timeout : int, default=60 + Time in seconds before timeout. + """ + fd, source_file = tempfile.mkstemp(suffix="_src_test_sklearn.py") + os.close(fd) + try: + with open(source_file, "wb") as f: + f.write(source_code.encode("utf-8")) + cmd = [sys.executable, source_file] + cwd = op.normpath(op.join(op.dirname(sklearn.__file__), "..")) + env = os.environ.copy() + try: + env["PYTHONPATH"] = os.pathsep.join([cwd, env["PYTHONPATH"]]) + except KeyError: + env["PYTHONPATH"] = cwd + kwargs = {"cwd": cwd, "stderr": STDOUT, "env": env} + # If coverage is running, pass the config file to the subprocess + coverage_rc = os.environ.get("COVERAGE_PROCESS_START") + if coverage_rc: + kwargs["env"]["COVERAGE_PROCESS_START"] = coverage_rc + + kwargs["timeout"] = timeout + try: + try: + out = check_output(cmd, **kwargs) + except CalledProcessError as e: + raise RuntimeError( + "script errored with output:\n%s" % e.output.decode("utf-8") + ) + + out = out.decode("utf-8") + if re.search(pattern, out): + if pattern == ".+": + expectation = "Expected no output" + else: + expectation = f"The output was not supposed to match {pattern!r}" + + message = f"{expectation}, got the following output instead: {out!r}" + raise AssertionError(message) + except TimeoutExpired as e: + raise RuntimeError( + "script timeout, output so far:\n%s" % e.output.decode("utf-8") + ) + finally: + os.unlink(source_file) + + +def _convert_container( + container, + constructor_name, + columns_name=None, + dtype=None, + minversion=None, + categorical_feature_names=None, +): + """Convert a given container to a specific array-like with a dtype. + + Parameters + ---------- + container : array-like + The container to convert. + constructor_name : {"list", "tuple", "array", "sparse", "dataframe", \ + "series", "index", "slice", "sparse_csr", "sparse_csc", \ + "sparse_csr_array", "sparse_csc_array", "pyarrow", "polars", \ + "polars_series"} + The type of the returned container. + columns_name : index or array-like, default=None + For pandas container supporting `columns_names`, it will affect + specific names. + dtype : dtype, default=None + Force the dtype of the container. Does not apply to `"slice"` + container. + minversion : str, default=None + Minimum version for package to install. + categorical_feature_names : list of str, default=None + List of column names to cast to categorical dtype. + + Returns + ------- + converted_container + """ + if constructor_name == "list": + if dtype is None: + return list(container) + else: + return np.asarray(container, dtype=dtype).tolist() + elif constructor_name == "tuple": + if dtype is None: + return tuple(container) + else: + return tuple(np.asarray(container, dtype=dtype).tolist()) + elif constructor_name == "array": + return np.asarray(container, dtype=dtype) + elif constructor_name in ("pandas", "dataframe"): + pd = pytest.importorskip("pandas", minversion=minversion) + result = pd.DataFrame(container, columns=columns_name, dtype=dtype, copy=False) + if categorical_feature_names is not None: + for col_name in categorical_feature_names: + result[col_name] = result[col_name].astype("category") + return result + elif constructor_name == "pyarrow": + pa = pytest.importorskip("pyarrow", minversion=minversion) + array = np.asarray(container) + array = array[:, None] if array.ndim == 1 else array + if columns_name is None: + columns_name = [f"col{i}" for i in range(array.shape[1])] + data = {name: array[:, i] for i, name in enumerate(columns_name)} + result = pa.Table.from_pydict(data) + if categorical_feature_names is not None: + for col_idx, col_name in enumerate(result.column_names): + if col_name in categorical_feature_names: + result = result.set_column( + col_idx, col_name, result.column(col_name).dictionary_encode() + ) + return result + elif constructor_name == "polars": + pl = pytest.importorskip("polars", minversion=minversion) + result = pl.DataFrame(container, schema=columns_name, orient="row") + if categorical_feature_names is not None: + for col_name in categorical_feature_names: + result = result.with_columns(pl.col(col_name).cast(pl.Categorical)) + return result + elif constructor_name == "series": + pd = pytest.importorskip("pandas", minversion=minversion) + return pd.Series(container, dtype=dtype) + elif constructor_name == "pyarrow_array": + pa = pytest.importorskip("pyarrow", minversion=minversion) + return pa.array(container) + elif constructor_name == "polars_series": + pl = pytest.importorskip("polars", minversion=minversion) + return pl.Series(values=container) + elif constructor_name == "index": + pd = pytest.importorskip("pandas", minversion=minversion) + return pd.Index(container, dtype=dtype) + elif constructor_name == "slice": + return slice(container[0], container[1]) + elif "sparse" in constructor_name: + if not sp.sparse.issparse(container): + # For scipy >= 1.13, sparse array constructed from 1d array may be + # 1d or raise an exception. To avoid this, we make sure that the + # input container is 2d. For more details, see + # https://github.com/scipy/scipy/pull/18530#issuecomment-1878005149 + container = np.atleast_2d(container) + + if constructor_name in ("sparse", "sparse_csr"): + # sparse and sparse_csr are equivalent for legacy reasons + return sp.sparse.csr_matrix(container, dtype=dtype) + elif constructor_name == "sparse_csr_array": + return sp.sparse.csr_array(container, dtype=dtype) + elif constructor_name == "sparse_csc": + return sp.sparse.csc_matrix(container, dtype=dtype) + elif constructor_name == "sparse_csc_array": + return sp.sparse.csc_array(container, dtype=dtype) + + +def raises(expected_exc_type, match=None, may_pass=False, err_msg=None): + """Context manager to ensure exceptions are raised within a code block. + + This is similar to and inspired from pytest.raises, but supports a few + other cases. + + This is only intended to be used in estimator_checks.py where we don't + want to use pytest. In the rest of the code base, just use pytest.raises + instead. + + Parameters + ---------- + excepted_exc_type : Exception or list of Exception + The exception that should be raised by the block. If a list, the block + should raise one of the exceptions. + match : str or list of str, default=None + A regex that the exception message should match. If a list, one of + the entries must match. If None, match isn't enforced. + may_pass : bool, default=False + If True, the block is allowed to not raise an exception. Useful in + cases where some estimators may support a feature but others must + fail with an appropriate error message. By default, the context + manager will raise an exception if the block does not raise an + exception. + err_msg : str, default=None + If the context manager fails (e.g. the block fails to raise the + proper exception, or fails to match), then an AssertionError is + raised with this message. By default, an AssertionError is raised + with a default error message (depends on the kind of failure). Use + this to indicate how users should fix their estimators to pass the + checks. + + Attributes + ---------- + raised_and_matched : bool + True if an exception was raised and a match was found, False otherwise. + """ + return _Raises(expected_exc_type, match, may_pass, err_msg) + + +class _Raises(contextlib.AbstractContextManager): + # see raises() for parameters + def __init__(self, expected_exc_type, match, may_pass, err_msg): + self.expected_exc_types = ( + expected_exc_type + if isinstance(expected_exc_type, Iterable) + else [expected_exc_type] + ) + self.matches = [match] if isinstance(match, str) else match + self.may_pass = may_pass + self.err_msg = err_msg + self.raised_and_matched = False + + def __exit__(self, exc_type, exc_value, _): + # see + # https://docs.python.org/2.5/whatsnew/pep-343.html#SECTION000910000000000000000 + + if exc_type is None: # No exception was raised in the block + if self.may_pass: + return True # CM is happy + else: + err_msg = self.err_msg or f"Did not raise: {self.expected_exc_types}" + raise AssertionError(err_msg) + + if not any( + issubclass(exc_type, expected_type) + for expected_type in self.expected_exc_types + ): + if self.err_msg is not None: + raise AssertionError(self.err_msg) from exc_value + else: + return False # will re-raise the original exception + + if self.matches is not None: + err_msg = self.err_msg or ( + "The error message should contain one of the following " + "patterns:\n{}\nGot {}".format("\n".join(self.matches), str(exc_value)) + ) + if not any(re.search(match, str(exc_value)) for match in self.matches): + raise AssertionError(err_msg) from exc_value + self.raised_and_matched = True + + return True + + +class MinimalClassifier: + """Minimal classifier implementation without inheriting from BaseEstimator. + + This estimator should be tested with: + + * `check_estimator` in `test_estimator_checks.py`; + * within a `Pipeline` in `test_pipeline.py`; + * within a `SearchCV` in `test_search.py`. + """ + + def __init__(self, param=None): + self.param = param + + def get_params(self, deep=True): + return {"param": self.param} + + def set_params(self, **params): + for key, value in params.items(): + setattr(self, key, value) + return self + + def fit(self, X, y): + X, y = check_X_y(X, y) + check_classification_targets(y) + self.classes_, counts = np.unique(y, return_counts=True) + self._most_frequent_class_idx = counts.argmax() + return self + + def predict_proba(self, X): + check_is_fitted(self) + X = check_array(X) + proba_shape = (X.shape[0], self.classes_.size) + y_proba = np.zeros(shape=proba_shape, dtype=np.float64) + y_proba[:, self._most_frequent_class_idx] = 1.0 + return y_proba + + def predict(self, X): + y_proba = self.predict_proba(X) + y_pred = y_proba.argmax(axis=1) + return self.classes_[y_pred] + + def score(self, X, y): + from sklearn.metrics import accuracy_score + + return accuracy_score(y, self.predict(X)) + + def __sklearn_tags__(self): + return Tags( + estimator_type="classifier", + classifier_tags=ClassifierTags(), + regressor_tags=None, + transformer_tags=None, + target_tags=TargetTags(required=True), + ) + + +class MinimalRegressor: + """Minimal regressor implementation without inheriting from BaseEstimator. + + This estimator should be tested with: + + * `check_estimator` in `test_estimator_checks.py`; + * within a `Pipeline` in `test_pipeline.py`; + * within a `SearchCV` in `test_search.py`. + """ + + def __init__(self, param=None): + self.param = param + + def get_params(self, deep=True): + return {"param": self.param} + + def set_params(self, **params): + for key, value in params.items(): + setattr(self, key, value) + return self + + def fit(self, X, y): + X, y = check_X_y(X, y) + self.is_fitted_ = True + self._mean = np.mean(y) + return self + + def predict(self, X): + check_is_fitted(self) + X = check_array(X) + return np.ones(shape=(X.shape[0],)) * self._mean + + def score(self, X, y): + from sklearn.metrics import r2_score + + return r2_score(y, self.predict(X)) + + def __sklearn_tags__(self): + return Tags( + estimator_type="regressor", + classifier_tags=None, + regressor_tags=RegressorTags(), + transformer_tags=None, + target_tags=TargetTags(required=True), + ) + + +class MinimalTransformer: + """Minimal transformer implementation without inheriting from + BaseEstimator. + + This estimator should be tested with: + + * `check_estimator` in `test_estimator_checks.py`; + * within a `Pipeline` in `test_pipeline.py`; + * within a `SearchCV` in `test_search.py`. + """ + + def __init__(self, param=None): + self.param = param + + def get_params(self, deep=True): + return {"param": self.param} + + def set_params(self, **params): + for key, value in params.items(): + setattr(self, key, value) + return self + + def fit(self, X, y=None): + check_array(X) + self.is_fitted_ = True + return self + + def transform(self, X, y=None): + check_is_fitted(self) + X = check_array(X) + return X + + def fit_transform(self, X, y=None): + return self.fit(X, y).transform(X, y) + + def __sklearn_tags__(self): + return Tags( + estimator_type="transformer", + classifier_tags=None, + regressor_tags=None, + transformer_tags=TransformerTags(), + target_tags=TargetTags(required=False), + ) + + +def _array_api_for_tests(array_namespace, device): + try: + array_mod = importlib.import_module(array_namespace) + except (ModuleNotFoundError, ImportError): + raise SkipTest( + f"{array_namespace} is not installed: not checking array_api input" + ) + + if os.environ.get("SCIPY_ARRAY_API") is None: + raise SkipTest("SCIPY_ARRAY_API is not set: not checking array_api input") + + from sklearn.externals.array_api_compat import get_namespace + + # First create an array using the chosen array module and then get the + # corresponding (compatibility wrapped) array namespace based on it. + # This is because `cupy` is not the same as the compatibility wrapped + # namespace of a CuPy array. + xp = get_namespace(array_mod.asarray(1)) + if ( + array_namespace == "torch" + and device == "cuda" + and not xp.backends.cuda.is_built() + ): + raise SkipTest("PyTorch test requires cuda, which is not available") + elif array_namespace == "torch" and device == "mps": + if os.getenv("PYTORCH_ENABLE_MPS_FALLBACK") != "1": + # For now we need PYTORCH_ENABLE_MPS_FALLBACK=1 for all estimators to work + # when using the MPS device. + raise SkipTest( + "Skipping MPS device test because PYTORCH_ENABLE_MPS_FALLBACK is not " + "set." + ) + if not xp.backends.mps.is_built(): + raise SkipTest( + "MPS is not available because the current PyTorch install was not " + "built with MPS enabled." + ) + elif array_namespace == "cupy": # pragma: nocover + import cupy + + if cupy.cuda.runtime.getDeviceCount() == 0: + raise SkipTest("CuPy test requires cuda, which is not available") + return xp + + +def _get_warnings_filters_info_list(): + @dataclass + class WarningInfo: + action: "warnings._ActionKind" # type: ignore[annotation-unchecked] + message: str = "" # type: ignore[annotation-unchecked] + category: type[Warning] = Warning # type: ignore[annotation-unchecked] + + def to_filterwarning_str(self): + if self.category.__module__ == "builtins": + category = self.category.__name__ + else: + category = f"{self.category.__module__}.{self.category.__name__}" + + return f"{self.action}:{self.message}:{category}" + + return [ + WarningInfo("error", category=DeprecationWarning), + WarningInfo("error", category=FutureWarning), + WarningInfo("error", category=VisibleDeprecationWarning), + # TODO: remove when pyamg > 5.0.1 + # Avoid a deprecation warning due pkg_resources usage in pyamg. + WarningInfo( + "ignore", + message="pkg_resources is deprecated as an API", + category=DeprecationWarning, + ), + WarningInfo( + "ignore", + message="Deprecated call to `pkg_resources", + category=DeprecationWarning, + ), + # pytest-cov issue https://github.com/pytest-dev/pytest-cov/issues/557 not + # fixed although it has been closed. https://github.com/pytest-dev/pytest-cov/pull/623 + # would probably fix it. + WarningInfo( + "ignore", + message=( + "The --rsyncdir command line argument and rsyncdirs config variable are" + " deprecated" + ), + category=DeprecationWarning, + ), + # XXX: Easiest way to ignore pandas Pyarrow DeprecationWarning in the + # short-term. See https://github.com/pandas-dev/pandas/issues/54466 for + # more details. + WarningInfo( + "ignore", + message=r"\s*Pyarrow will become a required dependency", + category=DeprecationWarning, + ), + # warnings has been fixed from dateutil main but not released yet, see + # https://github.com/dateutil/dateutil/issues/1314 + WarningInfo( + "ignore", + message="datetime.datetime.utcfromtimestamp", + category=DeprecationWarning, + ), + # Python 3.12 warnings from joblib fixed in master but not released yet, + # see https://github.com/joblib/joblib/pull/1518 + WarningInfo( + "ignore", message="ast.Num is deprecated", category=DeprecationWarning + ), + WarningInfo( + "ignore", message="Attribute n is deprecated", category=DeprecationWarning + ), + # Python 3.12 warnings from sphinx-gallery fixed in master but not + # released yet, see + # https://github.com/sphinx-gallery/sphinx-gallery/pull/1242 + WarningInfo( + "ignore", message="ast.Str is deprecated", category=DeprecationWarning + ), + WarningInfo( + "ignore", message="Attribute s is deprecated", category=DeprecationWarning + ), + # Plotly deprecated something which we're not using, but internally it's used + # and needs to be fixed on their side. + # https://github.com/plotly/plotly.py/issues/4997 + WarningInfo( + "ignore", + message=".+scattermapbox.+deprecated.+scattermap.+instead", + category=DeprecationWarning, + ), + ] + + +def get_pytest_filterwarning_lines(): + warning_filters_info_list = _get_warnings_filters_info_list() + return [ + warning_info.to_filterwarning_str() + for warning_info in warning_filters_info_list + ] + + +def turn_warnings_into_errors(): + warnings_filters_info_list = _get_warnings_filters_info_list() + for warning_info in warnings_filters_info_list: + warnings.filterwarnings( + warning_info.action, + message=warning_info.message, + category=warning_info.category, + ) diff --git a/shared/package-files/d6/d67a2b78b4428693a07928f4b894f599e862065f27821df71ae73b29dbf36183/METADATA b/shared/package-files/d6/d67a2b78b4428693a07928f4b894f599e862065f27821df71ae73b29dbf36183/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..c688a62848560861b62738ef0b70d373c4980baf --- /dev/null +++ b/shared/package-files/d6/d67a2b78b4428693a07928f4b894f599e862065f27821df71ae73b29dbf36183/METADATA @@ -0,0 +1,66 @@ +Metadata-Version: 2.1 +Name: certifi +Version: 2024.2.2 +Summary: Python package for providing Mozilla's CA Bundle. +Home-page: https://github.com/certifi/python-certifi +Author: Kenneth Reitz +Author-email: me@kennethreitz.com +License: MPL-2.0 +Project-URL: Source, https://github.com/certifi/python-certifi +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0) +Classifier: Natural Language :: English +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Classifier: Programming Language :: Python :: 3.6 +Classifier: Programming Language :: Python :: 3.7 +Classifier: Programming Language :: Python :: 3.8 +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Requires-Python: >=3.6 +License-File: LICENSE + +Certifi: Python SSL Certificates +================================ + +Certifi provides Mozilla's carefully curated collection of Root Certificates for +validating the trustworthiness of SSL certificates while verifying the identity +of TLS hosts. It has been extracted from the `Requests`_ project. + +Installation +------------ + +``certifi`` is available on PyPI. Simply install it with ``pip``:: + + $ pip install certifi + +Usage +----- + +To reference the installed certificate authority (CA) bundle, you can use the +built-in function:: + + >>> import certifi + + >>> certifi.where() + '/usr/local/lib/python3.7/site-packages/certifi/cacert.pem' + +Or from the command line:: + + $ python -m certifi + /usr/local/lib/python3.7/site-packages/certifi/cacert.pem + +Enjoy! + +.. _`Requests`: https://requests.readthedocs.io/en/master/ + +Addition/Removal of Certificates +-------------------------------- + +Certifi does not support any addition/removal or other modification of the +CA trust store content. This project is intended to provide a reliable and +highly portable root of trust to python deployments. Look to upstream projects +for methods to use alternate trust. diff --git a/shared/package-files/d6/d67a78c1e3af987148e25d1b6ce379c71492abe98f24ec85ed0e69409a5e676f/debugger.py b/shared/package-files/d6/d67a78c1e3af987148e25d1b6ce379c71492abe98f24ec85ed0e69409a5e676f/debugger.py new file mode 100644 index 0000000000000000000000000000000000000000..33eab3adec33e1619e9f03ac6054ae2f78b28f1f --- /dev/null +++ b/shared/package-files/d6/d67a78c1e3af987148e25d1b6ce379c71492abe98f24ec85ed0e69409a5e676f/debugger.py @@ -0,0 +1,1120 @@ +# -*- coding: utf-8 -*- +""" +Pdb debugger class. + + +This is an extension to PDB which adds a number of new features. +Note that there is also the `IPython.terminal.debugger` class which provides UI +improvements. + +We also strongly recommend to use this via the `ipdb` package, which provides +extra configuration options. + +Among other things, this subclass of PDB: + - supports many IPython magics like pdef/psource + - hide frames in tracebacks based on `__tracebackhide__` + - allows to skip frames based on `__debuggerskip__` + +The skipping and hiding frames are configurable via the `skip_predicates` +command. + +By default, frames from readonly files will be hidden, frames containing +``__tracebackhide__=True`` will be hidden. + +Frames containing ``__debuggerskip__`` will be stepped over, frames who's parent +frames value of ``__debuggerskip__`` is ``True`` will be skipped. + + >>> def helpers_helper(): + ... pass + ... + ... def helper_1(): + ... print("don't step in me") + ... helpers_helpers() # will be stepped over unless breakpoint set. + ... + ... + ... def helper_2(): + ... print("in me neither") + ... + +One can define a decorator that wraps a function between the two helpers: + + >>> def pdb_skipped_decorator(function): + ... + ... + ... def wrapped_fn(*args, **kwargs): + ... __debuggerskip__ = True + ... helper_1() + ... __debuggerskip__ = False + ... result = function(*args, **kwargs) + ... __debuggerskip__ = True + ... helper_2() + ... # setting __debuggerskip__ to False again is not necessary + ... return result + ... + ... return wrapped_fn + +When decorating a function, ipdb will directly step into ``bar()`` by +default: + + >>> @foo_decorator + ... def bar(x, y): + ... return x * y + + +You can toggle the behavior with + + ipdb> skip_predicates debuggerskip false + +or configure it in your ``.pdbrc`` + + + +License +------- + +Modified from the standard pdb.Pdb class to avoid including readline, so that +the command line completion of other programs which include this isn't +damaged. + +In the future, this class will be expanded with improvements over the standard +pdb. + +The original code in this file is mainly lifted out of cmd.py in Python 2.2, +with minor changes. Licensing should therefore be under the standard Python +terms. For details on the PSF (Python Software Foundation) standard license, +see: + +https://docs.python.org/2/license.html + + +All the changes since then are under the same license as IPython. + +""" + +#***************************************************************************** +# +# This file is licensed under the PSF license. +# +# Copyright (C) 2001 Python Software Foundation, www.python.org +# Copyright (C) 2005-2006 Fernando Perez. +# +# +#***************************************************************************** + +import inspect +import linecache +import sys +import re +import os + +from IPython import get_ipython +from contextlib import contextmanager +from IPython.utils import PyColorize +from IPython.utils import coloransi, py3compat +from IPython.core.excolors import exception_colors + +# skip module docstests +__skip_doctest__ = True + +prompt = 'ipdb> ' + +# We have to check this directly from sys.argv, config struct not yet available +from pdb import Pdb as OldPdb + +# Allow the set_trace code to operate outside of an ipython instance, even if +# it does so with some limitations. The rest of this support is implemented in +# the Tracer constructor. + +DEBUGGERSKIP = "__debuggerskip__" + + +# this has been implemented in Pdb in Python 3.13 (https://github.com/python/cpython/pull/106676 +# on lower python versions, we backported the feature. +CHAIN_EXCEPTIONS = sys.version_info < (3, 13) + + +def make_arrow(pad): + """generate the leading arrow in front of traceback or debugger""" + if pad >= 2: + return '-'*(pad-2) + '> ' + elif pad == 1: + return '>' + return '' + + +def BdbQuit_excepthook(et, ev, tb, excepthook=None): + """Exception hook which handles `BdbQuit` exceptions. + + All other exceptions are processed using the `excepthook` + parameter. + """ + raise ValueError( + "`BdbQuit_excepthook` is deprecated since version 5.1", + ) + + +def BdbQuit_IPython_excepthook(self, et, ev, tb, tb_offset=None): + raise ValueError( + "`BdbQuit_IPython_excepthook` is deprecated since version 5.1", + DeprecationWarning, stacklevel=2) + + +RGX_EXTRA_INDENT = re.compile(r'(?<=\n)\s+') + + +def strip_indentation(multiline_string): + return RGX_EXTRA_INDENT.sub('', multiline_string) + + +def decorate_fn_with_doc(new_fn, old_fn, additional_text=""): + """Make new_fn have old_fn's doc string. This is particularly useful + for the ``do_...`` commands that hook into the help system. + Adapted from from a comp.lang.python posting + by Duncan Booth.""" + def wrapper(*args, **kw): + return new_fn(*args, **kw) + if old_fn.__doc__: + wrapper.__doc__ = strip_indentation(old_fn.__doc__) + additional_text + return wrapper + + +class Pdb(OldPdb): + """Modified Pdb class, does not load readline. + + for a standalone version that uses prompt_toolkit, see + `IPython.terminal.debugger.TerminalPdb` and + `IPython.terminal.debugger.set_trace()` + + + This debugger can hide and skip frames that are tagged according to some predicates. + See the `skip_predicates` commands. + + """ + + if CHAIN_EXCEPTIONS: + MAX_CHAINED_EXCEPTION_DEPTH = 999 + + default_predicates = { + "tbhide": True, + "readonly": False, + "ipython_internal": True, + "debuggerskip": True, + } + + def __init__(self, completekey=None, stdin=None, stdout=None, context=5, **kwargs): + """Create a new IPython debugger. + + Parameters + ---------- + completekey : default None + Passed to pdb.Pdb. + stdin : default None + Passed to pdb.Pdb. + stdout : default None + Passed to pdb.Pdb. + context : int + Number of lines of source code context to show when + displaying stacktrace information. + **kwargs + Passed to pdb.Pdb. + + Notes + ----- + The possibilities are python version dependent, see the python + docs for more info. + """ + + # Parent constructor: + try: + self.context = int(context) + if self.context <= 0: + raise ValueError("Context must be a positive integer") + except (TypeError, ValueError) as e: + raise ValueError("Context must be a positive integer") from e + + # `kwargs` ensures full compatibility with stdlib's `pdb.Pdb`. + OldPdb.__init__(self, completekey, stdin, stdout, **kwargs) + + # IPython changes... + self.shell = get_ipython() + + if self.shell is None: + save_main = sys.modules['__main__'] + # No IPython instance running, we must create one + from IPython.terminal.interactiveshell import \ + TerminalInteractiveShell + self.shell = TerminalInteractiveShell.instance() + # needed by any code which calls __import__("__main__") after + # the debugger was entered. See also #9941. + sys.modules["__main__"] = save_main + + + color_scheme = self.shell.colors + + self.aliases = {} + + # Create color table: we copy the default one from the traceback + # module and add a few attributes needed for debugging + self.color_scheme_table = exception_colors() + + # shorthands + C = coloransi.TermColors + cst = self.color_scheme_table + + cst['NoColor'].colors.prompt = C.NoColor + cst['NoColor'].colors.breakpoint_enabled = C.NoColor + cst['NoColor'].colors.breakpoint_disabled = C.NoColor + + cst['Linux'].colors.prompt = C.Green + cst['Linux'].colors.breakpoint_enabled = C.LightRed + cst['Linux'].colors.breakpoint_disabled = C.Red + + cst['LightBG'].colors.prompt = C.Blue + cst['LightBG'].colors.breakpoint_enabled = C.LightRed + cst['LightBG'].colors.breakpoint_disabled = C.Red + + cst['Neutral'].colors.prompt = C.Blue + cst['Neutral'].colors.breakpoint_enabled = C.LightRed + cst['Neutral'].colors.breakpoint_disabled = C.Red + + # Add a python parser so we can syntax highlight source while + # debugging. + self.parser = PyColorize.Parser(style=color_scheme) + self.set_colors(color_scheme) + + # Set the prompt - the default prompt is '(Pdb)' + self.prompt = prompt + self.skip_hidden = True + self.report_skipped = True + + # list of predicates we use to skip frames + self._predicates = self.default_predicates + + if CHAIN_EXCEPTIONS: + self._chained_exceptions = tuple() + self._chained_exception_index = 0 + + # + def set_colors(self, scheme): + """Shorthand access to the color table scheme selector method.""" + self.color_scheme_table.set_active_scheme(scheme) + self.parser.style = scheme + + def set_trace(self, frame=None): + if frame is None: + frame = sys._getframe().f_back + self.initial_frame = frame + return super().set_trace(frame) + + def _hidden_predicate(self, frame): + """ + Given a frame return whether it it should be hidden or not by IPython. + """ + + if self._predicates["readonly"]: + fname = frame.f_code.co_filename + # we need to check for file existence and interactively define + # function would otherwise appear as RO. + if os.path.isfile(fname) and not os.access(fname, os.W_OK): + return True + + if self._predicates["tbhide"]: + if frame in (self.curframe, getattr(self, "initial_frame", None)): + return False + frame_locals = self._get_frame_locals(frame) + if "__tracebackhide__" not in frame_locals: + return False + return frame_locals["__tracebackhide__"] + return False + + def hidden_frames(self, stack): + """ + Given an index in the stack return whether it should be skipped. + + This is used in up/down and where to skip frames. + """ + # The f_locals dictionary is updated from the actual frame + # locals whenever the .f_locals accessor is called, so we + # avoid calling it here to preserve self.curframe_locals. + # Furthermore, there is no good reason to hide the current frame. + ip_hide = [self._hidden_predicate(s[0]) for s in stack] + ip_start = [i for i, s in enumerate(ip_hide) if s == "__ipython_bottom__"] + if ip_start and self._predicates["ipython_internal"]: + ip_hide = [h if i > ip_start[0] else True for (i, h) in enumerate(ip_hide)] + return ip_hide + + if CHAIN_EXCEPTIONS: + + def _get_tb_and_exceptions(self, tb_or_exc): + """ + Given a tracecack or an exception, return a tuple of chained exceptions + and current traceback to inspect. + This will deal with selecting the right ``__cause__`` or ``__context__`` + as well as handling cycles, and return a flattened list of exceptions we + can jump to with do_exceptions. + """ + _exceptions = [] + if isinstance(tb_or_exc, BaseException): + traceback, current = tb_or_exc.__traceback__, tb_or_exc + + while current is not None: + if current in _exceptions: + break + _exceptions.append(current) + if current.__cause__ is not None: + current = current.__cause__ + elif ( + current.__context__ is not None + and not current.__suppress_context__ + ): + current = current.__context__ + + if len(_exceptions) >= self.MAX_CHAINED_EXCEPTION_DEPTH: + self.message( + f"More than {self.MAX_CHAINED_EXCEPTION_DEPTH}" + " chained exceptions found, not all exceptions" + "will be browsable with `exceptions`." + ) + break + else: + traceback = tb_or_exc + return tuple(reversed(_exceptions)), traceback + + @contextmanager + def _hold_exceptions(self, exceptions): + """ + Context manager to ensure proper cleaning of exceptions references + When given a chained exception instead of a traceback, + pdb may hold references to many objects which may leak memory. + We use this context manager to make sure everything is properly cleaned + """ + try: + self._chained_exceptions = exceptions + self._chained_exception_index = len(exceptions) - 1 + yield + finally: + # we can't put those in forget as otherwise they would + # be cleared on exception change + self._chained_exceptions = tuple() + self._chained_exception_index = 0 + + def do_exceptions(self, arg): + """exceptions [number] + List or change current exception in an exception chain. + Without arguments, list all the current exception in the exception + chain. Exceptions will be numbered, with the current exception indicated + with an arrow. + If given an integer as argument, switch to the exception at that index. + """ + if not self._chained_exceptions: + self.message( + "Did not find chained exceptions. To move between" + " exceptions, pdb/post_mortem must be given an exception" + " object rather than a traceback." + ) + return + if not arg: + for ix, exc in enumerate(self._chained_exceptions): + prompt = ">" if ix == self._chained_exception_index else " " + rep = repr(exc) + if len(rep) > 80: + rep = rep[:77] + "..." + indicator = ( + " -" + if self._chained_exceptions[ix].__traceback__ is None + else f"{ix:>3}" + ) + self.message(f"{prompt} {indicator} {rep}") + else: + try: + number = int(arg) + except ValueError: + self.error("Argument must be an integer") + return + if 0 <= number < len(self._chained_exceptions): + if self._chained_exceptions[number].__traceback__ is None: + self.error( + "This exception does not have a traceback, cannot jump to it" + ) + return + + self._chained_exception_index = number + self.setup(None, self._chained_exceptions[number].__traceback__) + self.print_stack_entry(self.stack[self.curindex]) + else: + self.error("No exception with that number") + + def interaction(self, frame, tb_or_exc): + try: + if CHAIN_EXCEPTIONS: + # this context manager is part of interaction in 3.13 + _chained_exceptions, tb = self._get_tb_and_exceptions(tb_or_exc) + if isinstance(tb_or_exc, BaseException): + assert tb is not None, "main exception must have a traceback" + with self._hold_exceptions(_chained_exceptions): + OldPdb.interaction(self, frame, tb) + else: + OldPdb.interaction(self, frame, tb_or_exc) + + except KeyboardInterrupt: + self.stdout.write("\n" + self.shell.get_exception_only()) + + def precmd(self, line): + """Perform useful escapes on the command before it is executed.""" + + if line.endswith("??"): + line = "pinfo2 " + line[:-2] + elif line.endswith("?"): + line = "pinfo " + line[:-1] + + line = super().precmd(line) + + return line + + def new_do_frame(self, arg): + OldPdb.do_frame(self, arg) + + def new_do_quit(self, arg): + + if hasattr(self, 'old_all_completions'): + self.shell.Completer.all_completions = self.old_all_completions + + return OldPdb.do_quit(self, arg) + + do_q = do_quit = decorate_fn_with_doc(new_do_quit, OldPdb.do_quit) + + def new_do_restart(self, arg): + """Restart command. In the context of ipython this is exactly the same + thing as 'quit'.""" + self.msg("Restart doesn't make sense here. Using 'quit' instead.") + return self.do_quit(arg) + + def print_stack_trace(self, context=None): + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + if context is None: + context = self.context + try: + context = int(context) + if context <= 0: + raise ValueError("Context must be a positive integer") + except (TypeError, ValueError) as e: + raise ValueError("Context must be a positive integer") from e + try: + skipped = 0 + for hidden, frame_lineno in zip(self.hidden_frames(self.stack), self.stack): + if hidden and self.skip_hidden: + skipped += 1 + continue + if skipped: + print( + f"{Colors.excName} [... skipping {skipped} hidden frame(s)]{ColorsNormal}\n" + ) + skipped = 0 + self.print_stack_entry(frame_lineno, context=context) + if skipped: + print( + f"{Colors.excName} [... skipping {skipped} hidden frame(s)]{ColorsNormal}\n" + ) + except KeyboardInterrupt: + pass + + def print_stack_entry(self, frame_lineno, prompt_prefix='\n-> ', + context=None): + if context is None: + context = self.context + try: + context = int(context) + if context <= 0: + raise ValueError("Context must be a positive integer") + except (TypeError, ValueError) as e: + raise ValueError("Context must be a positive integer") from e + print(self.format_stack_entry(frame_lineno, '', context), file=self.stdout) + + # vds: >> + frame, lineno = frame_lineno + filename = frame.f_code.co_filename + self.shell.hooks.synchronize_with_editor(filename, lineno, 0) + # vds: << + + def _get_frame_locals(self, frame): + """ " + Accessing f_local of current frame reset the namespace, so we want to avoid + that or the following can happen + + ipdb> foo + "old" + ipdb> foo = "new" + ipdb> foo + "new" + ipdb> where + ipdb> foo + "old" + + So if frame is self.current_frame we instead return self.curframe_locals + + """ + if frame is self.curframe: + return self.curframe_locals + else: + return frame.f_locals + + def format_stack_entry(self, frame_lineno, lprefix=': ', context=None): + if context is None: + context = self.context + try: + context = int(context) + if context <= 0: + print("Context must be a positive integer", file=self.stdout) + except (TypeError, ValueError): + print("Context must be a positive integer", file=self.stdout) + + import reprlib + + ret = [] + + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + tpl_link = "%s%%s%s" % (Colors.filenameEm, ColorsNormal) + tpl_call = "%s%%s%s%%s%s" % (Colors.vName, Colors.valEm, ColorsNormal) + tpl_line = "%%s%s%%s %s%%s" % (Colors.lineno, ColorsNormal) + tpl_line_em = "%%s%s%%s %s%%s%s" % (Colors.linenoEm, Colors.line, ColorsNormal) + + frame, lineno = frame_lineno + + return_value = '' + loc_frame = self._get_frame_locals(frame) + if "__return__" in loc_frame: + rv = loc_frame["__return__"] + # return_value += '->' + return_value += reprlib.repr(rv) + "\n" + ret.append(return_value) + + #s = filename + '(' + `lineno` + ')' + filename = self.canonic(frame.f_code.co_filename) + link = tpl_link % py3compat.cast_unicode(filename) + + if frame.f_code.co_name: + func = frame.f_code.co_name + else: + func = "" + + call = "" + if func != "?": + if "__args__" in loc_frame: + args = reprlib.repr(loc_frame["__args__"]) + else: + args = '()' + call = tpl_call % (func, args) + + # The level info should be generated in the same format pdb uses, to + # avoid breaking the pdbtrack functionality of python-mode in *emacs. + if frame is self.curframe: + ret.append('> ') + else: + ret.append(" ") + ret.append("%s(%s)%s\n" % (link, lineno, call)) + + start = lineno - 1 - context//2 + lines = linecache.getlines(filename) + start = min(start, len(lines) - context) + start = max(start, 0) + lines = lines[start : start + context] + + for i, line in enumerate(lines): + show_arrow = start + 1 + i == lineno + linetpl = (frame is self.curframe or show_arrow) and tpl_line_em or tpl_line + ret.append( + self.__format_line( + linetpl, filename, start + 1 + i, line, arrow=show_arrow + ) + ) + return "".join(ret) + + def __format_line(self, tpl_line, filename, lineno, line, arrow=False): + bp_mark = "" + bp_mark_color = "" + + new_line, err = self.parser.format2(line, 'str') + if not err: + line = new_line + + bp = None + if lineno in self.get_file_breaks(filename): + bps = self.get_breaks(filename, lineno) + bp = bps[-1] + + if bp: + Colors = self.color_scheme_table.active_colors + bp_mark = str(bp.number) + bp_mark_color = Colors.breakpoint_enabled + if not bp.enabled: + bp_mark_color = Colors.breakpoint_disabled + + numbers_width = 7 + if arrow: + # This is the line with the error + pad = numbers_width - len(str(lineno)) - len(bp_mark) + num = '%s%s' % (make_arrow(pad), str(lineno)) + else: + num = '%*s' % (numbers_width - len(bp_mark), str(lineno)) + + return tpl_line % (bp_mark_color + bp_mark, num, line) + + def print_list_lines(self, filename, first, last): + """The printing (as opposed to the parsing part of a 'list' + command.""" + try: + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + tpl_line = '%%s%s%%s %s%%s' % (Colors.lineno, ColorsNormal) + tpl_line_em = '%%s%s%%s %s%%s%s' % (Colors.linenoEm, Colors.line, ColorsNormal) + src = [] + if filename == "" and hasattr(self, "_exec_filename"): + filename = self._exec_filename + + for lineno in range(first, last+1): + line = linecache.getline(filename, lineno) + if not line: + break + + if lineno == self.curframe.f_lineno: + line = self.__format_line( + tpl_line_em, filename, lineno, line, arrow=True + ) + else: + line = self.__format_line( + tpl_line, filename, lineno, line, arrow=False + ) + + src.append(line) + self.lineno = lineno + + print(''.join(src), file=self.stdout) + + except KeyboardInterrupt: + pass + + def do_skip_predicates(self, args): + """ + Turn on/off individual predicates as to whether a frame should be hidden/skip. + + The global option to skip (or not) hidden frames is set with skip_hidden + + To change the value of a predicate + + skip_predicates key [true|false] + + Call without arguments to see the current values. + + To permanently change the value of an option add the corresponding + command to your ``~/.pdbrc`` file. If you are programmatically using the + Pdb instance you can also change the ``default_predicates`` class + attribute. + """ + if not args.strip(): + print("current predicates:") + for p, v in self._predicates.items(): + print(" ", p, ":", v) + return + type_value = args.strip().split(" ") + if len(type_value) != 2: + print( + f"Usage: skip_predicates , with one of {set(self._predicates.keys())}" + ) + return + + type_, value = type_value + if type_ not in self._predicates: + print(f"{type_!r} not in {set(self._predicates.keys())}") + return + if value.lower() not in ("true", "yes", "1", "no", "false", "0"): + print( + f"{value!r} is invalid - use one of ('true', 'yes', '1', 'no', 'false', '0')" + ) + return + + self._predicates[type_] = value.lower() in ("true", "yes", "1") + if not any(self._predicates.values()): + print( + "Warning, all predicates set to False, skip_hidden may not have any effects." + ) + + def do_skip_hidden(self, arg): + """ + Change whether or not we should skip frames with the + __tracebackhide__ attribute. + """ + if not arg.strip(): + print( + f"skip_hidden = {self.skip_hidden}, use 'yes','no', 'true', or 'false' to change." + ) + elif arg.strip().lower() in ("true", "yes"): + self.skip_hidden = True + elif arg.strip().lower() in ("false", "no"): + self.skip_hidden = False + if not any(self._predicates.values()): + print( + "Warning, all predicates set to False, skip_hidden may not have any effects." + ) + + def do_list(self, arg): + """Print lines of code from the current stack frame + """ + self.lastcmd = 'list' + last = None + if arg and arg != ".": + try: + x = eval(arg, {}, {}) + if type(x) == type(()): + first, last = x + first = int(first) + last = int(last) + if last < first: + # Assume it's a count + last = first + last + else: + first = max(1, int(x) - 5) + except: + print('*** Error in argument:', repr(arg), file=self.stdout) + return + elif self.lineno is None or arg == ".": + first = max(1, self.curframe.f_lineno - 5) + else: + first = self.lineno + 1 + if last is None: + last = first + 10 + self.print_list_lines(self.curframe.f_code.co_filename, first, last) + + # vds: >> + lineno = first + filename = self.curframe.f_code.co_filename + self.shell.hooks.synchronize_with_editor(filename, lineno, 0) + # vds: << + + do_l = do_list + + def getsourcelines(self, obj): + lines, lineno = inspect.findsource(obj) + if inspect.isframe(obj) and obj.f_globals is self._get_frame_locals(obj): + # must be a module frame: do not try to cut a block out of it + return lines, 1 + elif inspect.ismodule(obj): + return lines, 1 + return inspect.getblock(lines[lineno:]), lineno+1 + + def do_longlist(self, arg): + """Print lines of code from the current stack frame. + + Shows more lines than 'list' does. + """ + self.lastcmd = 'longlist' + try: + lines, lineno = self.getsourcelines(self.curframe) + except OSError as err: + self.error(err) + return + last = lineno + len(lines) + self.print_list_lines(self.curframe.f_code.co_filename, lineno, last) + do_ll = do_longlist + + def do_debug(self, arg): + """debug code + Enter a recursive debugger that steps through the code + argument (which is an arbitrary expression or statement to be + executed in the current environment). + """ + trace_function = sys.gettrace() + sys.settrace(None) + globals = self.curframe.f_globals + locals = self.curframe_locals + p = self.__class__(completekey=self.completekey, + stdin=self.stdin, stdout=self.stdout) + p.use_rawinput = self.use_rawinput + p.prompt = "(%s) " % self.prompt.strip() + self.message("ENTERING RECURSIVE DEBUGGER") + sys.call_tracing(p.run, (arg, globals, locals)) + self.message("LEAVING RECURSIVE DEBUGGER") + sys.settrace(trace_function) + self.lastcmd = p.lastcmd + + def do_pdef(self, arg): + """Print the call signature for any callable object. + + The debugger interface to %pdef""" + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("pdef")(arg, namespaces=namespaces) + + def do_pdoc(self, arg): + """Print the docstring for an object. + + The debugger interface to %pdoc.""" + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("pdoc")(arg, namespaces=namespaces) + + def do_pfile(self, arg): + """Print (or run through pager) the file where an object is defined. + + The debugger interface to %pfile. + """ + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("pfile")(arg, namespaces=namespaces) + + def do_pinfo(self, arg): + """Provide detailed information about an object. + + The debugger interface to %pinfo, i.e., obj?.""" + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("pinfo")(arg, namespaces=namespaces) + + def do_pinfo2(self, arg): + """Provide extra detailed information about an object. + + The debugger interface to %pinfo2, i.e., obj??.""" + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("pinfo2")(arg, namespaces=namespaces) + + def do_psource(self, arg): + """Print (or run through pager) the source code for an object.""" + namespaces = [ + ("Locals", self.curframe_locals), + ("Globals", self.curframe.f_globals), + ] + self.shell.find_line_magic("psource")(arg, namespaces=namespaces) + + def do_where(self, arg): + """w(here) + Print a stack trace, with the most recent frame at the bottom. + An arrow indicates the "current frame", which determines the + context of most commands. 'bt' is an alias for this command. + + Take a number as argument as an (optional) number of context line to + print""" + if arg: + try: + context = int(arg) + except ValueError as err: + self.error(err) + return + self.print_stack_trace(context) + else: + self.print_stack_trace() + + do_w = do_where + + def break_anywhere(self, frame): + """ + _stop_in_decorator_internals is overly restrictive, as we may still want + to trace function calls, so we need to also update break_anywhere so + that is we don't `stop_here`, because of debugger skip, we may still + stop at any point inside the function + + """ + + sup = super().break_anywhere(frame) + if sup: + return sup + if self._predicates["debuggerskip"]: + if DEBUGGERSKIP in frame.f_code.co_varnames: + return True + if frame.f_back and self._get_frame_locals(frame.f_back).get(DEBUGGERSKIP): + return True + return False + + def _is_in_decorator_internal_and_should_skip(self, frame): + """ + Utility to tell us whether we are in a decorator internal and should stop. + + """ + + # if we are disabled don't skip + if not self._predicates["debuggerskip"]: + return False + + # if frame is tagged, skip by default. + if DEBUGGERSKIP in frame.f_code.co_varnames: + return True + + # if one of the parent frame value set to True skip as well. + + cframe = frame + while getattr(cframe, "f_back", None): + cframe = cframe.f_back + if self._get_frame_locals(cframe).get(DEBUGGERSKIP): + return True + + return False + + def stop_here(self, frame): + if self._is_in_decorator_internal_and_should_skip(frame) is True: + return False + + hidden = False + if self.skip_hidden: + hidden = self._hidden_predicate(frame) + if hidden: + if self.report_skipped: + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + print( + f"{Colors.excName} [... skipped 1 hidden frame]{ColorsNormal}\n" + ) + return super().stop_here(frame) + + def do_up(self, arg): + """u(p) [count] + Move the current frame count (default one) levels up in the + stack trace (to an older frame). + + Will skip hidden frames. + """ + # modified version of upstream that skips + # frames with __tracebackhide__ + if self.curindex == 0: + self.error("Oldest frame") + return + try: + count = int(arg or 1) + except ValueError: + self.error("Invalid frame count (%s)" % arg) + return + skipped = 0 + if count < 0: + _newframe = 0 + else: + counter = 0 + hidden_frames = self.hidden_frames(self.stack) + for i in range(self.curindex - 1, -1, -1): + if hidden_frames[i] and self.skip_hidden: + skipped += 1 + continue + counter += 1 + if counter >= count: + break + else: + # if no break occurred. + self.error( + "all frames above hidden, use `skip_hidden False` to get get into those." + ) + return + + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + _newframe = i + self._select_frame(_newframe) + if skipped: + print( + f"{Colors.excName} [... skipped {skipped} hidden frame(s)]{ColorsNormal}\n" + ) + + def do_down(self, arg): + """d(own) [count] + Move the current frame count (default one) levels down in the + stack trace (to a newer frame). + + Will skip hidden frames. + """ + if self.curindex + 1 == len(self.stack): + self.error("Newest frame") + return + try: + count = int(arg or 1) + except ValueError: + self.error("Invalid frame count (%s)" % arg) + return + if count < 0: + _newframe = len(self.stack) - 1 + else: + counter = 0 + skipped = 0 + hidden_frames = self.hidden_frames(self.stack) + for i in range(self.curindex + 1, len(self.stack)): + if hidden_frames[i] and self.skip_hidden: + skipped += 1 + continue + counter += 1 + if counter >= count: + break + else: + self.error( + "all frames below hidden, use `skip_hidden False` to get get into those." + ) + return + + Colors = self.color_scheme_table.active_colors + ColorsNormal = Colors.Normal + if skipped: + print( + f"{Colors.excName} [... skipped {skipped} hidden frame(s)]{ColorsNormal}\n" + ) + _newframe = i + + self._select_frame(_newframe) + + do_d = do_down + do_u = do_up + + def do_context(self, context): + """context number_of_lines + Set the number of lines of source code to show when displaying + stacktrace information. + """ + try: + new_context = int(context) + if new_context <= 0: + raise ValueError() + self.context = new_context + except ValueError: + self.error("The 'context' command requires a positive integer argument.") + + +class InterruptiblePdb(Pdb): + """Version of debugger where KeyboardInterrupt exits the debugger altogether.""" + + def cmdloop(self, intro=None): + """Wrap cmdloop() such that KeyboardInterrupt stops the debugger.""" + try: + return OldPdb.cmdloop(self, intro=intro) + except KeyboardInterrupt: + self.stop_here = lambda frame: False + self.do_quit("") + sys.settrace(None) + self.quitting = False + raise + + def _cmdloop(self): + while True: + try: + # keyboard interrupts allow for an easy way to cancel + # the current command, so allow them during interactive input + self.allow_kbdint = True + self.cmdloop() + self.allow_kbdint = False + break + except KeyboardInterrupt: + self.message('--KeyboardInterrupt--') + raise + + +def set_trace(frame=None): + """ + Start debugging from `frame`. + + If frame is not specified, debugging starts from caller's frame. + """ + Pdb().set_trace(frame or sys._getframe().f_back) diff --git a/shared/package-files/d6/d67beab91315de97e2a7313f0dbefbc5003662256c864b256eb47a2896573769/application.pyi b/shared/package-files/d6/d67beab91315de97e2a7313f0dbefbc5003662256c864b256eb47a2896573769/application.pyi new file mode 100644 index 0000000000000000000000000000000000000000..d1b2f1dad6b4a03fc5a34c1316cd71e37281e18f --- /dev/null +++ b/shared/package-files/d6/d67beab91315de97e2a7313f0dbefbc5003662256c864b256eb47a2896573769/application.pyi @@ -0,0 +1,16 @@ +from email.mime.nonmultipart import MIMENonMultipart +from email.policy import Policy +from typing import Callable, Optional, Tuple, Union + +_ParamsType = Union[str, None, Tuple[str, Optional[str], str]] + +class MIMEApplication(MIMENonMultipart): + def __init__( + self, + _data: Union[str, bytes], + _subtype: str = ..., + _encoder: Callable[[MIMEApplication], None] = ..., + *, + policy: Optional[Policy] = ..., + **_params: _ParamsType, + ) -> None: ... diff --git a/shared/package-files/d6/d67e1aed4c6de22de98b191f1150a1d1f8b3f04c4679a790fa4754cc5a780e5a/CUDADevice.h b/shared/package-files/d6/d67e1aed4c6de22de98b191f1150a1d1f8b3f04c4679a790fa4754cc5a780e5a/CUDADevice.h new file mode 100644 index 0000000000000000000000000000000000000000..ba9a5eb849a091be6e86658a8c7af87a0a3fbb8f --- /dev/null +++ b/shared/package-files/d6/d67e1aed4c6de22de98b191f1150a1d1f8b3f04c4679a790fa4754cc5a780e5a/CUDADevice.h @@ -0,0 +1,23 @@ +#pragma once + +#include + +#include +#include + +namespace at::cuda { + +inline Device getDeviceFromPtr(void* ptr) { + cudaPointerAttributes attr{}; + + AT_CUDA_CHECK(cudaPointerGetAttributes(&attr, ptr)); + +#if !defined(USE_ROCM) + TORCH_CHECK(attr.type != cudaMemoryTypeUnregistered, + "The specified pointer resides on host memory and is not registered with any CUDA device."); +#endif + + return {c10::DeviceType::CUDA, static_cast(attr.device)}; +} + +} // namespace at::cuda diff --git a/shared/package-files/d6/d681474dbfb26dc4ea2d79b4af564e5607583131e51a836cf8f82fbb1e747771/Aqtobe b/shared/package-files/d6/d681474dbfb26dc4ea2d79b4af564e5607583131e51a836cf8f82fbb1e747771/Aqtobe new file mode 100644 index 0000000000000000000000000000000000000000..3b5d6eb41883a7b32819f387b4c03c93e9d489cf Binary files /dev/null and b/shared/package-files/d6/d681474dbfb26dc4ea2d79b4af564e5607583131e51a836cf8f82fbb1e747771/Aqtobe differ diff --git a/shared/package-files/d6/d6816dd21d1187b267176ab0d50b53d17ce451a9d5f976fd5e2f41f597076880/chapel.py b/shared/package-files/d6/d6816dd21d1187b267176ab0d50b53d17ce451a9d5f976fd5e2f41f597076880/chapel.py new file mode 100644 index 0000000000000000000000000000000000000000..9af5f0e38561f3933fd17f56e26c6f6a011ea305 --- /dev/null +++ b/shared/package-files/d6/d6816dd21d1187b267176ab0d50b53d17ce451a9d5f976fd5e2f41f597076880/chapel.py @@ -0,0 +1,140 @@ +""" + pygments.lexers.chapel + ~~~~~~~~~~~~~~~~~~~~~~ + + Lexer for the Chapel language. + + :copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS. + :license: BSD, see LICENSE for details. +""" + +from pygments.lexer import RegexLexer, bygroups, words +from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ + Number, Punctuation, Whitespace + +__all__ = ['ChapelLexer'] + + +class ChapelLexer(RegexLexer): + """ + For Chapel source. + + .. versionadded:: 2.0 + """ + name = 'Chapel' + url = 'https://chapel-lang.org/' + filenames = ['*.chpl'] + aliases = ['chapel', 'chpl'] + # mimetypes = ['text/x-chapel'] + + known_types = ('bool', 'bytes', 'complex', 'imag', 'int', 'locale', + 'nothing', 'opaque', 'range', 'real', 'string', 'uint', + 'void') + + type_modifiers_par = ('atomic', 'single', 'sync') + type_modifiers_mem = ('borrowed', 'owned', 'shared', 'unmanaged') + type_modifiers = (*type_modifiers_par, *type_modifiers_mem) + + declarations = ('config', 'const', 'in', 'inout', 'out', 'param', 'ref', + 'type', 'var') + + constants = ('false', 'nil', 'none', 'true') + + other_keywords = ('align', 'as', + 'begin', 'break', 'by', + 'catch', 'cobegin', 'coforall', 'continue', + 'defer', 'delete', 'dmapped', 'do', 'domain', + 'else', 'enum', 'except', 'export', 'extern', + 'for', 'forall', 'foreach', 'forwarding', + 'if', 'implements', 'import', 'index', 'init', 'inline', + 'label', 'lambda', 'let', 'lifetime', 'local', + 'new', 'noinit', + 'on', 'only', 'otherwise', 'override', + 'pragma', 'primitive', 'private', 'prototype', 'public', + 'reduce', 'require', 'return', + 'scan', 'select', 'serial', 'sparse', 'subdomain', + 'then', 'this', 'throw', 'throws', 'try', + 'use', + 'when', 'where', 'while', 'with', + 'yield', + 'zip') + + tokens = { + 'root': [ + (r'\n', Whitespace), + (r'\s+', Whitespace), + (r'\\\n', Text), + + (r'//(.*?)\n', Comment.Single), + (r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline), + + (words(declarations, suffix=r'\b'), Keyword.Declaration), + (words(constants, suffix=r'\b'), Keyword.Constant), + (words(known_types, suffix=r'\b'), Keyword.Type), + (words((*type_modifiers, *other_keywords), suffix=r'\b'), Keyword), + + (r'@', Keyword, 'attributename'), + (r'(iter)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(proc)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(operator)(\s+)', bygroups(Keyword, Whitespace), 'procname'), + (r'(class|interface|module|record|union)(\s+)', bygroups(Keyword, Whitespace), + 'classname'), + + # imaginary integers + (r'\d+i', Number), + (r'\d+\.\d*([Ee][-+]\d+)?i', Number), + (r'\.\d+([Ee][-+]\d+)?i', Number), + (r'\d+[Ee][-+]\d+i', Number), + + # reals cannot end with a period due to lexical ambiguity with + # .. operator. See reference for rationale. + (r'(\d*\.\d+)([eE][+-]?[0-9]+)?i?', Number.Float), + (r'\d+[eE][+-]?[0-9]+i?', Number.Float), + + # integer literals + # -- binary + (r'0[bB][01]+', Number.Bin), + # -- hex + (r'0[xX][0-9a-fA-F]+', Number.Hex), + # -- octal + (r'0[oO][0-7]+', Number.Oct), + # -- decimal + (r'[0-9]+', Number.Integer), + + # strings + (r'"(\\\\|\\"|[^"])*"', String), + (r"'(\\\\|\\'|[^'])*'", String), + + # tokens + (r'(=|\+=|-=|\*=|/=|\*\*=|%=|&=|\|=|\^=|&&=|\|\|=|<<=|>>=|' + r'<=>|<~>|\.\.|by|#|\.\.\.|' + r'&&|\|\||!|&|\||\^|~|<<|>>|' + r'==|!=|<=|>=|<|>|' + r'[+\-*/%]|\*\*)', Operator), + (r'[:;,.?()\[\]{}]', Punctuation), + + # identifiers + (r'[a-zA-Z_][\w$]*', Name.Other), + ], + 'classname': [ + (r'[a-zA-Z_][\w$]*', Name.Class, '#pop'), + ], + 'procname': [ + (r'([a-zA-Z_][.\w$]*|' # regular function name, including secondary + r'\~[a-zA-Z_][.\w$]*|' # support for legacy destructors + r'[+*/!~%<>=&^|\-:]{1,2})', # operators + Name.Function, '#pop'), + + # allow `proc (atomic T).foo` + (r'\(', Punctuation, "receivertype"), + (r'\)+\.', Punctuation), + ], + 'receivertype': [ + (words(type_modifiers, suffix=r'\b'), Keyword), + (words(known_types, suffix=r'\b'), Keyword.Type), + (r'[^()]*', Name.Other, '#pop'), + ], + 'attributename': [ + (r'[a-zA-Z_][.\w$]*', Name.Decorator, '#pop'), + ], + } diff --git a/shared/package-files/d6/d6836634278d0962c758bf6fc73ab790bebb366b4e502f08afd98bafcd6951b1/dropout_compositeimplicitautograd_dispatch.h b/shared/package-files/d6/d6836634278d0962c758bf6fc73ab790bebb366b4e502f08afd98bafcd6951b1/dropout_compositeimplicitautograd_dispatch.h new file mode 100644 index 0000000000000000000000000000000000000000..03d108f257bd00a9d7c2126e9fdd6b65d9a93102 --- /dev/null +++ b/shared/package-files/d6/d6836634278d0962c758bf6fc73ab790bebb366b4e502f08afd98bafcd6951b1/dropout_compositeimplicitautograd_dispatch.h @@ -0,0 +1,24 @@ +#pragma once +// @generated by torchgen/gen.py from DispatchKeyFunction.h + +// NB: The implementing C++ file is RegisterDispatchKey.cpp + +// The only #includes we need are for custom classes that have defaults in the C++ API +#include +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { + +namespace compositeimplicitautograd { + +TORCH_API at::Tensor dropout(const at::Tensor & input, double p, bool train); +TORCH_API at::Tensor & dropout_(at::Tensor & self, double p, bool train); + +} // namespace compositeimplicitautograd +} // namespace at diff --git a/shared/package-files/d6/d689ccaa33ffa701450012a45c024ca4bb2ca767826a361bfc399f7465bcf1d8/contentmanager.pyi b/shared/package-files/d6/d689ccaa33ffa701450012a45c024ca4bb2ca767826a361bfc399f7465bcf1d8/contentmanager.pyi new file mode 100644 index 0000000000000000000000000000000000000000..68fe99c8c09f9a37d53830c7c01fe7c4e49a3cdf --- /dev/null +++ b/shared/package-files/d6/d689ccaa33ffa701450012a45c024ca4bb2ca767826a361bfc399f7465bcf1d8/contentmanager.pyi @@ -0,0 +1,11 @@ +from email.message import Message +from typing import Any, Callable + +class ContentManager: + def __init__(self) -> None: ... + def get_content(self, msg: Message, *args: Any, **kw: Any) -> Any: ... + def set_content(self, msg: Message, obj: Any, *args: Any, **kw: Any) -> Any: ... + def add_get_handler(self, key: str, handler: Callable[..., Any]) -> None: ... + def add_set_handler(self, typekey: type, handler: Callable[..., Any]) -> None: ... + +raw_data_manager: ContentManager diff --git a/shared/package-files/d6/d693b0d186a757968facc1b0aa401393c3935e6ea22c5da2b9460a6d47f56fa4/log_level.py b/shared/package-files/d6/d693b0d186a757968facc1b0aa401393c3935e6ea22c5da2b9460a6d47f56fa4/log_level.py new file mode 100644 index 0000000000000000000000000000000000000000..87ea0f7d64182488b40fd7fed6965ce57ec475a0 --- /dev/null +++ b/shared/package-files/d6/d693b0d186a757968facc1b0aa401393c3935e6ea22c5da2b9460a6d47f56fa4/log_level.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +# Copyright (c) Facebook, Inc. and its affiliates. +# All rights reserved. +# +# This source code is licensed under the BSD-style license found in the +# LICENSE file in the root directory of this source tree. + + +def get_log_level() -> str: + """ + Return default log level for pytorch. + """ + return "WARNING" diff --git a/shared/package-files/d6/d694d22b9954e8be40246e47df93d3210b47608a653288a96bb2a477f9bd1cd4/multipart.pyi b/shared/package-files/d6/d694d22b9954e8be40246e47df93d3210b47608a653288a96bb2a477f9bd1cd4/multipart.pyi new file mode 100644 index 0000000000000000000000000000000000000000..0a7d3fa8acb03634c918724b52432bc342931e5e --- /dev/null +++ b/shared/package-files/d6/d694d22b9954e8be40246e47df93d3210b47608a653288a96bb2a477f9bd1cd4/multipart.pyi @@ -0,0 +1,4 @@ +from email.mime.base import MIMEBase + +class MIMEMultipart(MIMEBase): + def __init__(self, _subtype=..., boundary=..., _subparts=..., **_params) -> None: ... diff --git a/shared/package-files/d6/d694d6648579e11959bb8046b86028cb1ed9f50abcddc20127eaafe044c498a9/firstlinefinder.py b/shared/package-files/d6/d694d6648579e11959bb8046b86028cb1ed9f50abcddc20127eaafe044c498a9/firstlinefinder.py new file mode 100644 index 0000000000000000000000000000000000000000..54d790206f627f8617e64ff4c925805e7baae6c4 --- /dev/null +++ b/shared/package-files/d6/d694d6648579e11959bb8046b86028cb1ed9f50abcddc20127eaafe044c498a9/firstlinefinder.py @@ -0,0 +1,104 @@ +""" +This module provides helper functions to find the first line of a function +body. +""" + +import ast +import inspect +import textwrap + + +class FindDefFirstLine(ast.NodeVisitor): + """ + Attributes + ---------- + first_stmt_line : int or None + This stores the first statement line number if the definition is found. + Or, ``None`` if the definition is not found. + """ + + def __init__(self, name, firstlineno): + """ + Parameters + ---------- + code : + The function's code object. + """ + self._co_name = name + self._co_firstlineno = firstlineno + self.first_stmt_line = None + + def _visit_children(self, node): + for child in ast.iter_child_nodes(node): + super().visit(child) + + def visit_FunctionDef(self, node: ast.FunctionDef): + if node.name == self._co_name: + # Name of function matches. + + # The `def` line may match co_firstlineno. + possible_start_lines = set([node.lineno]) + if node.decorator_list: + # Has decorators. + # The first decorator line may match co_firstlineno. + first_decor = node.decorator_list[0] + possible_start_lines.add(first_decor.lineno) + # Does the first lineno match? + if self._co_firstlineno in possible_start_lines: + # Yes, we found the function. + # So, use the first statement line as the first line. + if node.body: + first_stmt = node.body[0] + if _is_docstring(first_stmt): + # Skip docstring + first_stmt = node.body[1] + self.first_stmt_line = first_stmt.lineno + return + else: + # This is probably unreachable. + # Function body cannot be bare. It must at least have + # A const string for docstring or a `pass`. + pass + self._visit_children(node) + + +def _is_docstring(node): + if isinstance(node, ast.Expr): + if (isinstance(node.value, ast.Constant) + and isinstance(node.value.value, str)): + return True + return False + + +def get_func_body_first_lineno(pyfunc): + """ + Look up the first line of function body using the file in + ``pyfunc.__code__.co_filename``. + + Returns + ------- + lineno : int; or None + The first line number of the function body; or ``None`` if the first + line cannot be determined. + """ + co = pyfunc.__code__ + try: + with open(co.co_filename) as fin: + source = fin.read() + offset = 0 + except (FileNotFoundError, OSError): + try: + lines, offset = inspect.getsourcelines(pyfunc) + source = "".join(lines) + offset = offset - 1 + except (OSError, TypeError): + return None + + tree = ast.parse(textwrap.dedent(source)) + finder = FindDefFirstLine(co.co_name, co.co_firstlineno - offset) + finder.visit(tree) + if finder.first_stmt_line: + return finder.first_stmt_line + offset + else: + # No first line found. + return None diff --git a/shared/package-files/d6/d696ba65b8f27cc5a1f9a634ef4564c007f587c9432b55db9387df6f3348b72e/transformPen.py b/shared/package-files/d6/d696ba65b8f27cc5a1f9a634ef4564c007f587c9432b55db9387df6f3348b72e/transformPen.py new file mode 100644 index 0000000000000000000000000000000000000000..48835cd9afd4e2fd9f2432839ba1b72a1237a0c1 --- /dev/null +++ b/shared/package-files/d6/d696ba65b8f27cc5a1f9a634ef4564c007f587c9432b55db9387df6f3348b72e/transformPen.py @@ -0,0 +1,114 @@ +from fontTools.pens.filterPen import FilterPen, FilterPointPen + +__all__ = ["TransformPen", "TransformPointPen"] + + +class TransformPen(FilterPen): + """Pen that transforms all coordinates using a Affine transformation, + and passes them to another pen. + """ + + def __init__(self, outPen, transformation): + """The 'outPen' argument is another pen object. It will receive the + transformed coordinates. The 'transformation' argument can either + be a six-tuple, or a fontTools.misc.transform.Transform object. + """ + super(TransformPen, self).__init__(outPen) + if not hasattr(transformation, "transformPoint"): + from fontTools.misc.transform import Transform + + transformation = Transform(*transformation) + self._transformation = transformation + self._transformPoint = transformation.transformPoint + self._stack = [] + + def moveTo(self, pt): + self._outPen.moveTo(self._transformPoint(pt)) + + def lineTo(self, pt): + self._outPen.lineTo(self._transformPoint(pt)) + + def curveTo(self, *points): + self._outPen.curveTo(*self._transformPoints(points)) + + def qCurveTo(self, *points): + if points[-1] is None: + points = self._transformPoints(points[:-1]) + [None] + else: + points = self._transformPoints(points) + self._outPen.qCurveTo(*points) + + def _transformPoints(self, points): + transformPoint = self._transformPoint + return [transformPoint(pt) for pt in points] + + def closePath(self): + self._outPen.closePath() + + def endPath(self): + self._outPen.endPath() + + def addComponent(self, glyphName, transformation): + transformation = self._transformation.transform(transformation) + self._outPen.addComponent(glyphName, transformation) + + +class TransformPointPen(FilterPointPen): + """PointPen that transforms all coordinates using a Affine transformation, + and passes them to another PointPen. + + For example:: + + >>> from fontTools.pens.recordingPen import RecordingPointPen + >>> rec = RecordingPointPen() + >>> pen = TransformPointPen(rec, (2, 0, 0, 2, -10, 5)) + >>> v = iter(rec.value) + >>> pen.beginPath(identifier="contour-0") + >>> next(v) + ('beginPath', (), {'identifier': 'contour-0'}) + + >>> pen.addPoint((100, 100), "line") + >>> next(v) + ('addPoint', ((190, 205), 'line', False, None), {}) + + >>> pen.endPath() + >>> next(v) + ('endPath', (), {}) + + >>> pen.addComponent("a", (1, 0, 0, 1, -10, 5), identifier="component-0") + >>> next(v) + ('addComponent', ('a', ), {'identifier': 'component-0'}) + """ + + def __init__(self, outPointPen, transformation): + """The 'outPointPen' argument is another point pen object. + It will receive the transformed coordinates. + The 'transformation' argument can either be a six-tuple, or a + fontTools.misc.transform.Transform object. + """ + super().__init__(outPointPen) + if not hasattr(transformation, "transformPoint"): + from fontTools.misc.transform import Transform + + transformation = Transform(*transformation) + self._transformation = transformation + self._transformPoint = transformation.transformPoint + + def addPoint(self, pt, segmentType=None, smooth=False, name=None, **kwargs): + self._outPen.addPoint( + self._transformPoint(pt), segmentType, smooth, name, **kwargs + ) + + def addComponent(self, baseGlyphName, transformation, **kwargs): + transformation = self._transformation.transform(transformation) + self._outPen.addComponent(baseGlyphName, transformation, **kwargs) + + +if __name__ == "__main__": + from fontTools.pens.basePen import _TestPen + + pen = TransformPen(_TestPen(None), (2, 0, 0.5, 2, -10, 0)) + pen.moveTo((0, 0)) + pen.lineTo((0, 100)) + pen.curveTo((50, 75), (60, 50), (50, 25), (0, 0)) + pen.closePath() diff --git a/shared/package-files/d6/d6a096cfc57ba045120f140f11a51bd767d33e4e9d873db53820ad122cb28e3b/inductor_prims.py b/shared/package-files/d6/d6a096cfc57ba045120f140f11a51bd767d33e4e9d873db53820ad122cb28e3b/inductor_prims.py new file mode 100644 index 0000000000000000000000000000000000000000..69f9807120ac7e3acdd4123d7917d038db79a526 --- /dev/null +++ b/shared/package-files/d6/d6a096cfc57ba045120f140f11a51bd767d33e4e9d873db53820ad122cb28e3b/inductor_prims.py @@ -0,0 +1,90 @@ +from __future__ import annotations + +import logging +from typing import Optional, Sequence + +import torch +from torch import _prims, Tensor + +log = logging.getLogger(__name__) + + +def make_prim( + schema: str, + impl_aten, + return_type=_prims.RETURN_TYPE.NEW, + doc: str = "", + tags: Optional[Sequence[torch.Tag]] = None, +): + def meta(*args, **kwargs): + return _prims.TensorMeta(impl_aten(*args, **kwargs)) + + return _prims._make_prim( + schema=schema, + return_type=return_type, + meta=meta, + impl_aten=impl_aten, + doc=doc, + tags=tags, + ) + + +def eager_force_stride(input_tensor: Tensor, stride) -> Tensor: + if input_tensor.stride() == stride: + return input_tensor + new_tensor = input_tensor.clone().as_strided( + input_tensor.shape, + stride, + ) + new_tensor.copy_(input_tensor) + return new_tensor + + +# Custom prims used for handling randomness +seed = make_prim( + "inductor_seed(Device device) -> Tensor", + lambda device: torch.randint(2**63 - 1, [], device=device), + doc="create a fresh seed (one per call) for use with inductor_rand", + tags=(torch.Tag.nondeterministic_seeded,), +) +seeds = make_prim( + "inductor_seeds(int count, Device device) -> Tensor", + lambda count, device: torch.randint(2**63 - 1, [count], device=device), + doc="Horizontal fusion of many inductor_seed() calls", + tags=(torch.Tag.nondeterministic_seeded,), +) +lookup_seed = make_prim( + # if inductor_lookup_seed changes, update partitioners.py + "inductor_lookup_seed(Tensor seeds, int index) -> Tensor", + lambda seeds, index: seeds[index], + doc="Extract a single seed from the result of inductor_seeds()", +) +random = make_prim( + "inductor_random(SymInt[] size, Tensor seed, str mode) -> Tensor", + lambda size, seed, mode: getattr(torch, mode)(size, device=seed.device), + doc="torch.rand()/torch.randn() using backend-specific RNG that can be fused", +) +randint = make_prim( + "inductor_randint(SymInt low, SymInt high, SymInt[] size, Tensor seed) -> Tensor", + lambda low, high, size, seed: torch.randint(low, high, size, device=seed.device), + doc="torch.randint() using backend-specific RNG that can be fused", +) +force_stride_order = make_prim( + "inductor_force_stride_order(Tensor input, SymInt[] stride) -> Tensor", + eager_force_stride, + doc="Force the stride order for input tensor. No-op if the input tensor already has the stride. Do a copy otherwise", +) +masked_scatter_with_index = make_prim( + "inductor_masked_scatter_with_index(Tensor input, Tensor mask, Tensor source_idx, Tensor source) -> Tensor", + lambda input_tensor, mask, index, source: torch.masked_scatter( + input_tensor, mask, source + ), + doc="masked_scatter with precomputed indices", +) +_unsafe_index_put_ = make_prim( + "_unsafe_index_put_(Tensor(a!) self, Tensor?[] indices, Tensor values, bool accumulate=False) -> Tensor(a!)", + lambda self, indices, values, accumulate=False: torch.ops.aten.index_put_( + self, indices, values, accumulate + ), + doc="Unsafe index_put_ (doesn't issue device asserts)", +) diff --git a/shared/package-files/d6/d6adf78a170ed7403f9bb1c1e601dd53c4b5629568873ea2860ce8f5030f6279/apps.pyi b/shared/package-files/d6/d6adf78a170ed7403f9bb1c1e601dd53c4b5629568873ea2860ce8f5030f6279/apps.pyi new file mode 100644 index 0000000000000000000000000000000000000000..0fa9e21e84221c61636993bcdf9193b9d5e0e755 --- /dev/null +++ b/shared/package-files/d6/d6adf78a170ed7403f9bb1c1e601dd53c4b5629568873ea2860ce8f5030f6279/apps.pyi @@ -0,0 +1,6 @@ +from django.apps import AppConfig + +class SimpleAdminConfig(AppConfig): + default_site: str = ... + +class AdminConfig(SimpleAdminConfig): ... diff --git a/shared/package-files/d6/d6b01ddb852a848e04eb389c658d93fb171861af3dfd434e8152e7b37797df9a/alpha_dropout_compositeimplicitautograd_dispatch.h b/shared/package-files/d6/d6b01ddb852a848e04eb389c658d93fb171861af3dfd434e8152e7b37797df9a/alpha_dropout_compositeimplicitautograd_dispatch.h new file mode 100644 index 0000000000000000000000000000000000000000..7bef95c85cfbceda7189bb79723aec3081f71d19 --- /dev/null +++ b/shared/package-files/d6/d6b01ddb852a848e04eb389c658d93fb171861af3dfd434e8152e7b37797df9a/alpha_dropout_compositeimplicitautograd_dispatch.h @@ -0,0 +1,24 @@ +#pragma once +// @generated by torchgen/gen.py from DispatchKeyFunction.h + +// NB: The implementing C++ file is RegisterDispatchKey.cpp + +// The only #includes we need are for custom classes that have defaults in the C++ API +#include +#include +#include + +// Forward declarations of any types needed in the operator signatures. +// We can't directly include these classes because it will cause circular include dependencies. +// This file is included by TensorBody.h, which defines the Tensor class. +#include + +namespace at { + +namespace compositeimplicitautograd { + +TORCH_API at::Tensor alpha_dropout(const at::Tensor & input, double p, bool train); +TORCH_API at::Tensor & alpha_dropout_(at::Tensor & self, double p, bool train); + +} // namespace compositeimplicitautograd +} // namespace at diff --git a/shared/package-files/d6/d6b58820653683db17cbe5f28ed3609903354f2e6fb0b25bfa8206baf172b393/Float8_e4m3fnuz.h b/shared/package-files/d6/d6b58820653683db17cbe5f28ed3609903354f2e6fb0b25bfa8206baf172b393/Float8_e4m3fnuz.h new file mode 100644 index 0000000000000000000000000000000000000000..e51630d1bd71e1653011247de4b72a8efd87e0fd --- /dev/null +++ b/shared/package-files/d6/d6b58820653683db17cbe5f28ed3609903354f2e6fb0b25bfa8206baf172b393/Float8_e4m3fnuz.h @@ -0,0 +1,136 @@ +#pragma once + +/// Defines the Float8_e4m3fnuz type (8-bit floating-point) including +/// conversions to standard C types and basic arithmetic operations. Note that +/// arithmetic operations are implemented by converting to floating point and +/// performing the operation in float32. +/// Binary configuration remains the same as Float8_e4m3fn: +/// s eeee mmm +/// 1 sign bit +/// 4 exponent bits +/// 3 mantissa bits +/// The key differences versus Float8_e4m3fn are: +/// bias = 8 +/// no infinities or negative zero +/// NaN only when sign bit is 1, rest all 0s +/// +/// Implementation based on the paper https://arxiv.org/pdf/2206.02915.pdf and +/// the existing Float8_e4m3fn implementation. + +#include +#include +#include +#include + +#if defined(__cplusplus) && (__cplusplus >= 201103L) +#include +#elif !defined(__OPENCL_VERSION__) +#include +#include +#endif + +#include +#include + +namespace c10 { + +namespace detail { + +/* + * Convert a 32-bit floating-point number in IEEE single-precision format to a + * 8-bit floating-point number in fp8 E4M3FNUZ format, in bit representation. + */ +inline C10_HOST_DEVICE uint8_t fp8e4m3fnuz_from_fp32_value(float f) { + /* + * Binary representation of 256.0f, which is the first value not representable + * (i.e. the first value which would overflow in to the sign bit, resulting in + * a NaN) in fp8e4m3fnuz range: + * 1 0000 000 - fp8e4m3fnuz + * 0 10000111 00000000000000000000000 - fp32 + */ + constexpr uint32_t fnuz_max = UINT32_C(0x87) << 23; + + /* + * A mask for converting fp32 numbers lower than fp8e4m3fnuz normal range + * into denorm representation + * magic number: ((127 - 8) + (23 - 3) + 1) + */ + constexpr uint32_t denorm_mask = UINT32_C(0x8C) << 23; + + uint32_t f_bits = fp32_to_bits(f); + + uint32_t result = 0u; + + /* + * Extract the sign of the input number into the high bit of the 32-bit word: + * + * +---+----------------------------------+ + * | S |0000000 00000000 00000000 00000000| + * +---+----------------------------------+ + * Bits 31 0-31 + */ + const uint32_t sign = f_bits & UINT32_C(0x80000000); + + /* + * Set sign bit to 0 + */ + f_bits ^= sign; + + if (f_bits >= fnuz_max) { + // NaN -- sign bit set to 1, rest 0s. + return 0x80; + } + + if (f_bits < (UINT32_C(0x78) << 23) /* 2^-7 in float32 */) { + // Input exponent is less than -7, the smallest e4m3fnuz exponent, so the + // number will become subnormal. + f_bits = fp32_to_bits(fp32_from_bits(f_bits) + fp32_from_bits(denorm_mask)); + result = static_cast(f_bits - denorm_mask); + if (result == 0) { + // fnuz types don't have negative zero. + return 0; + } + } else { + // resulting mantissa is odd + uint8_t mant_odd = (f_bits >> 20) & 1; + + // update exponent, rounding bias part 1 + f_bits += ((uint32_t)(8 - 127) << 23) + 0x7FFFF; + + // rounding bias part 2 + f_bits += mant_odd; + + // take the bits! + result = static_cast(f_bits >> 20); + } + + result |= sign >> 24; + return result; +} + +} // namespace detail + +struct alignas(1) Float8_e4m3fnuz { + uint8_t x; + + struct from_bits_t {}; + C10_HOST_DEVICE static constexpr from_bits_t from_bits() { + return from_bits_t(); + } + + Float8_e4m3fnuz() = default; + + constexpr C10_HOST_DEVICE Float8_e4m3fnuz(uint8_t bits, from_bits_t) + : x(bits){}; + inline C10_HOST_DEVICE Float8_e4m3fnuz(float value); + inline C10_HOST_DEVICE operator float() const; + inline C10_HOST_DEVICE bool isnan() const; +}; + +C10_API std::ostream& operator<<( + std::ostream& out, + const Float8_e4m3fnuz& value); + +} // namespace c10 + +#include // IWYU pragma: keep diff --git a/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/ntconsole-35 b/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/ntconsole-35 new file mode 100644 index 0000000000000000000000000000000000000000..2332b3ab8f198b4e300eee78fd0b6bf7794b8d9a Binary files /dev/null and b/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/ntconsole-35 differ diff --git a/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/opennt-35 b/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/opennt-35 new file mode 100644 index 0000000000000000000000000000000000000000..2332b3ab8f198b4e300eee78fd0b6bf7794b8d9a Binary files /dev/null and b/shared/package-files/d6/d6b65b4ef043257e037831084344c1359aed4e6a39073b44cc3dc45eb38ba564/opennt-35 differ diff --git a/shared/package-files/d6/d6b65e6c213a5d0b577911d34d6e5949b9f59d76c238c5071a2f3fc16cfb2606/LICENSE b/shared/package-files/d6/d6b65e6c213a5d0b577911d34d6e5949b9f59d76c238c5071a2f3fc16cfb2606/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..85f4dd63d2da8e31d7e84d5180f016fdfe315c2c --- /dev/null +++ b/shared/package-files/d6/d6b65e6c213a5d0b577911d34d6e5949b9f59d76c238c5071a2f3fc16cfb2606/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2015 holger krekel (rather uses bitbucket/hpk42) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/shared/package-files/d6/d6b9cabb03539e116aecb80efc7a69d43f936075f6ad5c77dfa5d46dad7ddc7f/msgcat-1.6.1.tm b/shared/package-files/d6/d6b9cabb03539e116aecb80efc7a69d43f936075f6ad5c77dfa5d46dad7ddc7f/msgcat-1.6.1.tm new file mode 100644 index 0000000000000000000000000000000000000000..fa91a3740ef6f7c296674ed4251cc9c36fe08379 --- /dev/null +++ b/shared/package-files/d6/d6b9cabb03539e116aecb80efc7a69d43f936075f6ad5c77dfa5d46dad7ddc7f/msgcat-1.6.1.tm @@ -0,0 +1,1210 @@ +# msgcat.tcl -- +# +# This file defines various procedures which implement a +# message catalog facility for Tcl programs. It should be +# loaded with the command "package require msgcat". +# +# Copyright (c) 2010-2015 Harald Oehlmann. +# Copyright (c) 1998-2000 Ajuba Solutions. +# Copyright (c) 1998 Mark Harrison. +# +# See the file "license.terms" for information on usage and redistribution +# of this file, and for a DISCLAIMER OF ALL WARRANTIES. + +package require Tcl 8.5- +# When the version number changes, be sure to update the pkgIndex.tcl file, +# and the installation directory in the Makefiles. +package provide msgcat 1.6.1 + +namespace eval msgcat { + namespace export mc mcexists mcload mclocale mcmax mcmset mcpreferences mcset\ + mcunknown mcflset mcflmset mcloadedlocales mcforgetpackage\ + mcpackageconfig mcpackagelocale + + # Records the list of locales to search + variable Loclist {} + + # List of currently loaded locales + variable LoadedLocales {} + + # Records the locale of the currently sourced message catalogue file + variable FileLocale + + # Configuration values per Package (e.g. client namespace). + # The dict key is of the form "