-
Notifications
You must be signed in to change notification settings - Fork 176
Address critical review feedback: fix episode ID initialization, pin dependencies, improve documentation #289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Copilot
wants to merge
3
commits into
nle_env
Choose a base branch
from
copilot/sub-pr-161
base: nle_env
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Closed
…erignore, remove "beefy compute" references Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
…ability Co-authored-by: Darktex <890615+Darktex@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update feedback on NLE environment implementation in OpenEnv
Address critical review feedback: fix episode ID initialization, pin dependencies, improve documentation
Jan 13, 2026
Contributor
|
@greptile |
Contributor
Greptile SummaryThis PR successfully addresses critical feedback from the automated review of PR #161. The changes improve type safety, reproducibility, and code quality:
All changes are focused and appropriate, addressing the specific issues identified without introducing unnecessary modifications. Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client as NLEEnv Client
participant Server as FastAPI Server
participant Env as NLEEnvironment
participant NLE as NLE Gym Env
Note over Client,NLE: Episode Initialization
Client->>Server: POST /reset
Server->>Env: reset()
Env->>Env: _generate_episode_id()
Note over Env: Initialize _episode_id in __init__<br/>and regenerate on reset()
Env->>NLE: reset()
NLE-->>Env: gym_obs (dict or tuple)
Env->>Env: _convert_observation(gym_obs)
Note over Env: Convert numpy arrays to lists<br/>for JSON serialization
Env-->>Server: NLEObservation
Server-->>Client: JSON response
Note over Client,NLE: Action Execution
Client->>Server: POST /step {action_id: 0}
Server->>Env: step(NLEAction)
Env->>NLE: step(action_id)
NLE-->>Env: (obs, reward, done, info) or<br/>(obs, reward, terminated, truncated, info)
Note over Env: Handle both gym 0.25<br/>and 0.26+ API formats
Env->>Env: Update _step_count, _last_reward, etc.
Env->>Env: _convert_observation(gym_obs)
Env-->>Server: NLEObservation
Server-->>Client: JSON response
Note over Client,NLE: State Query
Client->>Server: GET /state
Server->>Env: state property
Env-->>Server: NLEState
Server-->>Client: JSON response
|
zkwentz
approved these changes
Jan 21, 2026
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.
Addresses automated review feedback on PR #161 identifying type safety, reproducibility, and security issues in the NLE environment implementation.
Critical Fixes
Episode ID initialization
_episode_idin__init__instead of waiting forreset()Nonevalues ifstateproperty accessed before first reset_generate_episode_id()to eliminate duplicationDependency pinning
gym==0.26.2in Dockerfile for API compatibilityreset()returns obs) and new API (reset()returns tuple)Docker build security
.dockerignoreto exclude.git/,venv/,__pycache__, test files from build contextDocumentation & Code Quality
NLEObservationfields are optional (configurable observation space)Note on Generic Types
Review flagged missing generic type parameters on
Environmentclass. Investigation shows baseEnvironmentclass is not generic and no existing environments use generics—appears to be review misunderstanding rather than actual invariant.💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.