brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
envs-and-transformsBuild, validate, transform, vectorize, and debug TorchRL environments and TensorDict transition layouts.
Independent GitHub snapshot · Automated classification · Original documentation governs
Load this sub-skill when the task involves TorchRL environments, transformed environments, vectorized environments, environment specs, optional simulator wrappers, or the TensorDict transition layout produced by EnvBase.step and consumed by step_mdp.
PendulumEnv and custom EnvBase subclasses.TransformedEnv, Compose, ObservationNorm, StepCounter, ActionScaling, image transforms, reward transforms, action transforms, and key transforms.observation_spec, action_spec, reward_spec, done_spec, input_spec, and output_spec with check_env_specs."next" layout to the next-step root layout with step_mdp.SerialEnv versus ParallelEnv, debugging vectorized worker issues, and validating specs before multiprocessing.modules-and-policies.collectors-and-replay.objectives-and-training.llm-vla-and-services. Generic ActionChunkTransform key semantics are summarized here only to route safely.PendulumEnv or a custom EnvBase for core TorchRL behavior; wrapper classes only when the simulator dependency is installed.check_env_specs(env, ...) offline because it runs a short rollout and may reset seeding state.in_keys, out_keys, in_keys_inv, and out_keys_inv; verify transformed specs and use clone() before reusing a transform already attached to another env.("next", ...) keys, then use step_mdp with the env's reward_keys, done_keys, and action_keys when keys are nested or multi-agent.SerialEnv; move to ParallelEnv only after the same factory passes check_env_specs.step_mdp, vectorization, multi-agent layouts.TransformedEnv, Compose, key routing, normalization, action scaling, and action chunk routing.Run scripts/smoke_env_rollout.py in an environment where torchrl, torch, and tensordict import. From this sub-skill directory:
python scripts/smoke_env_rollout.py --steps 3 --check-specs
From another working directory, pass the actual local path of this sub-skill's scripts/smoke_env_rollout.py copy to Python.
Expected signal: concise success text showing the TorchRL version, rollout batch size, and step_mdp keys. The helper uses only native PendulumEnv, TransformedEnv, StepCounter, check_env_specs, and step_mdp; it does not require Gym, rendering, multiprocessing, or GPUs.