text stringlengths 0 249 |
|---|
============================= test session starts ============================== |
platform linux -- Python 3.12.13, pytest-8.4.1, pluggy-1.6.0 -- /usr/local/bin/python3 |
rootdir: /root |
configfile: ../dev/null |
plugins: json-ctrf-0.3.5 |
collecting ... collected 12 items |
../root::test_nominal_schema PASSED [ 8%] |
../root::test_nominal_equilibrium_and_curvature PASSED [ 16%] |
../root::test_nominal_branch_internal_consistency PASSED [ 25%] |
../root::test_nominal_matches_full_hessian_method FAILED [ 33%] |
../root::test_nominal_lamb_dicke_and_sum_rule PASSED [ 41%] |
../root::test_nominal_sympathetic_coupling PASSED [ 50%] |
../root::test_nominal_json_derived_from_arrays PASSED [ 58%] |
../root::test_nominal_convergence_study FAILED [ 66%] |
../root::test_nominal_mass_ratio_scan FAILED [ 75%] |
../root::test_nominal_mode_mediated_ising_scan PASSED [ 83%] |
../root::test_nominal_anti_cheat PASSED [ 91%] |
../root::test_submitted_solver_generalizes_to_heldout_configuration FAILED [100%] |
=================================== FAILURES =================================== |
___________________ test_nominal_matches_full_hessian_method ___________________ |
def test_nominal_matches_full_hessian_method() -> None: |
> assert_matches_independent(load_bundle(ROOT, NOMINAL_INPUT), NOMINAL_INPUT) |
test_outputs.py:1048: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
bundle = Bundle(output_dir=PosixPath('/root'), config={'model': 'mixed_species_linear_chain', 'convention': 'dc_axial_pseudopot...], [0.06279849880208363, 0.0016064239788763997, 0.02974041178453687, 0.005002514032107047, 0.19744965917143736, 0.0]]}) |
input_path = PosixPath('/verifier/nominal_input.json') |
def assert_matches_independent(bundle: Bundle, input_path: Path) -> None: |
reference = independent_reference(str(input_path)) |
assert reference.max_block_leakage < 1e-6, ( |
"method B: branches are not decoupled (spatial block leakage too large)" |
) |
fz = float(bundle.arrays["reference_axial_frequency_hz"]) |
for branch in BRANCHES: |
agent_ratios = np.sort(bundle.arrays[f"frequencies_{branch}"] / fz) |
> np.testing.assert_allclose( |
agent_ratios, reference.frequency_ratios[branch], |
rtol=FREQ_RTOL, atol=FREQ_ATOL, |
err_msg=f"{branch} frequencies disagree with the full 3N Hessian (method B)", |
) |
E AssertionError: |
E Not equal to tolerance rtol=1e-05, atol=1e-06 |
E radial_x frequencies disagree with the full 3N Hessian (method B) |
E Mismatched elements: 3 / 6 (50%) |
E Max absolute difference among violations: 0.0185081 |
E Max relative difference among violations: 0.00551998 |
E ACTUAL: array([3.334419, 3.421615, 3.575299, 7.828665, 7.913367, 8.049321]) |
E DESIRED: array([3.352927, 3.439655, 3.592586, 7.828676, 7.913381, 8.049324]) |
test_outputs.py:473: AssertionError |
________________________ test_nominal_convergence_study ________________________ |
def test_nominal_convergence_study() -> None: |
> assert_convergence(load_bundle(ROOT, NOMINAL_INPUT), NOMINAL_INPUT) |
test_outputs.py:1064: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
bundle = Bundle(output_dir=PosixPath('/root'), config={'model': 'mixed_species_linear_chain', 'convention': 'dc_axial_pseudopot...], [0.06279849880208363, 0.0016064239788763997, 0.02974041178453687, 0.005002514032107047, 0.19744965917143736, 0.0]]}) |
input_path = PosixPath('/verifier/nominal_input.json') |
def assert_convergence(bundle: Bundle, input_path: Path) -> None: |
conv = bundle.convergence |
assert conv["schema_version"] == "chain-convergence-v1" |
assert float(conv["equilibrium_max_residual"]) < 1e-8 |
levels = conv["levels"] |
expected_num_levels = int(bundle.config["hessian_convergence"]["num_levels"]) |
assert isinstance(levels, list) and len(levels) == expected_num_levels |
for level in levels: |
assert set(level) == { |
"relative_step", |
"grid_spacing_m", |
"max_frequency_error_over_wz", |
} |
errors = [float(level["max_frequency_error_over_wz"]) for level in levels] |
steps = [float(level["relative_step"]) for level in levels] |
grid_spacings = [float(level["grid_spacing_m"]) for level in levels] |
assert all(steps[i] > steps[i + 1] > 0.0 for i in range(len(steps) - 1)) |
assert all( |
grid_spacings[i] > grid_spacings[i + 1] > 0.0 |
for i in range(len(grid_spacings) - 1) |
) |
factor = float(bundle.config["hessian_convergence"]["refinement_factor"]) |
expected_steps = [ |
float(bundle.config["hessian_convergence"]["initial_relative_step"]) / factor**level |
for level in range(len(levels)) |
] |
np.testing.assert_allclose( |
steps, expected_steps, rtol=1e-12, atol=0.0, |
err_msg="relative_step levels do not follow the configured refinement sequence", |
) |
np.testing.assert_allclose( |
np.asarray(grid_spacings[:-1]) / np.asarray(grid_spacings[1:]), |
np.full(len(grid_spacings) - 1, factor), |
rtol=1e-10, |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 267