Repository navigation
Conversation
…ndary LedgerEnv records what each environment took and gave; LedgerVectorEnv (Gymnasium, NextStep and SameStep autoreset) and LedgerVecEnv (Stable-Baselines3) record what the trainer sent and received; compare / `stepledger compare` finds the first difference per env and names the episode, step and field. Values are cast to the declared spaces and hashed; rewards are kept as exact bits. Tests cover clean sync and async runs and five injected faults (float16 observation, stale reward, time limit sent as termination, changed action, skipped step); CI runs them with SB3 and both examples.
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.
The package
stepledger(distribution nameplugrl-stepledger; the PyPI namestepledgerbelongs to an unrelated project).LedgerEnv: env side, outermost wrapper in the environment's own process.LedgerVectorEnv: trainer side for Gymnasium vector envs (NextStep and SameStep autoreset; Disabled refused).stepledger.sb3.LedgerVecEnv: trainer side for Stable-Baselines3 (DummyVecEnv,SubprocVecEnv).compareandstepledger compare ENV_DIR TRAINER_FILE: exit 0 when clean, 1 on a difference, 2 when it cannot compare.Tests: 58 pass locally without SB3 (67 with SB3's vec_env modules); CI installs CPU torch and SB3 and also runs both examples, checking that the injected fault is reported. Cost on 16 Pendulum envs: about 5 us per env step on the env side and 4 us on the trainer side; about 20 bytes per event on disk.
The repository is private. Make it public when you want to announce it.