Repository navigation
refactor: replace flat obs array with structured dict[str, np.ndarray] - #45
Merged
Merged
Conversation
Environments now emit dict obs (e.g. {"actor": ..., "privileged": ...})
instead of concatenating then slicing flat arrays. This eliminates fragile
index alignment across env, config, and wrapper layers.
- NpEnvState.obs: np.ndarray → dict[str, np.ndarray]
- Add obs_groups_spec abstract property to ABEnv/NpEnv
- NpEnv.observation_space computed from obs_groups_spec
- Add flatten_obs_dict utility for downstream consumers
- Delete ObsConfig and actor_indices from all envs
- Update RSL-RL, APPO, off-policy, FastSAC, MLX wrappers
- Update config obs_groups keys to "actor"/"critic"
- Add comprehensive tests (61 new) and testing principle to CLAUDE.md
TATP-233
added a commit
that referenced
this pull request
Mar 17, 2026
…tion Resolve conflicts between: - feat/reward-config-injection: Hydra config system, reward config injection - main (PR #45): obs dict refactor (NpEnvState.obs: ndarray → dict[str, ndarray]) Conflict resolutions: - Use cfg.training.* refs (Hydra) from our branch; obs_groups_spec + flatten_obs_dict from main - Keep KNOWN_TASKS-only locomotion/manipulation_params (our Hydra migration) - Keep Hydra tests; drop tests for deleted config factory functions - fast_sac/runner: pass env_cfg_override (ours) + obs_groups_spec (main) - play_interactive: keep PPOConfig import (ours) + flatten_obs_dict (main) - train_rsl_rl: keep play_rsl_rl(cfg, device) Hydra signature (ours)
TATP-233
added a commit
that referenced
this pull request
May 4, 2026
refactor: replace flat obs array with structured dict[str, np.ndarray]
TATP-233
added a commit
that referenced
this pull request
May 4, 2026
…tion Resolve conflicts between: - feat/reward-config-injection: Hydra config system, reward config injection - main (PR #45): obs dict refactor (NpEnvState.obs: ndarray → dict[str, ndarray]) Conflict resolutions: - Use cfg.training.* refs (Hydra) from our branch; obs_groups_spec + flatten_obs_dict from main - Keep KNOWN_TASKS-only locomotion/manipulation_params (our Hydra migration) - Keep Hydra tests; drop tests for deleted config factory functions - fast_sac/runner: pass env_cfg_override (ours) + obs_groups_spec (main) - play_interactive: keep PPOConfig import (ours) + flatten_obs_dict (main) - train_rsl_rl: keep play_rsl_rl(cfg, device) Hydra signature (ours)
TATP-233
added a commit
that referenced
this pull request
Sep 4, 2026
refactor: replace flat obs array with structured dict[str, np.ndarray]
TATP-233
added a commit
that referenced
this pull request
Sep 4, 2026
…tion Resolve conflicts between: - feat/reward-config-injection: Hydra config system, reward config injection - main (PR #45): obs dict refactor (NpEnvState.obs: ndarray → dict[str, ndarray]) Conflict resolutions: - Use cfg.training.* refs (Hydra) from our branch; obs_groups_spec + flatten_obs_dict from main - Keep KNOWN_TASKS-only locomotion/manipulation_params (our Hydra migration) - Keep Hydra tests; drop tests for deleted config factory functions - fast_sac/runner: pass env_cfg_override (ours) + obs_groups_spec (main) - play_interactive: keep PPOConfig import (ours) + flatten_obs_dict (main) - train_rsl_rl: keep play_rsl_rl(cfg, device) Hydra signature (ours)
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.
Environments now emit dict obs (e.g. {"actor": ..., "privileged": ...}) instead of concatenating then slicing flat arrays. This eliminates fragile index alignment across env, config, and wrapper layers.