text stringlengths 0 1.45k |
|---|
) |
write_json( |
LOGS / "hidden_density_commitment.json", |
schedule.commitment_record(), |
) |
secret_workspace = Path( |
tempfile.mkdtemp( |
prefix=".frontierphysics-ionic-hidden-schedule-", |
dir="/tmp", |
) |
) |
os.chmod(secret_workspace, 0o700) |
hidden_density_path = secret_workspace / "densities.csv" |
write_density_csv(hidden_density_path, schedule.densities) |
os.chmod(hidden_density_path, 0o400) |
source_inputs = { |
"hidden_densities": hidden_density_path, |
"config": CONFIG_PATH, |
"simulation": SIMULATION_PATH, |
"model_species_1": MODEL_1_PATH, |
"model_species_2": MODEL_2_PATH, |
"program": PROGRAM_PATH, |
} |
source_hashes_before = {label: sha256(path) for label, path in source_inputs.items()} |
assert_forbidden_reads_denied( |
[ |
ROOT, |
VERIFIER, |
ORACLE, |
Path("/logs"), |
LOGS, |
LOGS / "reward.txt", |
LOGS / "reward.json", |
LOGS / "reward-details.json", |
], |
LOGS / "hidden_access_isolation.json", |
) |
run = None |
try: |
run = run_hidden_density_submission( |
source=PROGRAM_PATH, |
config_path=CONFIG_PATH, |
densities_path=hidden_density_path, |
simulation_path=SIMULATION_PATH, |
model_1_path=MODEL_1_PATH, |
model_2_path=MODEL_2_PATH, |
timeout_seconds=240, |
) |
(LOGS / "heldout_program_stdout.txt").write_text( |
run.completed.stdout, |
encoding="utf-8", |
) |
(LOGS / "heldout_program_stderr.txt").write_text( |
run.completed.stderr, |
encoding="utf-8", |
) |
source_hashes_after = {label: sha256(path) for label, path in source_inputs.items()} |
hash_evidence = { |
"unprivileged_uid": run.uid, |
"source_before": source_hashes_before, |
"source_after": source_hashes_after, |
"staged_before": run.hashes_before, |
"staged_after": run.hashes_after, |
} |
(LOGS / "hidden_input_hashes.json").write_text( |
json.dumps(hash_evidence, indent=2, sort_keys=True) + "\n", |
encoding="utf-8", |
) |
assert source_hashes_after == source_hashes_before, "A source input changed during the hidden-density replay" |
assert run.hashes_after == run.hashes_before, "A randomized staged hidden input changed during execution" |
assert run.completed.returncode == 0, f"Hidden-density run failed:\n{run.completed.stderr}" |
heldout_eos = run.output_paths["eos"] |
heldout_summary = run.output_paths["summary"] |
require_regular_file(heldout_eos, "hidden EOS output") |
require_regular_file(heldout_summary, "hidden summary output") |
densities = tuple(load_density_csv(hidden_density_path).tolist()) |
reference = independent_reference(densities) |
write_reference_log("heldout", reference) |
actual = load_eos_csv(heldout_eos) |
> assert_rows_close(actual, reference) |
verifier/test_outputs.py:702: |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
verifier/test_outputs.py:376: in assert_rows_close |
np.testing.assert_allclose( |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
args = (<function assert_allclose.<locals>.compare at 0x789a9b8d53a0>, array([-0.02578034, -0.05099856, -0.08267039, -0.12665....15609392]), array([-0.01294636, -0.02736083, -0.04573156, -0.06922732, -0.07484921, |
-0.07667056, -0.06404102])) |
kwds = {'equal_nan': True, 'err_msg': 'Mismatch in beta_excess_free_energy_density_A3inv', 'header': 'Not equal to tolerance rtol=1e-05, atol=1e-05', 'verbose': True} |
@wraps(func) |
def inner(*args, **kwds): |
with self._recreate_cm(): |
> return func(*args, **kwds) |
^^^^^^^^^^^^^^^^^^^ |
E AssertionError: |
E Not equal to tolerance rtol=1e-05, atol=1e-05 |
E Mismatch in beta_excess_free_energy_density_A3inv |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.