Repository navigation
feat: integrate TALES: Text Adventure Learning Environment Suite - #1556
Conversation
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
Signed-off-by: Christopher Z. Cui <[email protected]>
…id being mistaken as a secret Signed-off-by: Christopher Z. Cui <[email protected]>
…ing secret checker Signed-off-by: Christopher Z. Cui <[email protected]>
…omehow Signed-off-by: Christopher Z. Cui <[email protected]>
…d in pull request Signed-off-by: Christopher Zhang Cui <[email protected]>
Signed-off-by: Christopher Zhang Cui <[email protected]>
…ating README Signed-off-by: Christopher Zhang Cui <[email protected]>
# Conflicts: # README.md # responses_api_models/vllm_model/configs/vllm_model.yaml
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
|
/claude review |
There was a problem hiding this comment.
HOLD — one blocker, two risks
Verdict: HOLD until the close_session override is added. The other two risks are worth discussing before merge.
Summary
New TALES resources server wrapping five text-adventure frameworks via the GymnasiumServer base class. Clean structure, good test coverage of the core step/reset/truncation flow, example rollouts included. Three findings, one of which is a resource leak that will bite at scale.
Findings
| # | Grade | Finding | Location |
|---|---|---|---|
| 1 | BLOCKER | close_session not overridden — env objects (incl. JVM processes for scienceworld/textworld_express) leak on every completed episode |
app.py:51-53 |
| 2 | RISK | Sync env.reset() / env.step() block the async event loop; Java-backed frameworks do IPC through py4j |
app.py:89-90, 113 |
| 3 | RISK | 4-tuple unpack from env.step() assumes old-style Gymnasium API; fragile if tale-suite updates |
app.py:113 |
| 4 | NOTE | Python default framework="alfworld" diverges from YAML default framework: textworld |
app.py:31 |
Finding 1 has a one-line fix (override close_session to call the existing _close_env). Findings 2-3 are risk-grade — merge-able as a deliberate decision, but both have clean fixes.
Tests are solid for the logic they cover. Consider adding a test that verifies close_session is called and the env is cleaned up after a terminated/truncated episode — the base GymnasiumServer test suite has test_close_session_override_invoked as a template.
Signed-off-by: Christian Munley <[email protected]>
|
/claude review |
There was a problem hiding this comment.
SHIP WITH CARE
Clean integration of a gymnasium-style resources server. Follows established patterns (GymnasiumServer base class, 4-tuple step return matching grl_sokoban/grl_tetris/aviary), good test coverage across the session lifecycle (reset, step, truncation, termination, concurrent sessions, admissible command gating). Reward delta logic for textworld is tested and correct.
Three findings, none blocking:
| # | Grade | Summary |
|---|---|---|
| 1 | RISK | _close_env calls env.close() synchronously — blocks the event loop for Java-backed frameworks (scienceworld, textworld_express). reset() and step() correctly use asyncio.to_thread but cleanup does not. |
| 2 | NOTE | README says branch tt_split, requirements.txt pins @train_test_splits. One is wrong. |
| 3 | NOTE | framework from user metadata goes straight to importlib.import_module — not exploitable due to tales. prefix, but a 5-element whitelist gives better error messages on typos and is cheap defense-in-depth. |
No concerns with reward computation correctness, async patterns, API compatibility, or dependency hygiene. The server has its own requirements.txt with isolated venv per the gym env test convention. Config defaults live in YAML where they belong.
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Integrates TALES: Text-Adventure Learning Environment Suite
https://microsoft.github.io/tale-suite/
Includes text-based games from the following frameworks: Jericho, TextWorld, TextWorld-Express, ScienceWorld, ALFWorld).
Updates #874 to use the Nemo Gym gymnasium environment interface, merge to main, and shorten the additional docs and scripts.