Add modular agentic env gen e2e runner script#796
Conversation
Greptile SummaryThis PR adds a modular end-to-end runner script for agentic environment generation, supporting three modes (
Confidence Score: 5/5The changes are additive (new runner script + utility extraction) with no modifications to existing business logic; the refactoring of safe_filename_stem is mechanical and covered by tests. All changed paths are either new files or straightforward deduplication. The runner script is a well-structured orchestration layer with no shared state mutations. Prior review concerns about torch import placement and the duplicate utility function have both been addressed. No existing functionality is altered. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[main CLI entry] --> B{--mode}
B -->|resolve| C[generate_env_intent_spec\nLLM API call]
B -->|build| D{--linked_env_graph_spec_yaml\nprovided?}
B -->|full| E[SimulationAppContext]
C --> C1[compile_env_intent_spec\nIntentCompiler]
C1 --> C2[link_env_graph_spec\ninitial.link]
C2 --> C3[write_env_graph_specs\ninitial.yaml + linked.yaml]
C3 --> Z[return 0]
D -->|assert: not None & is_file| F[SimulationAppContext]
D -->|missing| ERR[AssertionError]
F --> G[build_env_from_linked_env_graph_spec\nArenaEnvGraphSpec.from_yaml]
G --> H[run_zero_action_policy\ntorch inference loop N steps]
H --> I[env.close]
I --> Z
E --> EL[resolve_env_spec steps 1-4]
EL --> EG[build_env_from_linked_env_graph_spec]
EG --> EH[run_zero_action_policy]
EH --> EI[env.close]
EI --> Z
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[main CLI entry] --> B{--mode}
B -->|resolve| C[generate_env_intent_spec\nLLM API call]
B -->|build| D{--linked_env_graph_spec_yaml\nprovided?}
B -->|full| E[SimulationAppContext]
C --> C1[compile_env_intent_spec\nIntentCompiler]
C1 --> C2[link_env_graph_spec\ninitial.link]
C2 --> C3[write_env_graph_specs\ninitial.yaml + linked.yaml]
C3 --> Z[return 0]
D -->|assert: not None & is_file| F[SimulationAppContext]
D -->|missing| ERR[AssertionError]
F --> G[build_env_from_linked_env_graph_spec\nArenaEnvGraphSpec.from_yaml]
G --> H[run_zero_action_policy\ntorch inference loop N steps]
H --> I[env.close]
I --> Z
E --> EL[resolve_env_spec steps 1-4]
EL --> EG[build_env_from_linked_env_graph_spec]
EG --> EH[run_zero_action_policy]
EH --> EI[env.close]
EI --> Z
Reviews (2): Last reviewed commit: "refactor" | Re-trigger Greptile |
qianl-nv
left a comment
There was a problem hiding this comment.
LGTM. thanks for the change and refactoring the common util!
Summary
Add modular agentic env gen e2e runner script. Use lazy import in each step to make it usable by others.
Detailed description