Schemas¶
Warning
Pre-implementation. This page describes proposed contracts. Class signatures, parameter types, schema fields, and behavior are subject to change before code lands. Once implementation exists, content here will be regenerated from docstrings or sourced from running tests.
Serialized contracts that define tasks, datasets, submissions, runs, and governance records. Every model is a Pydantic v2 BaseModel; data types are frozen dataclasses (frozen=True, slots=True) following the same convention as rfgen core types. Field lists mirror the schema reference pages in Reference / Schemas so the API page and the schema page agree.
Three roles¶
Role |
Examples |
|---|---|
Data types (frozen dataclasses) |
|
Manifest models (Pydantic v2) |
|
Record models (Pydantic v2) |
Submission, LeaderboardRow, RunManifest, PreRegistration, ReScoringLog |
Class index¶
Class |
Role |
Purpose |
|---|---|---|
Data type |
Per-task contract: id, pillar, metric, OOD axis, readout head |
|
Manifest |
Frozen rfgen configuration plus a label-extraction map |
|
Manifest |
Per-scene provenance record |
|
Manifest |
Release-level envelope bundling recipes and scenes |
|
Data type |
Per-task prediction output, one Parquet file |
|
Record |
A leaderboard submission carrying one or more prediction bundles |
|
Record |
A scored row on the leaderboard |
|
Record |
Provenance for one evaluation run |
|
Record |
Pre-registered baseline declaration |
|
Record |
Third-party re-scoring audit entry |
class emma.schemas.TaskSpec¶
Per-task contract. One TaskSpec exists per TaskID member, pinned by the TaskRegistry. It wires the task to its pillar, metric, OOD (out-of-distribution) axis, readout protocol, and target domain.
@dataclass(frozen=True, slots=True)
class TaskSpec:
id: TaskID
pillar: Pillar
version: ReleaseVersion
input_view: str
label_schema_ref: str
metric_id: str
ood_axis: OODAxis
readout_protocol: str
target_domain: Domain
maturity: Maturity
rationale: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
Canonical task identifier |
|
|
Top-level task family |
|
|
Release the task ships in |
|
|
|
Canonical input representation name, for example |
|
|
Reference to the label schema document for the task |
|
|
Identifier of the primary metric class, for example the MeanAngularError class name |
|
Primary transfer dimension the task is scored under |
|
|
|
Name of the readout head ABC the task uses |
|
Target application community |
|
|
Contract state |
|
|
|
One-sentence statement of why the task exists |
Notes¶
input_viewismulti_antenna_iqfor every v0.1 task. The raw multi-antenna I/Q (in-phase and quadrature) input is non-negotiable for AoA (angle of arrival) and beam tasks; derived views are secondary.metric_idnames the metric class; the per-task metric wiring lives in Metric reference.
class emma.schemas.DatasetRecipe(BaseModel)¶
A frozen rfgen configuration plus a label-extraction map. The unit of content-hashed reproducibility: the artifact a dataset page documents, the input to EMMADataset, and the contract between rfgen (which owns signal generation) and EMMA (which owns evaluation). See Dataset recipe for the schema reference.
class DatasetRecipe(BaseModel):
dataset_id: str
task_id: TaskID
version: ReleaseVersion
rfgen: RfgenRecipe
splits: dict[Split, SeedRange]
label_extraction: dict[str, MetadataPath]
target_domain: Domain
real_capture_counterpart: str | None = None
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Canonical dataset identifier, for example |
|
Primary task the recipe feeds |
|
|
Release the recipe ships in |
|
|
Frozen rfgen pin: commit, resolved config, array geometry |
|
|
|
Map of split to seed range and scene count; holdout range is never published |
|
|
Map of label name to the rfgen metadata field LabelExtractor reads |
|
Domain the recipe targets |
|
|
|
Optional dataset id of the paired real-capture OOD subset |
Notes¶
label_extractionkeys are label names, not TaskID members. A label such asaoa_degcan feed one task whilelos_flagfeeds another off the same scene set.splitspartitions integer seeds into Split members. The holdout range is a frozen secret held by the external co-steward.
class emma.schemas.SceneManifest(BaseModel)¶
Per-scene provenance record. The on-disk evidence that a scene came from a specific frozen rfgen commit, config, and seed, carrying the realized emitter, channel, and SNR values that LabelExtractor turns into task labels. See Scene manifest.
class SceneManifest(BaseModel):
scene_id: str
generator: str
commit: str
config: str
seed: int
content_hash: str
arrays: list[str]
emitters: list[EmitterRecord]
channel: str
snr_db: float
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Stable per-scene identifier |
|
|
Always |
|
|
Frozen rfgen git SHA (or capture-testbed record id) |
|
|
Path to the resolved rfgen |
|
|
Integer seed that parameterized the scene |
|
|
Content hash of the generated I/Q and metadata, for example |
|
|
Receiver array identifiers, resolved into ArraySpec at load time |
|
|
Realized emitters, each carrying waveform, family, and direction |
|
|
Channel environment identifier, maps to an Environment member |
|
|
Realized signal-to-noise ratio in decibels after the rfgen channel chain |
class emma.schemas.DataReleaseManifest(BaseModel)¶
Release-level envelope. Bundles SceneManifest records for one or more DatasetRecipe instances into a single content-hashed release, pins the rfgen commit, and records split assignments. See Data release manifest.
class DataReleaseManifest(BaseModel):
release_id: str
version: ReleaseVersion
recipes: list[str]
scene_manifests: list[SceneManifest]
split_assignments: dict[str, Split]
rfgen_commit: str
content_hash: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Canonical release identifier, for example |
|
Release the manifest belongs to |
|
|
|
The |
|
|
Per-scene provenance records across all bundled recipes |
|
|
Map of |
|
|
Single frozen rfgen git SHA that generated every synthetic scene |
|
|
Content hash over the manifest and referenced scene hashes |
Notes¶
A release pins one
rfgen_commitfor all synthetic recipes. A later recipe requiring a newer rfgen commit ships as a new release with a newrelease_idandcontent_hash.
class emma.schemas.PredictionBundle¶
Per-task prediction output. One Parquet file per task, keyed by scene_id. Validated by SubmissionValidator before scoring.
@dataclass(frozen=True, slots=True)
class PredictionBundle:
task_id: TaskID
split: Split
rows: str
prediction_bundle_hash: str
Fields¶
Notes¶
The Parquet file at
rowsis keyed byscene_id. One row per held-out scene; column schema is pinned per task by TaskSpec and validated by SubmissionValidator.prediction_bundle_hashcovers the Parquet bytes on disk, not the in-memory tensor layout, so a reviewer re-running the loader recovers the same hash.
class emma.schemas.Submission(BaseModel)¶
A leaderboard submission carrying one or more prediction bundles. Validated, then scored by HoldoutScorer.
class Submission(BaseModel):
leaderboard_version: ReleaseVersion
model_name: str
submitter: str
model_provenance: str
prediction_bundles: list[PredictionBundle]
pre_registration_id: str | None = None
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
Leaderboard track the submission targets |
|
|
|
Display name of the model |
|
|
Submitter handle or team name |
|
|
Training config, code commit, or checkpoint reference |
|
|
One bundle per task in the submission |
|
|
Required for operator submissions; links to the PreRegistration record |
class emma.schemas.LeaderboardRow(BaseModel)¶
A scored row on the leaderboard. Carries three auditable references: the model display name, the data release hash (the data the scores were computed on), and the per-task metric scores. The prediction-bundle hash that pins exactly which outputs were scored lives on the RunManifest, not the row; a reviewer recovers it from the linked run record.
class LeaderboardRow(BaseModel):
rank: int
model: str
submitter: str
task_scores: dict[str, float]
ood_avg: float
sim_real_gap: float
data_release_hash: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Leaderboard rank by |
|
|
Model display name |
|
|
Submitter handle or team name |
|
|
Per-task metric values, keyed by TaskID value |
|
|
Normalized OOD average across scored tasks; the headline number |
|
|
Sim-to-real gap in percentage points |
|
|
Content hash of the DataReleaseManifest the scores were computed on |
Notes¶
The row’s
prediction_bundle_hash(the per-task output hash) lives on the linked RunManifest, not on the row, so the row stays small and the per-task artifact is recovered through the run record.rankis assigned by the LeaderboardStore on insert (or as a derived view on read); scoring produces a row with an unranked placeholder. See Leaderboard for the ranking contract.
class emma.schemas.RunManifest(BaseModel)¶
Provenance for one evaluation run. Produced by Evaluator and recorded alongside the EvalRun.
class RunManifest(BaseModel):
model_provenance: str
data_release_hash: str
prediction_bundle_hashes: dict[str, str]
task_metrics: dict[str, float]
seed: int
harness_version: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Training config, code commit, or checkpoint reference |
|
|
Content hash of the data release scored |
|
|
Per-task PredictionBundle content hashes, keyed by TaskID value; pin exactly which outputs were scored. The model half of the auditable result triple, surfaced here because the LeaderboardRow does not carry it |
|
|
Per-task metric values from the run |
|
|
Seed used for readout-head fitting and fold construction |
|
|
EMMA harness version that produced the run |
class emma.schemas.PreRegistration(BaseModel)¶
Pre-registered baseline declaration, recorded before the held-out split is unsealed. Clinical-trial-style provenance so a model-builder cannot retroactively claim an architecture choice. See Governance.
class PreRegistration(BaseModel):
model_arch: str
training_config: str
declared_before_holdout_unseal: bool
timestamp: str
hash: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Architecture description |
|
|
Training configuration reference |
|
|
Timestamped proof the declaration preceded holdout unseal |
|
|
ISO 8601 timestamp of the declaration |
|
|
Content hash of the declaration for tamper detection |
class emma.schemas.ReScoringLog(BaseModel)¶
Third-party re-scoring audit entry. Records that an external co-steward re-scored a submission on the held-out split, with published logs. The ring-fence instrument between Superpose’s model team and EMMA ops.
class ReScoringLog(BaseModel):
submission_id: str
scored_by: str
scores: dict[str, float]
timestamp: str
logs_uri: str
Fields¶
Field |
Type |
Purpose |
|---|---|---|
|
|
Identifier of the re-scored submission |
|
|
External co-steward identity |
|
|
Re-computed per-task scores |
|
|
ISO 8601 timestamp of the re-scoring run |
|
|
URI to the full scoring log artifact |
Helper types¶
Three types appear in the field tables above without their own API page. They are defined here so an implementer can code against them. They are EMMA-owned aliases over rfgen metadata and EMMA split bookkeeping, not rfgen types.
SeedRange¶
A closed integer seed range plus a scene count, used to partition the seed space into Split members.
@dataclass(frozen=True, slots=True)
class SeedRange:
start: int
stop: int
count: int
Field |
Type |
Purpose |
|---|---|---|
|
|
Inclusive first seed in the range |
|
|
Inclusive last seed in the range |
|
|
Number of scenes the range yields; |
The holdout SeedRange is a frozen secret held by the external co-steward and never published with labels. The realized scene count per split must equal count, enforced by the loader.
MetadataPath¶
A dotted path into the realized rfgen scene metadata that LabelExtractor resolves to produce a label. It is a str alias constrained by the path grammar below, not a free-form string.
MetadataPath = str # grammar: "<container>[].<rfgen_metadata_key>"
Token |
Meaning |
|---|---|
|
A repeated rfgen container indexed over every element, for example |
|
A key in the realized rfgen per-emitter or scene metadata bag, for example |
A path that does not resolve on a realized scene yields an empty label rather than a score. When every scene in a split misses the path, the loader raises RecipeMismatchError rather than scoring silently. The canonical rfgen metadata keys a path may target are owned by rfgen; EMMA pins them in the recipe, it does not define them.
EmitterRecord¶
A frozen record describing one realized emitter in a scene, carried in SceneManifest.emitters. It promotes the rfgen per-emitter metadata subset EMMA consumes for labeling and provenance; the raw rfgen metadata bag travels separately.
@dataclass(frozen=True, slots=True)
class EmitterRecord:
emitter_idx: int
family: str
class_name: str
waveform: str
aoa_deg: float | None
los_flag: bool | None
Field |
Type |
Purpose |
|---|---|---|
|
|
Stable emitter index within the scene |
|
|
rfgen emitter family, for example |
|
|
Canonical taxonomy label |
|
|
Waveform identifier, for example |
|
|
rfgen per-emitter angle-of-arrival metadata, in degrees, when the scene carries it; the |
|
|
rfgen ray-tracer path-class flag, when the scene carries it; the |
Fields beyond these (SNR, channel profile, fingerprint id) stay in the raw rfgen metadata bag; only the fields a task labels are promoted onto the record.
References¶
Library: Pydantic v2 (
pydantic.BaseModel) for the manifest and record models. (verify)Convention: Parquet columnar format for PredictionBundle row storage and interchange.
Convention: ISO 8601 timestamps for PreRegistration and ReScoringLog time fields.
See Also¶
Dataset recipe, Scene manifest, Data release manifest: the schema field references these models implement.
Primitives: the enums consumed by every schema field.
Datasets: the classes that load and resolve these manifests.
Leaderboard: the classes that consume submissions and produce rows.