Skip to content

Conversation

@Budalebah
Copy link

Changes

  1. Fixed episode data API off-by-one error (route.ts)

    • Timestep N is stored at line index N+1 (line 0 = header)
    • Added clear comments explaining file structure
  2. Fixed initial timestep calculation (StateServiceHumanSimulator.ts)

    • Changed setInitialTimestep() to start from timestep + 1
    • Added comment explaining the provided timestep represents the last completed state
  3. Removed resolved TODO comment (ZeroStyleApp.tsx)

    • Cleaned up "TODO: inference_human timestep is currently incorrect"

Impact

  • Prevents timestep collision in zero-style training pipeline
  • Ensures correct temporal sequencing for attribution tracking
  • Fixes incorrect training signals caused by duplicate timesteps

Testing

  • ✅ No linter errors
  • ✅ Semantic commit message following project conventions
  • ✅ Code includes explanatory comments
  • ⚠️ Manual testing with actual zero-style simulation recommended

Files Changed

  • web-ui/src/app/api/episode-data/route.ts (+9/-4)
  • web-ui/src/simulation/simulators/StateServiceHumanSimulator.ts (+4/-2)
  • web-ui/src/ZeroStyleApp.tsx (+1/-2)

- Fix off-by-one error in episode data API (timestep N should read line N+1)
- Fix initial timestep in zero-style simulator (start from timestep+1 to avoid collision)
- Remove TODO comment about incorrect inference_human timestep

Fixes issue where human inference timestep was colliding with the last
timestep in the loaded attribution log, causing incorrect training signals.
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