text
stringclasses
239 values
for column in (1, 2, 3):
assert np.array_equal(np.sign(rows[:, column]), np.sign(reference[:, column]))
deviation = np.abs(
np.log(np.abs(rows[:, column])) - np.log(np.abs(reference[:, column]))
)
assert np.max(deviation) < 0.025
> np.testing.assert_allclose(rows[:, 4:14], reference[:, 4:14], rtol=2e-4, atol=2e-7)
/verifier/test_outputs.py:386:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_allclose.<locals>.compare at 0x752a3f5b1580>, array([[ 7.48356488e-01, 7.65139220e+00, 6.90303572e...7.89123238e-08, 4.93018888e-07,
1.30517411e+00, 2.23019961e+00, 1.30478755e+00,
1.80742562e+00]]))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=0.0002, atol=2e-07', 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
^^^^^^^^^^^^^^^^^^^
E AssertionError:
E Not equal to tolerance rtol=0.0002, atol=2e-07
E
E Mismatched elements: 12 / 160 (7.5%)
E Max absolute difference: 0.00804642
E Max relative difference: 0.00566706
E x: array([[ 7.483565e-01, 7.651392e+00, 6.903036e+00, 9.224261e+00,
E 7.865555e+00, 8.565591e+01, 5.039783e-01, 5.047907e-01,
E 5.021871e-01, 5.120198e-02],...
E y: array([[ 7.483565e-01, 7.651392e+00, 6.903036e+00, 9.224261e+00,
E 7.866994e+00, 8.565591e+01, 5.039783e-01, 5.047907e-01,
E 5.021871e-01, 5.120198e-02],...
/usr/local/lib/python3.12/contextlib.py:81: AssertionError
_________________ test_serialized_band_observable_consistency __________________
def test_serialized_band_observable_consistency():
> bands = read_bands()
^^^^^^^^^^^^
/verifier/test_outputs.py:392:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def read_bands() -> dict:
path = ROOT / "universal_bands.json"
assert path.is_file(), "missing universal_bands.json"
data = json.loads(path.read_text())
assert set(data) == {"ratio_grid", "ng_grid", "energies"}
ratios = np.asarray(data["ratio_grid"], dtype=float)
ng_grid = np.asarray(data["ng_grid"], dtype=float)
energies = np.asarray(data["energies"], dtype=float)
expected_shape = (len(ratios), len(ng_grid), LEVELS)
> assert energies.shape == expected_shape, f"energies shape {energies.shape} != {expected_shape}"
E AssertionError: energies shape (16, 4, 65) != (16, 65, 4)
E assert (16, 4, 65) == (16, 65, 4)
E
E At index 1 diff: 4 != 65
E
E Full diff:
E (
E 16,
E + 4,...
E
E ...Full output truncated (3 lines hidden), use '-vv' to show
/verifier/test_outputs.py:113: AssertionError
==================================== PASSES ====================================
=========================== short test summary info ============================
PASSED ::test_universal_summary_and_crossover_landmarks
PASSED ::test_reported_charge_cutoff_is_converged
PASSED ::test_calibration_parameters_and_weighted_fit
PASSED ::test_device_prediction_curves
PASSED ::test_operating_point_constraints_and_selection
FAILED ::test_artifact_schema_and_order - AssertionError: energies shape (16,...
FAILED ::test_full_charge_bands_and_symmetry - AssertionError: energies shape...
FAILED ::test_universal_observables_match_independent_reference - AssertionEr...
FAILED ::test_serialized_band_observable_consistency - AssertionError: energi...
========================= 4 failed, 5 passed in 1.16s ==========================
============================= 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 9 items
::test_artifact_schema_and_order PASSED [ 11%]
::test_full_charge_bands_and_symmetry PASSED [ 22%]
::test_universal_observables_match_independent_reference FAILED [ 33%]
::test_serialized_band_observable_consistency PASSED [ 44%]
::test_universal_summary_and_crossover_landmarks FAILED [ 55%]
::test_reported_charge_cutoff_is_converged PASSED [ 66%]
::test_calibration_parameters_and_weighted_fit PASSED [ 77%]
::test_device_prediction_curves PASSED [ 88%]
::test_operating_point_constraints_and_selection PASSED [100%]
=================================== FAILURES ===================================
____________ test_universal_observables_match_independent_reference ____________
def test_universal_observables_match_independent_reference():