text stringclasses 308
values |
|---|
"maximum_quadratic_design_condition", |
"median_first_order_rms_residual", |
"median_second_order_rms_residual", |
"median_quadratic_signal_rms", |
"median_residual_reduction_fraction", |
"fraction_residual_reduction_above_threshold", |
): |
assert math.isclose( |
float(summary[key]), |
float(expected[key]), |
rel_tol=2e-9, |
abs_tol=2e-11, |
) |
for key in ( |
"residue_count", |
"directed_edge_count", |
"minimum_neighbor_count", |
"maximum_neighbor_count", |
"minimum_quadratic_design_rank", |
): |
assert int(summary[key]) == int(expected[key]) |
> assert summary["top_nonaffine_residue_keys"] == expected_top |
E AssertionError: assert ['S001-R00362...-R00340', ...] == ['S024-R00004...-R00390', ...] |
E |
E At index 0 diff: 'S001-R00362' != 'S024-R00004' |
E |
E Full diff: |
E [ |
E - 'S024-R00004', |
E - 'S024-R00024',... |
E |
E ...Full output truncated (64 lines hidden), use '-vv' to show |
test_outputs.py:1150: AssertionError |
_________ test_submitted_executable_handles_hidden_neighborhood_radius _________ |
def test_submitted_executable_handles_hidden_neighborhood_radius() -> None: |
data = input_data() |
> artifacts, hidden_reference, hidden_nonaffine = run_submitted_executable( |
data, |
HIDDEN_RADIUS, |
"hidden-radius", |
) |
test_outputs.py:1839: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:1575: in run_submitted_executable |
validate_nonaffine_summary_against_input( |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
artifacts = {'arrays': {'compression': array([0.63796991, 0.71070637, 0.70676394, ..., 0.61725815, 0.52854174, |
0.23303206])... 0.8790912591451675, 'input_schema_version': 'neutral-protein-transition-v1', 'maximum_neighbor_count': 183, ...}, ...} |
fixture = {'residue_key': array(['S000-R00001', 'S000-R00002', 'S000-R00003', ..., 'S025-R00141', |
'S025-R00142', 'S025-R0...S025', 'S025', 'S025'], dtype='<U4'), 'segment_position': array([ 1, 2, 3, ..., 141, 142, 143], dtype=int32), ...} |
reference = {'deformation_hessian': array([[[[ 0.01521155, -0.01241159, 0.00527232], |
[-0.01241159, 0.04924336, -0.01364..._order_rms_residual': array([2.39071866, 2.5620272 , 2.82955642, ..., 4.39353368, 3.34198284, |
2.30062038]), ...} |
def validate_nonaffine_summary_against_input( |
artifacts: dict[str, object], |
fixture: dict[str, np.ndarray | str], |
reference: dict[str, np.ndarray | float | int], |
) -> None: |
arrays = artifacts["nonaffine_arrays"] |
summary = artifacts["nonaffine_summary"] |
residue_key = np.asarray(fixture["residue_key"]) |
count = residue_key.size |
quadratic_signal = np.asarray(arrays["quadratic_signal_rms"]) |
residual_reduction = np.asarray( |
arrays["residual_reduction_fraction"] |
) |
ordering = sorted( |
range(count), |
key=lambda index: ( |
-float(quadratic_signal[index]), |
str(residue_key[index]), |
), |
) |
expected_top = [ |
str(residue_key[index]) |
for index in ordering[: min(TOP_K, count)] |
] |
expected = { |
"model_radius_angstrom": float(reference["model_radius_angstrom"]), |
"model_radius_multiplier": NONAFFINE_RADIUS_MULTIPLIER, |
"nonaffine_reduction_threshold": NONAFFINE_REDUCTION_THRESHOLD, |
"residue_count": count, |
"directed_edge_count": int(reference["directed_edge_count"]), |
"minimum_neighbor_count": int( |
np.min(arrays["model_neighbor_count"]) |
), |
"maximum_neighbor_count": int( |
np.max(arrays["model_neighbor_count"]) |
), |
"minimum_quadratic_design_rank": int( |
np.min(arrays["quadratic_design_rank"]) |
), |
"maximum_quadratic_design_condition": float( |
np.max(arrays["quadratic_design_condition"]) |
), |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.