change obs and action to dict - #95
Open
jxx123 wants to merge 5 commits into
Open
Conversation
…ollouts
Add an optional `env_seeds` param threaded through T1DSimVectorEnv ->
T1DPatientBatch, CGMSensorBatch, and BatchScenario. When provided, each
env draws its meals, sensor noise, and initial BG from its OWN RNG seeded
by env_seeds[i], so:
- envs sharing a seed are bit-identical (meals + noise + init BG),
- a rollout is a pure function of its per-env seed (reproducible across
runs and across in-place reset()),
- envs with different seeds diverge as before.
This makes the vectorized env safe for group-based RL (e.g. GRPO/RLOO):
a group of copies can share one seed so trajectories differ ONLY by the
policy's actions. Default (env_seeds=None) keeps the original fast
single-RNG behavior unchanged.
Verified: same-seed group -> identical BG+CGM; different seeds -> divergent;
reset-in-place reproduces; auto_reset=False freezes terminated envs.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VRhVcpNkjACm3KMGjPjLjx
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.
No description provided.