Merged
Conversation
Greptile SummaryRefactored human evaluation scripts to use the shared Key changes:
Issues found:
Confidence Score: 2/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[evaluate_human_logs.py main] --> B[Parse args with policy_architecture]
B --> C{Architecture Type?}
C -->|Recurrent| D[Create Recurrent Policy]
C -->|Transformer| E[Create Transformer Policy]
D --> F[Load state_dict]
E --> F
F --> G[Create HumanReplayEvaluator]
G --> H[Loop through num_rollouts]
H --> I[Create fresh env]
I --> J[evaluator.rollout]
J --> K{Architecture?}
K -->|Recurrent| L[Init LSTM state]
K -->|Transformer| M[Init Transformer context]
L --> N[Run simulation steps]
M --> N
N --> O[Collect metrics per scenario]
O --> P[Return aggregated results]
P --> H
H --> Q[Aggregate all rollout results]
Q --> R[Compute first/last scenario metrics]
R --> S[Save JSON output]
Last reviewed commit: 0661e02 |
Comment on lines
+296
to
300
| if __name__ == "__main__": | ||
| main() | ||
|
|
||
| if __name__ == "__main__": | ||
| main() |
There was a problem hiding this comment.
duplicate if __name__ == "__main__" block
Suggested change
| if __name__ == "__main__": | |
| main() | |
| if __name__ == "__main__": | |
| main() |
evaluate_human_logs.py
Outdated
| "control_mode": "control_vehicles", | ||
| "episode_length": scenario_length, | ||
| "report_all_scenarios": args_parsed.adaptive_driving_agent, | ||
| "dynamics_model" : "classic" , |
There was a problem hiding this comment.
duplicate key dynamics_model - already defined at line 150
Suggested change
| "dynamics_model" : "classic" , | |
| "dynamics_model": args_parsed.dynamics_model, |
Comment on lines
+677
to
+678
| for scenario in range(k_scenarios): | ||
| for time_idx in range(self.sim_steps): |
There was a problem hiding this comment.
incorrect loop nesting: self.sim_steps is already k_scenarios * scenario_length - init_steps (line 630), so looping through scenarios again multiplies total steps by k_scenarios
Suggested change
| for scenario in range(k_scenarios): | |
| for time_idx in range(self.sim_steps): | |
| # Run through all steps (already accounts for all scenarios) | |
| for time_idx in range(self.sim_steps): |
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.
Refactored human evaluation scripts so uses same evaluator as eval method