Experiment Protocol API
Module: silva_networks.experiment_protocols
The protocol registry gives all 64 canonical families explicit smoke, workstation, and full-scale routes. Resource ranges are planning inputs; report observed values through the evidence API after execution.
Operational Contract
This API surface connects three-tier experiment protocols for every canonical family to the same SILVA experiment contract used by the learning pages and notebooks. Its central relation is
| Part | What must remain inspectable |
|---|---|
| State | the selected family construction together with its tier-specific data and runtime contract. |
| Condition | source relation, data route, preprocessing, seeds, metrics, resources, and acceptance checks. |
| Diagnostic | validated protocol fields followed by measured task, solver, runtime, memory, and failure records. |
| Replacement point | data adapter, task lifecycle hook, model options, runtime placement, or acceptance rule. |
| Scale axes | sample cap, epochs, seeds, resolution, batch policy, accelerators, storage, and wall time. |
The relevant method lineage is recorded in the SILVA contract [1] and PDEBench route [93]. Those references define the source mechanisms; this API exposes them through SILVA objects so a reader can inspect, replace, solve, differentiate, and scale the construction.
Complete Compact Study
Run the complete repository program below from the project root. The page uses the same file that is exercised by the test suite, so the displayed call is not an isolated fragment.
"""Create a repeated-measurement record and inspect a scale protocol."""
from silva_networks import run_silva_evidence, silva_family_experiment_protocol
def compact_trial(seed: int) -> dict[str, object]:
return {
"metrics": {"absolute_error": 0.04 + 0.005 * seed},
"residual": 1e-7 * (seed + 1),
"evaluations": 7 + seed,
"converged": True,
}
def main() -> None:
report = run_silva_evidence(
"silva_implicit_spatiotemporal",
"analytic diffusion",
compact_trial,
seeds=(0, 1, 2),
configuration={"dt": 0.2, "steps": 4},
data_receipt={"generator": "periodic diffusion", "samples": 16},
bootstrap_samples=200,
)
print("mean error", report.summaries[0].mean)
protocol = silva_family_experiment_protocol("im_pindiff")
for tier in protocol.tiers:
print(tier.tier, tier.dataset.name, tier.resources.accelerator_count)
if __name__ == "__main__":
main()
Measured Compact Output
mean error 0.045
smoke analytic ODE/PDE trajectory CPU or 1 accelerator
workstation PDEBench subset 1 accelerator
full PDEBench source task 1-8 accelerators
Interpret the Output
The same family exposes compact, subset, and complete-source routes. Resource ranges describe intended capacity and must be replaced by observed measurements in a completed result record.
For a controlled experiment, retain the compact call as a regression case and change one scale axis at a time. Record the resolved constructor, data source and split, preprocessing, seed, forward and backward solver settings, task metric, normalized residual, iteration count, runtime, peak memory, and any failed convergence case. A larger run becomes evidence only when its own resolved configuration and outputs are archived; the compact output above is evidence for the executable mechanism and its stated invariants.
Named data route and the split/access contract that must be retained.
Source code in src/silva_networks/experiment_protocols.py
Conservative planning range for one protocol tier.
Source code in src/silva_networks/experiment_protocols.py
One complete scale rung for a family experiment.
Source code in src/silva_networks/experiment_protocols.py
Compact-to-source-scale execution contract for one SILVA family.
Source code in src/silva_networks/experiment_protocols.py
as_dict
tier
validate
Return completeness errors for this protocol.
Source code in src/silva_networks/experiment_protocols.py
write_json
Write this protocol as indented JSON.
Source code in src/silva_networks/experiment_protocols.py
Build the complete three-tier protocol for a canonical family or alias.
Source code in src/silva_networks/experiment_protocols.py
Return three-tier protocols in canonical family order.
Source code in src/silva_networks/experiment_protocols.py
Return registry and protocol completeness errors.
Source code in src/silva_networks/experiment_protocols.py
Write one additive execution-protocol JSON file per family.
Source code in src/silva_networks/experiment_protocols.py
Where to Go Next
| Question | Page |
|---|---|
| What does each evidence target establish? | Evidence and Source-Scale Experiments |
| Where can I inspect all family dossiers? | Family Reproduction Dossiers |
| How do I execute a materialized protocol? | Run Everything |
| Which objects record the measured result? | Evidence API |