feat: AR rollout loss for ForwardDynamicsPredictionObjective#228
Draft
felixmaximilian wants to merge 1 commit into
Draft
feat: AR rollout loss for ForwardDynamicsPredictionObjective#228felixmaximilian wants to merge 1 commit into
felixmaximilian wants to merge 1 commit into
Conversation
- notebooks/ar_sanity_checks.ipynb: rollout error curve (check 1) and PCA feature distribution overlap (check 3), plus cosine similarity. Fully type-annotated; cast objective and annotate metrics to satisfy ty. - forward_dynamics.py: add type guards at top of _ar_losses so ty can narrow Module|None to Module. - .typos.toml: whitelist arange (numpy array-range) and nd abbreviation, both incorrectly flagged by the default typos dictionary. - pyproject.toml: add scikit-learn to train optional deps and DEP002 ignore list; map sklearn module name for deptry; uv.lock updated. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ForwardDynamicsPredictionObjective, mirroring the TF+AR training objective from V-JEPA 2/2.1.feedback_projection: Linear(image_embedding_dim → encoder_embedding_dim)projects each predicted patch independently (preserving spatial structure), concatenated withaction_summaryas one extra context token before being fed back to the foresightCrossAttentionDecoderHead.foresight/cam_front_left/tf,.../ar) with no changes tocontrol_transformer.py.ar_steps: 0(default) orfeedback_projection: nulldisables the loss entirely — no structural change to the loss dict.notebooks/ar_sanity_checks.ipynbwith rollout error curve (check 1) and PCA feature distribution overlap (check 3).Test plan
ar_steps: 1andar_steps: 0tf/armetrics when enabledTensorDict.sum(reduce=True)in both modes🤖 Generated with Claude Code