Contributing: Policy¶
Policies live in plugrl-server.
Where to edit¶
- Implementation:
plugrl_server/policy/... - Registration:
plugrl_server.policy.registration
Checklist¶
- Implement a policy and its config dataclass.
- Register it (UID + variants) and make sure it is imported.
- Keep action shapes stable across inference and training.
- Return actions batch-first with a horizon axis,
(B, H, ...), and setaction_dimandaction_horizonin__init__. See the contract.
Verify¶
Start the server with your policy.
Connect a dummy worker.
Troubleshooting¶
- Policy UID not listed: registration module was not imported.
- Shape mismatch in training: align the action, the runtime state (
PolicyRuntimeState) and the train state your algorithm derives from it with your buffers.