Monty.Frameworks.Models.Salience.Telemetry.SalienceSMTelemetry behaviour (ExTbpMonty.Core v0.1.0)

Copy Markdown View Source

Where a salience module records what it judged, and why.

Mirrors tbp/monty/frameworks/models/salience/telemetry.py::SalienceSMTelemetry, a Protocol in Monty. Here it is a behaviour, and — because a struct is a value — every callback answers the telemetry it leaves behind, so a module can record a step without mutating anything a reader might be holding.

The three implementations are: this interface, a recorder that keeps nothing (...Telemetry.NoopSalienceSMTelemetry, Monty's default) and one that keeps everything (...Telemetry.DetailedSalienceSMTelemetry).

Summary

Callbacks

Records the region this step proposed.

Records the goals this step proposed.

Records an observation and the sensor's pose when it was taken.

Forgets every episode's records.

Records one step's salience map.

Records one step's segmentation mask.

Everything recorded, as Monty's state_dict reports it.

Types

t()

@type t() :: struct()

Callbacks

attention_region(t, t)

@callback attention_region(t(), Monty.Cmp.AttentionRegion.t()) :: t()

Records the region this step proposed.

goals(t, list)

@callback goals(t(), [Monty.Cmp.Goal.t()]) :: t()

Records the goals this step proposed.

raw_observation(t, map, t, list)

@callback raw_observation(t(), map(), Monty.Geometry.Rotation.t(), [float()]) :: t()

Records an observation and the sensor's pose when it was taken.

reset(t)

@callback reset(t()) :: t()

Forgets every episode's records.

salience_map(t, list)

@callback salience_map(t(), [[float()]]) :: t()

Records one step's salience map.

segmentation_map(t, list)

@callback segmentation_map(t(), [[number()]]) :: t()

Records one step's segmentation mask.

state_dict(t)

@callback state_dict(t()) :: map()

Everything recorded, as Monty's state_dict reports it.