From 13dce534b6f593b8720192ea6b0dd003d51fa040 Mon Sep 17 00:00:00 2001 From: Dylan Date: Tue, 18 Nov 2025 11:39:21 -0500 Subject: [PATCH] fix: fix off by one bug --- workflow-induction/get_human_trajectory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow-induction/get_human_trajectory.py b/workflow-induction/get_human_trajectory.py index 7146b51..16a38f6 100644 --- a/workflow-induction/get_human_trajectory.py +++ b/workflow-induction/get_human_trajectory.py @@ -289,7 +289,7 @@ def main(): first_idx = 0 for i, (a, s, t) in enumerate(zip(actions, states, time_list)): if s["before"] is not None and s["after"] is not None: - if states[i+1]["before"] is None or states[i+1]["after"] is None: + if i+1 < len(states) and (states[i+1]["before"] is None or states[i+1]["after"] is None): first_idx = i break actions = actions[first_idx:]