Decode

The decode service turns raw dataset records into the tensors a run consumes. It is the bridge between the record format and the model’s input and output spaces.

Usage

Configured under services.decode. The decoders for attributes and records are themselves selectable plugins.

services:
  decode:
    features: []
    targets:  [ sim ]
    auxiliary: []
    keymap:
      truth: targets
    attrs:
      name: standard
      kwargs: {}
    records:
      name: standard
      kwargs: {}

How it works

Two decoders divide the work. The attribute decoder reads dataset-level metadata, such as column names, per-column statistics, and the set of observed label values. The record decoder reads a columnar block of records and decodes its columns (such as features, targets, etc) into flat tensors.

Configuration

Option

Description

Type

Default

features

Column names used as input features.

list[str]

[]

targets

Column names used as training targets.

list[str]

[]

auxiliary

Extra columns to decode but exclude from the loss (useful for plotting and analysis).

list[str]

[]

keymap

Overrides mapping logical roles to the keys used in the stored data.

mapping

identity

attrs

Attribute-decoder plugin selection (name / kwargs).

mapping

required

records

Record-decoder plugin selection (name / kwargs).

mapping

required

The keymap accepts the keys truth (the source of both targets and auxiliary), features, and weights. truth and features default to their own names, while weights defaults to generation, since the weights role reads whatever its decoder needs, and for simulation by default that is the per-event generation data.

Sub-slots