Skip to content

Add episode checks and validity metrics - #91

Draft
bokalnv wants to merge 5 commits into
bokal/feat/metrics-frameworkfrom
bokal/feat/metrics-validity
Draft

bokalnv wants to merge 5 commits into
bokal/feat/metrics-frameworkfrom
bokal/feat/metrics-validity

Conversation

@bokalnv

@bokalnv bokalnv commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #90. This PR adds the episode checks and the first validity metrics.

Changes

  • Episode checks run before any metric.
    • Correctness checks: finite values, aligned per-step lengths, valid observed rotations, and pose actions within
      their clip bound.
    • Camera checks: one frame per step, no black frames, no frozen runs. Frames are read in chunks.
    • An episode that fails a check is counted in correctness_pass_rate or image_stream_pass_rate and left out of
      every dataset metric. The report lists the failures per check, with examples.
  • final_success_rate: the share of episodes whose task success holds at their last step.
  • action_rotation_error: how far the commanded target rotations are from valid rotations.
  • A metric declared with baseline=True is also computed on the source dataset's valid episodes.
  • Docs: the metrics page lists the checks, generated from their @check declarations.

Testing

  • Unit tests: 395 passed. One known-answer test per check and per metric.
  • All 11 shipped annotated datasets pass every check.
  • On generated data:
    • Franka MimicGen, 50 demos: 50/50 episodes valid; final success 0.92.
    • GR1 with cameras: 4/4 episodes valid; image checks pass.
  • End-to-end tests: MimicGen and SkillGen bin pass with their expected metric sets.
  • The docs build passes with -W.

- Episode checks run before any metric: finite values, aligned
  per-step lengths, valid observed rotations, pose actions within
  their clip bound, and camera streams (one frame per step, no black
  frames, no frozen runs). An episode failing a check is counted in
  correctness_pass_rate or image_stream_pass_rate and left out of every
  dataset metric; the report lists the failures per check.
- final_success_rate: share of episodes whose task success holds at
  their last step.
- action_rotation_error: how far the commanded target rotations are
  from valid rotations.
- A metric declared with baseline=True is also computed on the source
  dataset, using the run's autodata entry and control step.
- Docs: the metrics page lists the checks, generated from their
  @check declarations.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

…ble code

- No baseline metric reads the run's autodata entry or control step,
  so the source dataset is evaluated as it is.
- One parser of the @Metric and @check declarations builds both docs
  tables.
- Episode.datasets returns a list; the module constants sit together.

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