nemo_rl.experience.route_plan#
Strict metadata contract for deferred routed-expert assembly.
Module Contents#
Classes#
One root-first route contribution to a canonical rollout row. |
|
How a policy worker reconstructs routes from staged fragments. |
Functions#
Validate a plan without encoding it (direct mode never serializes). |
|
Encode a validated plan into primitive |
|
Strictly decode a plan without defaults or compatibility guesses. |
|
Return the compact UTF-8 encoded size used for observability. |
Data#
API#
- nemo_rl.experience.route_plan.ROUTE_PLAN_SCHEMA_VERSION#
2
- nemo_rl.experience.route_plan._EXTRAS_DIGEST_VERSION#
1
- nemo_rl.experience.route_plan._SHA256_HEX_LENGTH#
64
- class nemo_rl.experience.route_plan.RouteSpan[source]#
One root-first route contribution to a canonical rollout row.
How a span contributes (full/tail/sentinel) is Gym’s decision table —
nemo_gym.token_id_capture.staging.routes.classify_route_span— applied by the shared plan executor; this module carries metadata only.- staging_key: str#
None
- carry_len: int#
None
- generation_len: int#
None
- staged_route_len: int#
None
- extras_digest_version: int#
None
- extras_digest: str#
None
- class nemo_rl.experience.route_plan.RouteAssemblyPlan[source]#
How a policy worker reconstructs routes from staged fragments.
- schema_version: int#
None
- staging_partition: str#
None
- spans: tuple[nemo_rl.experience.route_plan.RouteSpan, ...]#
None
- cleanup_staging_keys: tuple[str, ...]#
None
- expected_token_length: int#
None
- nemo_rl.experience.route_plan._require_exact_keys(
- value: dict[str, Any],
- expected: set[str],
- *,
- where: str,
- nemo_rl.experience.route_plan.validate_route_plan( ) None[source]#
Validate a plan without encoding it (direct mode never serializes).
- nemo_rl.experience.route_plan.encode_route_plan( ) dict[str, Any][source]#
Encode a validated plan into primitive
KVBatchMeta.tagsdata.
- nemo_rl.experience.route_plan.decode_route_plan(
- value: Any,
Strictly decode a plan without defaults or compatibility guesses.