DRAFT: Record per episode metadata and results#806
Closed
alexmillane wants to merge 25 commits into
Closed
Conversation
Record every value drawn by an enabled variation's sampler so downstream sensitivity-analysis tooling has the input factors that produced each episode. This adds a sample-observer layer the recorder builds on: SamplerBase gains add_listener/remove_listener and a sample() template method that notifies listeners around the concrete _sample(); VariationBase gains add_sample_listener/remove_sample_listener, re-binding subscriptions onto the sampler rebuilt by apply_cfg so they survive cfg swaps. ArenaEnvBuilder constructs a VariationRecorder, attaches it after Hydra overrides but before any sampling, and exposes it on env.unwrapped. The recorder is stashed on the builder rather than the env cfg because the configclass __post_init__ deep-copies its attributes, which would orphan the listener closures. Signed-off-by: alex <amillane@nvidia.com>
…riations_recording
…riations_recording
…riations_recording
…e/variations_recording_to_disk_2
…isode data into visualizer, make camera obs recorder use centralized episode idx.
aiguldzh-nvidia
left a comment
Collaborator
There was a problem hiding this comment.
The per-episode recording contains almost all of the data we need. The only thing missing is some job-level metadata, but I don't think that's a blocker, the current approach looks good to me.
| # Request the per-episode results write into this job's output subdir | ||
| # (the same directory the video recorders use), one file per rebuild. | ||
| results_path = os.path.join(video_cfg.video_base_dir, f"episode_results_rebuild{rebuild_idx}.jsonl") | ||
| env.unwrapped.episode_results_recorder.write(results_path) |
Collaborator
There was a problem hiding this comment.
write() is inside the try block, so if it raises (e.g. a permissions error) the except catches it and marks the job as failed, even though the rollout itself completed successfully
Collaborator
Author
|
Superceded by #810 |
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.
Summary
Record per-episode data.
Detailed description
envthat accumulates per-episode data and optionally writes it to disk.IsaacLabManagerBasedRLEnv