text stringlengths 0 2.43k |
|---|
FAILED ::test_hidden_independent_finite_difference_spectrum - AssertionError:... |
FAILED ::test_malformed_inputs_fail_closed - AssertionError: assert 0 != 0 |
========================= 7 failed in 65.89s (0:01:05) ========================= |
============================= test session starts ============================== |
platform linux -- Python 3.12.13, pytest-8.4.1, pluggy-1.6.0 -- /usr/local/bin/python3 |
rootdir: /app |
configfile: ../dev/null |
plugins: json-ctrf-0.3.5 |
collecting ... collected 7 items |
::test_artifacts_manifest_and_input_integrity FAILED [ 14%] |
::test_public_branch_physics PASSED [ 28%] |
::test_public_profiles_independent FAILED [ 42%] |
::test_public_spectrum_turning_and_convergence FAILED [ 57%] |
::test_hidden_changed_family_replay FAILED [ 71%] |
::test_hidden_independent_finite_difference_spectrum PASSED [ 85%] |
::test_malformed_inputs_fail_closed FAILED [100%] |
=================================== FAILURES =================================== |
_________________ test_artifacts_manifest_and_input_integrity __________________ |
public_instance = {'boundary_value': {'initial_mesh_points': 560, 'max_nodes': 36000, 'origin_fraction': 2.5e-06, 'tolerance': 2e-07}, '..., 'profile_anchor_count': 2, 'refined_tolerance_factor': 0.35}, 'domain': {'profile_points': 801, 'radius': 40.0}, ...} |
def test_artifacts_manifest_and_input_integrity(public_instance: dict[str, Any]) -> None: |
assert {path.name for path in RESULTS.iterdir()} == REQUIRED_ARTIFACTS |
assert all(path.is_file() and not path.is_symlink() for path in RESULTS.iterdir()) |
manifest = load_json(RESULTS / "manifest.json") |
assert manifest["schema_version"] == RESULT_SCHEMA |
> assert manifest["completed"] is True |
^^^^^^^^^^^^^^^^^^^^^ |
E KeyError: 'completed' |
/verifier/test_outputs.py:861: KeyError |
_______________________ test_public_profiles_independent _______________________ |
public_instance = {'boundary_value': {'initial_mesh_points': 560, 'max_nodes': 36000, 'origin_fraction': 2.5e-06, 'tolerance': 2e-07}, '..., 'profile_anchor_count': 2, 'refined_tolerance_factor': 0.35}, 'domain': {'profile_points': 801, 'radius': 40.0}, ...} |
public_branch = [{'bvp_max_rms_residual': '1.9608649894794986e-07', 'bvp_mesh_nodes': '629', 'central_amplitude': '0.18', 'chemical_po...645e-07', 'bvp_mesh_nodes': '708', 'central_amplitude': '0.52', 'chemical_potential': '-0.9196231268316275', ...}, ...] |
def test_public_profiles_independent(public_instance: dict[str, Any], public_branch: list[dict[str, str]]) -> None: |
> evidence = validate_profiles(RESULTS, public_instance, public_branch) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
/verifier/test_outputs.py:920: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
result_path = PosixPath('/root/results') |
instance = {'boundary_value': {'initial_mesh_points': 560, 'max_nodes': 36000, 'origin_fraction': 2.5e-06, 'tolerance': 2e-07}, '..., 'profile_anchor_count': 2, 'refined_tolerance_factor': 0.35}, 'domain': {'profile_points': 801, 'radius': 40.0}, ...} |
branch_rows = [{'bvp_max_rms_residual': '1.9608649894794986e-07', 'bvp_mesh_nodes': '629', 'central_amplitude': '0.18', 'chemical_po...645e-07', 'bvp_mesh_nodes': '708', 'central_amplitude': '0.52', 'chemical_potential': '-0.9196231268316275', ...}, ...] |
def validate_profiles(result_path: Path, instance: dict[str, Any], branch_rows: list[dict[str, str]]) -> list[dict[str, Any]]: |
index = load_json(result_path / "profile_index.json") |
assert index["schema_version"] == RESULT_SCHEMA |
expected_inventory = expected_state_inventory(instance) |
observed_inventory = [ |
( |
entry["family_id"], |
int(entry["node_count"]), |
int(entry["state_index"]), |
round(float(entry["central_amplitude"]), 12), |
) |
for entry in index["profiles"] |
] |
assert observed_inventory == expected_inventory |
radius = float(instance["domain"]["radius"]) |
points = int(instance["domain"]["profile_points"]) |
beta = float(instance["model"]["beta"]) |
evidence = [] |
with np.load(result_path / "profiles.npz", allow_pickle=False) as arrays: |
expected_array_keys = {array_key for entry in index["profiles"] for array_key in entry["keys"].values()} |
assert len(expected_array_keys) == len(index["profiles"]) * 5 |
assert set(arrays.files) == expected_array_keys |
for entry in index["profiles"]: |
family_id = entry["family_id"] |
amplitude = float(entry["central_amplitude"]) |
row = row_for_state(branch_rows, family_id, amplitude) |
keys = entry["keys"] |
assert set(keys) == {"r", "psi", "dpsi", "phi", "enclosed_mass"} |
values = {name: np.asarray(arrays[keys[name]], dtype=float) for name in keys} |
assert all(array.ndim == 1 and array.size == points for array in values.values()) |
assert all(np.all(np.isfinite(array)) for array in values.values()) |
radial = values["r"] |
assert np.max(np.abs(radial - np.linspace(0.0, radius, points))) < 1e-12 |
assert abs(values["psi"][0] - amplitude) < 2e-5 |
assert abs(values["dpsi"][0]) < 1e-12 |
assert abs(values["psi"][-1]) < 2e-7 |
assert count_nodes(values["psi"]) == int(entry["node_count"]) == int(row["node_count"]) |
assert np.all(np.diff(values["enclosed_mass"]) >= -1e-8) |
finite_difference_derivative = np.gradient(values["psi"], radial, edge_order=2) |
derivative_interior = slice(2, -2) |
derivative_difference = values["dpsi"][derivative_interior] - finite_difference_derivative[derivative_interior] |
derivative_relative_l2 = float( |
np.linalg.norm(derivative_difference) / (np.linalg.norm(finite_difference_derivative[derivative_interior]) + 1e-14) |
) |
derivative_relative_linf = float( |
np.max(np.abs(derivative_difference)) / (np.max(np.abs(finite_difference_derivative[derivative_interior])) + 1e-14) |
) |
assert derivative_relative_l2 < 0.04 |
assert derivative_relative_linf < 0.07 |
enclosed_direct = cumulative_trapezoid(4.0 * math.pi * radial**2 * values["psi"] ** 2, radial, initial=0.0) |
enclosed_relative_linf = float( |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.