Skip to content

contextual: require a climb head only for rules that read climb_pred - #305

Open
gabriellemerritt wants to merge 3 commits into
mainfrom
dev/gabmerri/contextual-dz-without-climb-head
Open

gabriellemerritt wants to merge 3 commits into
mainfrom
dev/gabmerri/contextual-dz-without-climb-head

Conversation

@gabriellemerritt

@gabriellemerritt gabriellemerritt commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

What

A contextual policy needs a climb_pred head only when something reads it:

  • the caller (require_climb_head);
  • force_manual_climbing;
  • a climb rule that reads it: climb_enter: dz_and_pred, or a climb_exit other than both_off.

Under climb_enter: dz_or_pred or dz_only with climb_exit: both_off, a model without the head now loads, and the external dz alone enters and leaves the climbing gait (column 14). SetDz no longer refuses a no-head model: the constructor already refuses any whose rules need the head.

Why

Draco Alpha's contextual-locomotion students (tkbest's ctxloco_v9, 2026-11-07) are trained with column 14 as the climbing gait but export no climb_pred. SetDz(true) threw "dz requires climb_pred" for them, so FAR-pi's nav benchmark never let Alpha climb. With this change, nav's dz plus the configured enter/exit rules are enough.

The first revision added a climbing_column_trained option. Per review it is dropped: the climb rules already say whether climb_pred is read.

Testing

ContextualApi.ValidatesGraphAndOptionalClimbHeadThroughPublicFactory loads the no-head fixture under the default rules and checks:

  • dz on climbs (effective_command() == 14), and dz off leaves climbing;
  • dz_only loads;
  • dz_and_pred is still refused.

The C++ was not built locally, so this relies on CI. Pre-commit is clean.

Consumer: amazon-far-internal/FAR-pi#260.

…del without a climb head

A model can be trained with command column 14 as its climbing gait yet export no climb_pred head
(Draco Alpha's contextual locomotion students). SetDz refused any dz for such a model, so it could
never climb. ContextualConfig.climbing_column_trained (default false, so every existing caller is
unchanged) lets an external dz select column 14 under the default rules (climb_enter dz_or_pred,
climb_exit both_off), where climb_pred never fires: climb while dz is on. Rules that read climb_pred
still require the head at load.
… (replaces climbing_column_trained)

Review: no extra option. A model without climb_pred now loads under the rules that read none
(climb_enter dz_or_pred or dz_only, climb_exit both_off) and climbs on the external dz alone; the
head stays required for require_climb_head, force_manual_climbing, dz_and_pred and any exit other
than both_off. SetDz no longer refuses a no-head model: the constructor already refused one whose
rules need the head.
@gabriellemerritt gabriellemerritt changed the title contextual: climbing_column_trained lets dz climb a model without a climb head contextual: require a climb head only for rules that read climb_pred Nov 13, 2026
The contextual kernel became PrimitiveFamily with enum climb rules: the climb-head check uses
ClimbEnter/ClimbExit, and PrimitiveFamily::SetDz no longer refuses a model without a head.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant