Skip to content

policy

policy

PolicyConfig dataclass

PolicyConfig(_target_='versatil.models.policy.Policy', encoding_pipeline=MISSING, algorithm=MISSING, decoder=MISSING, observation_space='${task.observation_space}', action_space='${task.action_space}', prediction_horizon='${task.prediction_horizon}', observation_horizon='${task.observation_horizon}', device='${experiment.device}', loss=MISSING, metadata_passthrough=dict())

Hydra config for constructing a policy from encoding, algorithm, decoder, and loss configs.

Attributes:

Name Type Description
_target_ str

Import path instantiated by Hydra.

encoding_pipeline EncodingPipelineConfig

Observation encoding pipeline.

algorithm Any

Decoding algorithm (diffusion, flow matching, etc.).

decoder Any

Action decoder architecture.

observation_space ObservationSpaceConfig

Observation space configuration.

action_space ActionSpaceConfig

Action space configuration.

prediction_horizon int

Number of future actions to predict.

observation_horizon int

Number of past observations to condition on.

device str

Device to run on.

loss CompositeLossConfig

Loss module for training.

metadata_passthrough dict[str, dict[str, str]]

Mapping from source dictionaries to metadata keys for logging/visualization.