mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 18:26:11 +00:00
annotate: make full-episode subtask coverage unconditional
Remove the subtask_full_coverage config flag. Stitching subtask spans into a contiguous full-episode cover is now always applied in _generate_subtasks — a sparse / gap-ridden subtask timeline is never desirable for conditioning, so there's no reason to make it optional. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -73,15 +73,12 @@ class PlanConfig:
|
|||||||
# nothing). +1 VLM call/ep.
|
# nothing). +1 VLM call/ep.
|
||||||
subtask_verify: bool = True
|
subtask_verify: bool = True
|
||||||
|
|
||||||
# ``subtask_full_coverage``: deterministic post-step (no VLM call)
|
# NOTE: subtask spans are ALWAYS stitched into a contiguous
|
||||||
# that stitches the surviving subtask spans into a contiguous cover
|
# full-episode cover (first subtask pulled back to t0, gaps closed,
|
||||||
# of the whole episode — first subtask pulled back to t0, each span's
|
# last span extended to t_last) as a deterministic post-step in
|
||||||
# end snapped to the next span's start, last span extended to t_last.
|
# ``_generate_subtasks._stitch_full_coverage``. This is not
|
||||||
# Without it the verify pass (which prunes spans) can leave the
|
# configurable — a sparse / gap-ridden subtask timeline is never
|
||||||
# subtask timeline starting late or full of gaps, so frames fall
|
# desirable for conditioning, so it is unconditional.
|
||||||
# through with no active subtask. On by default; disable only if a
|
|
||||||
# downstream consumer genuinely wants sparse (non-tiling) subtasks.
|
|
||||||
subtask_full_coverage: bool = True
|
|
||||||
|
|
||||||
# When True (and backend supports it, e.g. ``openai``), the ``plan``
|
# When True (and backend supports it, e.g. ``openai``), the ``plan``
|
||||||
# module sends a ``video_url`` block pointing at a per-episode mp4
|
# module sends a ``video_url`` block pointing at a per-episode mp4
|
||||||
|
|||||||
@@ -578,9 +578,10 @@ class PlanSubtasksMemoryModule:
|
|||||||
# The VLM (especially after the verify pass prunes spans) can
|
# The VLM (especially after the verify pass prunes spans) can
|
||||||
# leave the first subtask starting after t0 or leave gaps between
|
# leave the first subtask starting after t0 or leave gaps between
|
||||||
# spans, so the subtask timeline no longer tiles the whole
|
# spans, so the subtask timeline no longer tiles the whole
|
||||||
# episode and frames fall through with no active subtask. Stitch
|
# episode and frames fall through with no active subtask. Always
|
||||||
# the surviving spans into a contiguous cover of [t0, t_last].
|
# stitch the surviving spans into a contiguous cover of
|
||||||
if getattr(self.config, "subtask_full_coverage", True):
|
# [t0, t_last] — there is no scenario where a sparse, gap-ridden
|
||||||
|
# subtask timeline is desirable for conditioning.
|
||||||
cleaned = self._stitch_full_coverage(cleaned, record)
|
cleaned = self._stitch_full_coverage(cleaned, record)
|
||||||
|
|
||||||
return cleaned
|
return cleaned
|
||||||
|
|||||||
Reference in New Issue
Block a user