Skip to content

Greptile fix on #28: render different maps per iteration#34

Open
smrifaki wants to merge 1 commit intomohit/fix-renderfrom
mrifaki/fix_render_pr28_greptile
Open

Greptile fix on #28: render different maps per iteration#34
smrifaki wants to merge 1 commit intomohit/fix-renderfrom
mrifaki/fix_render_pr28_greptile

Conversation

@smrifaki
Copy link
Copy Markdown
Member

Summary

Greptile bot flagged on #28: the `for map_idx in range(num_maps)` loop in `render_human_replay_videos` (pufferlib/utils.py:514) reused the same `cmd` every iteration, so it rendered the same map every time instead of different maps.

Fix

Move the cmd out of the loop as `base_cmd`, then append `--map-name` per iteration that cycles through `map_NNN.bin` in the training dir. Tries both 0-indexed (`map_000.bin`) and 1-indexed (`map_001.bin`) naming patterns to handle the dataset-naming inconsistency that PR #29 also touched (cf. PR #29 Greptile comment).

Test plan

  • Run human-replay rendering loop with num_maps=3 and verify three different maps appear in output videos
  • Confirm fallback to map_001.bin works when map_000.bin missing
  • Confirm graceful skip + log when neither map exists

Notes

Greptile suggestion on PR #28: the loop reused the same cmd every iteration
so it rendered the same map repeatedly. Add --map-name per iteration that
cycles through map_NNN.bin in the training dir. Tries both 0-indexed and
1-indexed naming patterns to match different dataset conventions.
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.

2 participants