Skip to content

feat: integrate TALES: Text Adventure Learning Environment Suite - #1556

Merged
cmunley1 merged 39 commits into
mainfrom
cmunley1/tales
Jun 29, 2026
Merged

cmunley1 merged 39 commits into
mainfrom
cmunley1/tales

Conversation

@cmunley1

@cmunley1 cmunley1 commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

christopherzc and others added 21 commits October 20, 2025 05:09
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]>
…d in pull request

Signed-off-by: Christopher Zhang Cui <[email protected]>
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]>
@copy-pr-bot

copy-pr-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Signed-off-by: Christian Munley <[email protected]>
cmunley1 added 3 commits June 10, 2026 02:09
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
Signed-off-by: Christian Munley <[email protected]>
@cmunley1 cmunley1 changed the title feat: TALES environment feat: TALES environments Jun 10, 2026
@cmunley1
cmunley1 marked this pull request as ready for review June 10, 2026 09:32
Signed-off-by: Christian Munley <[email protected]>
@cmunley1 cmunley1 changed the title feat: TALES environments feat: Microsoft TALES environments Jun 10, 2026
cmunley1 added 5 commits June 10, 2026 02:44
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]>
@cmunley1 cmunley1 changed the title feat: Microsoft TALES environments feat: integrate TALES: Text Adventure Learning Environment Suite Jun 10, 2026
@cmunley1

Copy link
Copy Markdown
Contributor Author

/claude review

Comment thread resources_servers/tales/app.py Resolved
Comment thread resources_servers/tales/app.py Resolved
Comment thread resources_servers/tales/app.py Resolved
Comment thread resources_servers/tales/app.py Resolved

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]>
@cmunley1

Copy link
Copy Markdown
Contributor Author

/claude review

Comment thread resources_servers/tales/app.py Resolved
Comment thread resources_servers/tales/README.md Resolved
Comment thread resources_servers/tales/app.py Resolved

@claude claude Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@cmunley1
cmunley1 enabled auto-merge (squash) June 29, 2026 14:54
@cmunley1
cmunley1 disabled auto-merge June 29, 2026 15:38
@cmunley1
cmunley1 merged commit cd1b458 into main Jun 29, 2026
9 checks passed
@cmunley1
cmunley1 deleted the cmunley1/tales branch June 29, 2026 15:39
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