In this section: Build
Start
Reference code
- obsp (C)
- Conformance runner (reference service)
- obsp (Go)
- Plugfests (non-normative groundwork)
- Python reference pipelines (draft profiles, synthetic data)
- obsp-eo
- obsp-model-run (draft OIP-0012, MODEL-OBSERVER)
- obsp-sensing (draft OIP-0011, NETWORK-SENSING, provisional)
- obsp-space
- Rust reference workspace
- Performance bench (WP-RI-11)
- The 0.2 candidate (DRAFT)
- obsp-core (Rust reference library)
- obsp-federation
- obsp-node-embedded
- Node agent (obsp-node)
- Evidence verifier (obsp-verify)
- obsp-sdk (TypeScript / ES modules)
Tools
API reference
- All APIs
- Observatory Protocol service administration (production services)
- Observatory Protocol CloudEvents (draft OIP-0024 binding)
- Observatory Protocol correction subscriptions
- Observatory Protocol credential status (reference service)
- Observatory Protocol discovery (reference service)
- Observatory Protocol exchange API (reference)
- Observatory Protocol federation sync (draft OIP-0004)
- Observatory Protocol Field Topic Contract (MQTT 5 and Sparkplug B)
- Observatory Protocol participant gateway
- gRPC services
- Observatory Protocol implementations and conformance registry (reference service)
- Observatory Protocol transparency log (reference service)
- Observatory Protocol WIS 2.0 notifications (draft OIP-0009 binding)
Public services
Bindings and crosswalks
obsp-model-run (draft OIP-0012, MODEL-OBSERVER)
On this page
| Field | Value |
|---|---|
| Status | Reference code written against draft proposals (DRAFT); accepts no proposal; no conformance claim |
| Package | obsp_model_run |
| Source | Python reference tools |
A recorder that wraps a model invocation and writes what the draft’s model-run object asks for, a CycloneDX ML-BOM,
output observation-records labelled by origin, and skill scores. Synthetic data and toy models only: the reference
“observations” are produced by the same kind of toy physics, so every skill score here is optimistic and says nothing
about real skill.
What the recorder captures (recorder.py)
| Item | Draft | How |
|---|---|---|
| Weights digest | MOD-2 | RFC 8785 digest of the artefact loaded; it equals the model-manifest’s artifactDigest |
| Inputs by digest | MOD-3 | add_input pins each input by UNI, version and digest with its role and origin; add_input_record and add_sensing_input take the origin from the record itself |
| Configuration digest | MOD-2 | digest of the run configuration |
| Run times | MOD-3 | invoke records runStart and runEnd from a clock, also when the model raises |
| Uncertainty method | MOD-5 | ENSEMBLE with members, or NONE; an output cannot carry an uncertainty the method does not give |
| Skill | MOD-4 | add_skill against a Reference (UNI, version, digest, period); refused against the run’s own outputs |
| ML-BOM | MOD-2 | bom.py, CycloneDX JSON, referenced from mlBomRef by URI and digest |
| Origin | MOD-6 | origin.py, the weakest-origin rule below |
Weakest-origin rule (origin.py)
Strength, strongest first: MEASURED, NETWORK_DERIVED, MODEL_DERIVED and DECLARED (equal), SIMULATED. A run’s
outputs are at best MODEL_DERIVED, whatever the inputs; a SIMULATED input or a SCENARIO run makes them
SIMULATED; the label travels down a chain of runs because an input record contributes its own origin. The draft
leaves the placing of DECLARED as an open question (OIP-0012, question 2); this code follows the draft’s table.
Skill (skill.py)
Categorical scores come from the contingency table of the forecast event against the reference event: POD = hits / (hits + misses), FAR = false alarms / (hits + false alarms), CSI = hits / (hits + misses + false alarms), F1; RMSE for continuous values. An undefined score (an empty denominator) raises instead of returning zero.
ML-BOM (bom.py)
CycloneDX specification version 1.6 (ECMA-424 is the Ecma edition of CycloneDX 1.6), checked: not checked. The BOM has
a machine-learning-model component with the weights hash, a model card with the task, datasets and performance
metrics, one data component per input and the dependencies between them. self_check is a local structural test; it
is not validation against the official JSON schema, which was not available here.
Worked example
$ make model-run
...
Ran 40 tests in 1.0s
OK
dist/model-run/report.json (seed 7):
| Run | Inputs (origins) | Output origin | Uncertainty | Skill (synthetic reference) |
|---|---|---|---|---|
| flood forecast, toy flood model | rain forced by four network-derived sensing records, terrain declared | MODEL_DERIVED |
ENSEMBLE, 10 members |
CSI 0.69, POD 0.71, FAR 0.05 (extent); RMSE 0.067 m (gauge depth) |
| design-storm scenario, same model | declared storm and terrain | SIMULATED |
NONE |
none claimed |
| water classifier (inference) | imagery, measured | MODEL_DERIVED |
NONE |
CSI 0.87, POD 0.97, FAR 0.11, F1 0.93 |
Every document is checked against the draft schemas (model-manifest, model-run, 4.0 observation-record), then the
integrated tree’s draft cases run over dist/model-run/evidence: CT-MODEL-001, -002, -004 and -005 PASS; CT-MODEL-006
is manual; CT-MODEL-003 FAILS with “no attestation-result document in the evidence set”. The recorder accepts a
compute attestation reference but this pipeline does not make one up, so that case stays failing here.
rec = ModelRunRecorder(model=ModelIdentity(uni, name, version, framework, task, weights), config=cfg,
run_kind="FORECAST", run_uni=..., operator_uni=..., uncertainty_method="ENSEMBLE",
ensemble_members=10, method_doc=(uri, text_bytes))
rec.add_sensing_input(rain_record, role="FORCING") # origin NETWORK_DERIVED, read from the record
rec.add_input("uni:coverage:terrain-24", "1", terrain, role="STATIC", origin="DECLARED")
out = rec.invoke(model.ensemble, rain_mm, terrain, members=10)
rec.add_output(uni=..., observed_property=..., result=..., artifact=out["depth"], ...) # origin MODEL_DERIVED
rec.add_skill("CSI", 0.69, Reference(uni, version, reference_value, period_start, period_end))
bundle = rec.finish() # manifest, run, observations, ml_bom, artifacts
Files: evidence/ (manifests, runs, observation records, in the layout the conformance runner reads), artifacts/
(ML-BOMs, output grids, reference data, the verification method and model card texts), report.json.
Standards named
CycloneDX 1.6 and ECMA-424, RFC 9334 (remote attestation, for the optional compute attestation reference), RFC 8785
(JSON canonicalisation). All checked: not checked. The draft’s remark on labelling generated content is not
developed here: the pipeline records the marking (origin and run) and makes no statement about any legal duty. The draft is oips/drafts/OIP-0012/OIP-0012.md.