text stringclasses 308
values |
|---|
"median_first_order_rms_residual": float( |
np.median(arrays["first_order_rms_residual"]) |
), |
"median_second_order_rms_residual": float( |
np.median(arrays["second_order_rms_residual"]) |
), |
"median_quadratic_signal_rms": float( |
np.median(quadratic_signal) |
), |
"median_residual_reduction_fraction": float( |
np.median(residual_reduction) |
), |
"fraction_residual_reduction_above_threshold": float( |
np.mean( |
residual_reduction > NONAFFINE_REDUCTION_THRESHOLD |
) |
), |
"top_nonaffine_residue_keys": expected_top, |
} |
for key in ( |
"model_radius_angstrom", |
"model_radius_multiplier", |
"nonaffine_reduction_threshold", |
"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...-R00337', ...] == ['S024-R00004...-R00390', ...] |
E |
E At index 0 diff: 'S001-R00362' != 'S024-R00004' |
E |
E Full diff: |
E [ |
E - 'S024-R00004', |
E - 'S024-R00020',... |
E |
E ...Full output truncated (56 lines hidden), use '-vv' to show |
test_outputs.py:1150: AssertionError |
________ test_submitted_executable_handles_compact_full_rank_transition ________ |
def test_submitted_executable_handles_compact_full_rank_transition() -> None: |
fixture, metadata = compact_full_rank_fixture() |
public = input_data() |
assert int(metadata["residue_count"]) == 80 |
assert int(metadata["residue_count"]) != np.asarray(public["residue_key"]).size |
assert {str(value) for value in fixture["residue_key"]}.isdisjoint(str(value) for value in public["residue_key"]) |
assert {str(value) for value in fixture["segment_key"]}.isdisjoint(str(value) for value in public["segment_key"]) |
LOGS.mkdir(parents=True, exist_ok=True) |
(LOGS / "compact-full-rank-fixture.json").write_text( |
json.dumps(metadata, indent=2, sort_keys=True) + "\n", |
encoding="utf-8", |
) |
> artifacts, hidden_reference, hidden_nonaffine = run_submitted_executable( |
fixture, |
COMPACT_FULL_RANK_RADIUS, |
"compact-full-rank", |
) |
test_outputs.py:1881: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:1575: in run_submitted_executable |
validate_nonaffine_summary_against_input( |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
artifacts = {'arrays': {'compression': array([0.43653122, 0.52005674, 0.48332031, 0.26770511, 0.32860941, |
0.60871512, 0.328...e_threshold': 0.5125, 'input_schema_version': 'neutral-protein-transition-v1', 'maximum_neighbor_count': 79, ...}, ...} |
fixture = {'residue_key': array(['H-413DE2D906F3-R051', 'H-413DE2D906F3-R020', |
'H-413DE2D906F3-R032', 'H-413DE2D906F3-R01..., |
7042, 7133, 7035, 7154, 7504, 7490, 7217, 7014, 7420, 7273, 7539, |
7063, 7301, 7336], dtype=int32), ...} |
reference = {'deformation_hessian': array([[[[-1.61892042e-03, -1.08232234e-03, -1.85940772e-04], |
[-1.08232234e-03, -2.61...4851384 , 0.43814921, 0.46335266, 0.44144179, |
0.43479039, 0.46461473, 0.48350409, 0.4343621 , 0.44174635]), ...} |
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"] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.