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).
jax-agent-trainingBuild and debug public single-agent skrl 2.1.0 reinforcement-learning workflows with JAX, Flax, Optax, JAX models, memories, resources, agents, trainers, checkpoints, and evaluation.
Independent GitHub snapshot · Automated classification · Original documentation governs
Use this branch when the requested workflow is a single-agent skrl 2.1.0 workflow backed by JAX/Flax/Optax: A2C, CEM, DDPG, DDQN, DQN, PPO, RPO, SAC, or TD3. It covers model definition, parameter/state initialization, JAX resources and trainer composition, device and PRNG choices, and the boundary between training, checkpointing, and evaluation.
jaxlib build and the available
jax.devices() determine the usable accelerator.wrap_env, use
environment integration. This skill
assumes the environment is already wrapped and exposes the relevant spaces
and device.For a normal single-agent build, keep this order:
skrl[jax]. The
package extra supplies JAX, JAXLIB, Flax, and Optax requirements, but the
public installation guidance warns that installing JAX first avoids
accidentally retaining its CPU build.observation_space, optional state_space,
action_space, num_envs, and device from that wrapper.Mixin, Model classes. Call Model.__init__ before
the mixin constructor; give every custom constructor argument a default.
Implement Flax __call__(inputs, role) and return (output, {}) or
(output, extra_outputs).model.init_state_dict(role=<agent-model-key>) for every model
before constructing or using the agent. If needed, pass explicit sampled
inputs and a JAX PRNG key; otherwise initialization samples each
declared space using the model device and config.jax.key.RandomMemory for rollouts or replay data when the algorithm needs
memory. Instantiate the algorithm's *_CFG, set experiment/resource fields,
and construct the JAX agent with the exact model dictionary keys.SequentialTrainer for the ordinary loop or StepTrainer when
the caller owns one-step train/eval iteration. Call the trainer only after
the component/init smoke passes; this branch's bundled script deliberately
does not train.From the generated skill root, run:
python sub-skills/jax-agent-training/scripts/jax_ppo_components.py --help
python sub-skills/jax-agent-training/scripts/jax_ppo_components.py
The helper constructs a small CPU Pendulum PPO stack, initializes Flax state,
creates the JAX memory and PPO agent, initializes a sequential trainer, and
performs one model action/value-shape check. It does not call train() or
eval(), download anything, import a source checkout, create checkpoints, or
write persistent output.
This branch does not own generic framework routing, environment installation or wrapping, Torch/Warp APIs, IPPO/MAPPO, Runner YAML, or external simulator execution. Keep those decisions in the linked sibling/root skills. See the root troubleshooting guide for cross-framework failures and the sibling skills for their own framework or multi-agent contracts.
Claims in this branch are distilled from the public skrl 2.1.0 JAX package APIs, JAX model/agent/resource documentation, the maintained Gymnasium Pendulum PPO construction example, JAX configuration tests, JAX model-instantiator tests, and the installed public signatures. The exact evidence map and unresolved backend limits are recorded in the branch handoff outside this runtime tree.