mstar.model.pi05.components.normalization#
Per-deployment normalization of the robot state and actions.
openpi’s policy server quantile-normalizes the raw robot state before it is
binned into the prompt, and maps the model’s actions back to robot units
(transforms.Normalize / Unnormalize with use_quantiles=True, which
pi0.5 uses). A deployment that gives the same statistics in its serving config
takes the raw state from clients and returns raw actions, like openpi does.
Functions
|
Parse the |
Classes
|
|
|
Per-dimension 1st and 99th percentiles, which normalization maps to -1 and 1. |
- class mstar.model.pi05.components.normalization.Pi05NormStats(state: 'QuantileStats | None' = None, actions: 'QuantileStats | None' = None)[source]#
Bases:
object- Parameters:
state (QuantileStats | None)
actions (QuantileStats | None)
- actions: QuantileStats | None = None#
- normalize_state(state)[source]#
Quantile-normalize a raw state. Like openpi, the stats are cut to the state’s length, so a robot with fewer dims than the stats is fine.
- state: QuantileStats | None = None#
- class mstar.model.pi05.components.normalization.QuantileStats(q01, q99)[source]#
Bases:
NamedTuplePer-dimension 1st and 99th percentiles, which normalization maps to -1 and 1.
- mstar.model.pi05.components.normalization.load_norm_stats(spec)[source]#
Parse the
norm_statsmodel kwarg.specis either a mapping laid out like openpi’snorm_stats.json(stateand/oractions, each withq01andq99lists, other fields such asmean/stdignored, optionally under a top-levelnorm_statskey) or the path of such a JSON file. A file’s trailing dims withq01 == q99are openpi’s padding and are dropped. Inline stats are taken as written.- Parameters:
- Return type:
Pi05NormStats | None