Discovery (§8/§16): add Pareto-frontier construction over the multi-objective candidate score vector (DiscoveryResult.frontier + pareto_frontier()), opt-in regime segmentation (result.regimes), and bootstrap uncertainty attachment; CLI --pareto/--regimes flags. Benchmarks: a real generate->run->score->classify execution engine driving the compiled CLI (9 supported cases end-to-end, 21 honest capability boundaries). Rust workspace 329->342 tests; benchmarks +8 tests. clippy -D warnings clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
29 lines
1.0 KiB
Python
29 lines
1.0 KiB
Python
"""Determinism tests for benchmark dataset generation."""
|
|
|
|
from __future__ import annotations
|
|
|
|
import tempfile
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from _common import write_dataset
|
|
|
|
|
|
@pytest.mark.parametrize("case", ["dynamics/ode-chaotic", "dynamics/ode-small"])
|
|
def test_dataset_is_byte_reproducible(benchmarks_dir: Path, case: str) -> None:
|
|
case_dir = benchmarks_dir / case
|
|
with tempfile.TemporaryDirectory() as first, tempfile.TemporaryDirectory() as second:
|
|
one = write_dataset(case_dir, Path(first)).read_bytes()
|
|
two = write_dataset(case_dir, Path(second)).read_bytes()
|
|
assert one == two
|
|
# A discovery dataset needs a header plus several observations.
|
|
assert len(one.splitlines()) > 3
|
|
|
|
|
|
def test_lorenz_dataset_has_three_states(benchmarks_dir: Path) -> None:
|
|
case_dir = benchmarks_dir / "dynamics/ode-chaotic"
|
|
with tempfile.TemporaryDirectory() as workdir:
|
|
header = write_dataset(case_dir, Path(workdir)).read_text().splitlines()[0]
|
|
assert header == "time,x,y,z"
|