text stringlengths 0 1.12k |
|---|
============================= 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 |
../app::test_frozen_instance_untampered PASSED [ 11%] |
../app::test_results_present_and_complete PASSED [ 22%] |
../app::test_each_instance_config_matches_independent_recompute FAILED [ 33%] |
../app::test_quadrupole_absence_and_scaling_contrast PASSED [ 44%] |
../app::test_dimensions_and_counts_are_integers_and_physical PASSED [ 55%] |
../app::test_signed_dipole_pair_has_same_physical_q2 PASSED [ 66%] |
../app::test_held_out_solver_generalizes FAILED [ 77%] |
../app::test_held_out_solver_rejects_forbidden_quadrupole PASSED [ 88%] |
../app::test_no_leaked_reference_artifacts PASSED [100%] |
=================================== FAILURES =================================== |
___________ test_each_instance_config_matches_independent_recompute ____________ |
def test_each_instance_config_matches_independent_recompute(): |
LOGS.mkdir(parents=True, exist_ok=True) |
summary = [] |
for entry, rec, ref in _instance_iter(): |
where = f"config {entry['id']}" |
assert (float(rec["I"]), float(rec["J"]), float(rec["A_MHz"]), float(rec["B_Q_MHz"]), |
float(rec["g_J"]), float(rec["g_I"])) == ( |
float(entry["I"]), float(entry["J"]), float(entry["A_MHz"]), |
float(entry["B_Q_MHz"]), float(entry["g_J"]), float(entry["g_I"])), ( |
f"{where}: config identity mismatch") |
> check_config(rec, ref, where) |
test_outputs.py:535: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
test_outputs.py:417: in check_config |
both_none_or_close(rec["B_magic_mT"], ref["B_magic"], 1.5e-2, 1e-3, f"{where}: B_magic") |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
got = None, ref = 0.06982040648541625, rel = 0.015, ab = 0.001 |
where = 'config cfg-three-half-half-posA: B_magic' |
def both_none_or_close(got, ref, rel, ab, where): |
if ref is None: |
assert got is None, f"{where}: expected null, got {got}" |
else: |
> assert got is not None, f"{where}: expected {ref}, got null" |
E AssertionError: config cfg-three-half-half-posA: B_magic: expected 0.06982040648541625, got null |
E assert None is not None |
test_outputs.py:365: AssertionError |
_______________________ test_held_out_solver_generalizes _______________________ |
def test_held_out_solver_generalizes(): |
"""Re-run the agent's own solver on hidden configs; hardcoded solvers fail here.""" |
assert SOLVER.is_file(), "Missing solver" |
LOGS.mkdir(parents=True, exist_ok=True) |
records = [] |
for (I, J, A, BQ, gJ, gI) in HIDDEN_CONFIGS: |
proc = subprocess.run( |
[sys.executable, str(SOLVER), repr(I), repr(J), repr(A), repr(BQ), repr(gJ), repr(gI)], |
capture_output=True, text=True, timeout=600) |
assert proc.returncode == 0, ( |
f"agent solver failed on hidden ({I},{J},{A},{BQ},{gJ},{gI}): {proc.stderr[-800:]}") |
payload = None |
for line in reversed(proc.stdout.strip().splitlines()): |
line = line.strip() |
if line.startswith("{"): |
> payload = json.loads(line) |
^^^^^^^^^^^^^^^^ |
test_outputs.py:599: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
/usr/local/lib/python3.12/json/__init__.py:346: in loads |
return _default_decoder.decode(s) |
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
/usr/local/lib/python3.12/json/decoder.py:338: in decode |
obj, end = self.raw_decode(s, idx=_w(s, 0).end()) |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
self = <json.decoder.JSONDecoder object at 0x7ed51e109130>, s = '{', idx = 0 |
def raw_decode(self, s, idx=0): |
"""Decode a JSON document from ``s`` (a ``str`` beginning with |
a JSON document) and return a 2-tuple of the Python |
representation and the index in ``s`` where the document ended. |
This can be used to decode a JSON document from a string that may |
have extraneous data at the end. |
""" |
try: |
> obj, end = self.scan_once(s, idx) |
^^^^^^^^^^^^^^^^^^^^^^ |
E json.decoder.JSONDecodeError: Expecting property name enclosed in double quotes: line 1 column 2 (char 1) |
/usr/local/lib/python3.12/json/decoder.py:354: JSONDecodeError |
==================================== PASSES ==================================== |
=========================== short test summary info ============================ |
PASSED ../app::test_frozen_instance_untampered |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 36