Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/EMI-Group/evorl
/ functions
Functions
1,203 in github.com/EMI-Group/evorl
⨍
Functions
1,203
◇
Types & classes
249
↳
Endpoints
1
↓ 384 callers
Method
replace
(self, **d)
evorl/types.py:131
↓ 74 callers
Method
write
Write data to the recorder.
evorl/recorders/recorder.py:15
↓ 68 callers
Method
to_local_dict
Convert the dataclass to native python structures recursively. The data in the metric object will be converted to local data types: list, tup
evorl/metrics.py:51
↓ 63 callers
Function
create_env
Unified env creator. Args: env_cfg: The environment configuration. **kwargs: Additional keyword arguments for the environment cre
evorl/envs/__init__.py:11
↓ 59 callers
Method
sample
(self, key: chex.PRNGKey)
evorl/envs/space.py:46
↓ 38 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/algorithms/ec/ec_agent.py:49
↓ 36 callers
Function
pytree_field
Define a pytree field in our dataclass. Args: static: Setting to False will mark the field as static for pytree, where changing data in t
evorl/types.py:155
↓ 35 callers
Method
all_reduce
(self, dp_axis_name: str | None = None)
evorl/metrics.py:37
↓ 35 callers
Method
reshape
(self, shape: Sequence[int])
evorl/types.py:61
↓ 35 callers
Method
update
(self, e=None, **f)
evorl/types.py:117
↓ 34 callers
Function
psum
(x, axis_name: str | None = None)
evorl/distributed/comm.py:17
↓ 33 callers
Function
tree_get
Get the elements of each array in the pytree.
evorl/utils/jax_utils.py:117
↓ 31 callers
Method
concatenate
(self, *others: chex.ArrayTree, axis: int = 0)
evorl/types.py:70
↓ 28 callers
Function
agent_gradient_update
( loss_fn: Callable[..., float], optimizer: optax.GradientTransformation, dp_axis_name: str | None
evorl/distributed/gradients.py:69
↓ 27 callers
Function
rollout
Collect trajectories with length of `rollout_length`. This method is a general rollout method used for collecting trajectories from a vectorized
evorl/rollout.py:91
↓ 24 callers
Function
get_1d_array_statistics
Get raw value and statistics of a 1D array. Helper function for logging in WandB. Args: data: 1D numpy array. If data has multiple d
evorl/recorders/wandb_recorder.py:55
↓ 24 callers
Method
save
(self, step, items, **kwargs)
evorl/utils/orbax_utils.py:132
↓ 24 callers
Function
soft_target_update
Perform soft update on target network. Args: target_params: Target network parameters. source_params: Source network parameters.
evorl/utils/rl_toolkits.py:168
↓ 24 callers
Function
tree_stop_gradient
Pytree version of `jax.lax.stop_gradient`.
evorl/utils/jax_utils.py:102
↓ 21 callers
Method
add
( self, buffer_state: ReplayBufferState, xs: chex.ArrayTree, mask: chex.Array
evorl/replay_buffers/replay_buffer.py:122
↓ 21 callers
Function
add_prefix
Add prefix to the keys of a dictionary.
evorl/recorders/wandb_recorder.py:50
↓ 21 callers
Function
get_tanh_norm_dist
Get a tanh transformed normal distribution.
evorl/distribution.py:15
↓ 20 callers
Function
flatten_rollout_trajectory
Flatten the trajectory from [T, B, ...] to [T*B, ...].
evorl/utils/rl_toolkits.py:186
↓ 18 callers
Function
scan_and_mean
Scan with mean aggregation. Usage: same like `jax.lax.scan`, but the scan results will be averaged.
evorl/utils/jax_utils.py:157
↓ 17 callers
Function
get_categorical_dist
Get a categorical distribution.
evorl/distribution.py:10
↓ 17 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
tests/utils.py:107
↓ 15 callers
Function
clean_trajectory
Clean the trajectory to make it suitable for the replay buffer.
evorl/algorithms/offpolicy_utils.py:262
↓ 15 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/algorithms/contrib/td3_v3.py:66
↓ 13 callers
Method
log_prob
(self, event)
evorl/distribution.py:84
↓ 13 callers
Function
make_policy_network
Creates a policy network.
evorl/networks/linear.py:148
↓ 13 callers
Function
rng_split
Unified Version of `jax.random.split` for both single key and batched keys.
evorl/utils/jax_utils.py:239
↓ 13 callers
Function
skip_replay_buffer_state
Utility function to remove replay_buffer_state from state. Usually used when saving the off-policy workflow state to disk.
evorl/algorithms/offpolicy_utils.py:254
↓ 12 callers
Function
cemrl_replace_td3_actor_params
( agent_state: AgentState, pop_actor_params: TD3NetworkParams )
evorl/algorithms/erl/cemrl_td3/cemrl_td3_workflow.py:112
↓ 11 callers
Method
entropy
(self, seed=None)
evorl/distribution.py:101
↓ 11 callers
Method
evaluate
(self, state: State)
evorl/algorithms/contrib/pop_td3.py:424
↓ 11 callers
Function
shmap_vmap
Vmap on different gpu.
evorl/distributed/sharding.py:14
↓ 10 callers
Function
compute_discount_return
Compute discount return from the episodic trajectory. Args: rewards: Rewards collected from an episodic trajectory. dones: Dones
evorl/utils/rl_toolkits.py:29
↓ 10 callers
Function
metric_field
Define a metric field in `MetricBase`. Args: reduce_fn: A function to reduce the metric value across different devices. For example, `jax
evorl/metrics.py:13
↓ 10 callers
Function
tree_set
Set part of each array in the pytree. A Pytree version of `src[idx_or_slice]=target`. Args: src: The source pytree. target:
evorl/utils/jax_utils.py:122
↓ 9 callers
Function
create_wrapped_brax_env
Create wrapped Brax environment for training. Args: env_name: Environment name. episode_length: Max episode length. paral
evorl/envs/brax.py:106
↓ 9 callers
Function
make_deterministic_ec_agent
( action_space: Space, actor_hidden_layer_sizes: tuple[int] = (256, 256), use_bias: bool = True,
evorl/algorithms/ec/ec_agent.py:199
↓ 9 callers
Method
reset
Reset the environment to initial state.
evorl/envs/env.py:49
↓ 8 callers
Method
_has_wrapper
(self, env, cls)
tests/test_mjx_env.py:202
↓ 8 callers
Method
ask
Generate new candidate solutions.
evorl/algorithms/meta/pbt_openes/param_openes.py:57
↓ 8 callers
Function
has_wrapper
(env, wrapper_cls)
tests/test_brax_env.py:17
↓ 8 callers
Function
init_fn
(key)
tests/test_ec_operator.py:12
↓ 8 callers
Function
init_obs_preprocessor
(agent_state, config, key, dp_axis_name=None)
evorl/algorithms/ec/obs_utils.py:31
↓ 8 callers
Function
make_mlp_td3_agent
( action_space: Space, norm_layer_type: str = "none", critic_hidden_layer_sizes: tuple[int] = (256
evorl/algorithms/contrib/td3_v3.py:131
↓ 8 callers
Method
reset
(self, key)
tests/utils.py:26
↓ 8 callers
Function
scan_and_last
Scan and return last iteration results. Usage: same like `jax.lax.scan`, but return the last scan iteration results.
evorl/utils/jax_utils.py:166
↓ 8 callers
Method
to_tree
Convert the flatten params to the original params. Args: x: The flatten params. Returns: The original params
evorl/utils/ec_utils.py:46
↓ 8 callers
Function
weight_sum
Weighted sum. Args: x: (n, ...) w: (n,)
evorl/ec/optimizers/utils.py:24
↓ 7 callers
Function
_test
(rewards, dones, max_length)
tests/test_evaluator.py:152
↓ 7 callers
Method
build_from_config
Build the workflow instance from the config. This is the public API to call for instantiating a new workflow object from config. Normally, it
evorl/workflows/workflow.py:61
↓ 7 callers
Function
create_wrapped_mujoco_playground_env
Create wrapped Brax environment for training. Args: env_name: Environment name. episode_length: Max episode length. paral
evorl/envs/mujoco_playground.py:139
↓ 7 callers
Function
erl_replace_td3_actor_params
( agent_state: AgentState, pop_actor_params: TD3NetworkParams )
evorl/algorithms/erl/erl_td3/erl_td3_workflow.py:221
↓ 7 callers
Function
log_uniform_init
Random sample from log space. Suitable for hyperparameters that need explore different magnitudes in positive range. eg: [1e-3, 100].
evorl/algorithms/meta/pbt_utils.py:51
↓ 7 callers
Method
mode
(self)
evorl/distribution.py:98
↓ 7 callers
Method
reset
Reset the vmapped env. Args: key: support batched keys [B,2] or single key [2]
evorl/envs/wrappers/training_wrapper.py:146
↓ 7 callers
Function
rng_split_like_tree
Split the key according to the structure of the target pytree.
evorl/utils/jax_utils.py:255
↓ 7 callers
Function
split_key_to_devices
Split the key to each device.
evorl/distributed/comm.py:46
↓ 7 callers
Method
step
(self, state, action)
tests/utils.py:37
↓ 6 callers
Method
_multi_steps
(self, state)
evorl/algorithms/contrib/pop_ppo.py:53
↓ 6 callers
Method
actor_loss
( self, agent_state: AgentState, sample_batch: SampleBatch, key: chex.PRNGKey )
evorl/algorithms/td7.py:396
↓ 6 callers
Function
create_mujoco_playground_env
Create Brax environment. Args: env_name: Environment name. kwargs: Arguments passing into Brax. If you want to use jax backend, s
evorl/envs/mujoco_playground.py:123
↓ 6 callers
Function
gradient_update
Wrapper of the loss function that apply gradient updates. Args: loss_fn: The loss function. (params, ...) -> loss optimizer: The
evorl/distributed/gradients.py:25
↓ 6 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/agent.py:129
↓ 6 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/algorithms/sac.py:67
↓ 6 callers
Function
right_shift_with_padding
Shift the array to the right with padding.
evorl/utils/jax_utils.py:300
↓ 6 callers
Function
sort_dict
(d: dict)
evorl/envs/utils.py:1
↓ 6 callers
Method
tell
( self, state: ECState, fitnesses: chex.Array )
evorl/algorithms/meta/pbt_openes/param_openes.py:85
↓ 5 callers
Method
_ec_rollout
(self, agent_state, replay_buffer_state, key)
evorl/algorithms/erl/erl_td3/erl_td3_workflow.py:140
↓ 5 callers
Function
compute_gae
Calculates the Generalized Advantage Estimation (GAE). Args: rewards: A float32 tensor of shape [T, B] containing rewards generated by
evorl/utils/rl_toolkits.py:66
↓ 5 callers
Method
critic_loss
( self, agent_state: AgentState, sample_batch: SampleBatch, key: chex.PRNGKey )
evorl/algorithms/meta/pbt_sac/param_sac.py:51
↓ 5 callers
Function
make_mlp
Creates an MLP network.
evorl/networks/linear.py:77
↓ 5 callers
Function
make_q_network
Creates a Q network: (obs, action) -> value.
evorl/networks/linear.py:210
↓ 5 callers
Method
step
Take a step in the environment.
evorl/envs/env.py:54
↓ 5 callers
Method
tree_unflatten
(cls, aux_data, children)
evorl/types.py:141
↓ 5 callers
Function
tree_zeros_like
Pytree version of `jnp.zeros_like`.
evorl/utils/jax_utils.py:87
↓ 4 callers
Method
__init__
Initialize the env wrapper. Args: env: the original env num_envs: number of envs to vectorize vmap_step:
evorl/envs/wrappers/training_wrapper.py:134
↓ 4 callers
Method
__init__
(self, env: Env, num_envs: int = 1, vmap_step: bool = False)
evorl/envs/wrappers/ma_training_wrapper.py:75
↓ 4 callers
Method
__init__
(self, **kwargs)
evorl/envs/jaxmarl_envs/mabrax.py:124
↓ 4 callers
Method
__setattr__
(self, name, value)
evorl/types.py:110
↓ 4 callers
Function
_real_discount_return
(rewards, discount)
tests/test_toolkits.py:31
↓ 4 callers
Method
_rl_rollout
(self, agent_state, replay_buffer_state, key)
evorl/algorithms/erl/erl_td3/erl_eda.py:195
↓ 4 callers
Function
_to_jax
(pytree)
evorl/envs/gymnasium.py:20
↓ 4 callers
Function
average_episode_discount_return
Estimate the average episode return from a segmented trajectory. This method does not require the trajectory data from a complete episode.
evorl/utils/rl_toolkits.py:196
↓ 4 callers
Function
avg_l1_norm
Average L1 Norm used in TD7.
evorl/algorithms/td7.py:47
↓ 4 callers
Method
close
Close the workflow's components.
evorl/workflows/workflow.py:91
↓ 4 callers
Function
compute_episode_length
Compute the length of the episode. Args: dones: Dones collected from an episodic trajectory. Returns: Length of the episode.
evorl/utils/rl_toolkits.py:13
↓ 4 callers
Method
evaluate
Evaluate the agent based on its state. Args: agent_state: The state of the agent. key: The PRNG key. num_
evorl/evaluators/evaluator.py:40
↓ 4 callers
Function
flatten_pop_rollout_episode
Flatten the trajectory from [#pop, T, B, ...] to [T, #pop*B, ...].
evorl/utils/rl_toolkits.py:191
↓ 4 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/agent.py:83
↓ 4 callers
Method
init
Initialize the state of the . This is the public API to call for instance state initialization.
evorl/workflows/workflow.py:75
↓ 4 callers
Method
init
( self, obs_space: Space, action_space: Space, key: chex.PRNGKey )
evorl/algorithms/td7.py:181
↓ 4 callers
Function
is_jitted
Detect if a function is wrapped by jit or pmap.
evorl/utils/jax_utils.py:264
↓ 4 callers
Function
make_v_network
Creates a V network: (obs) -> value.
evorl/networks/linear.py:181
↓ 4 callers
Method
pop
(self, k, d=None)
evorl/types.py:123
↓ 4 callers
Method
to_vector
Convert the original params to flatten params. see `jax.flatten_util.ravel_pytree` Args: x: The original params.
evorl/utils/ec_utils.py:26
↓ 3 callers
Function
_assert_obs_batched
Assert obs has correct batch dimensions.
tests/test_mjx_env.py:36
next →
1–100 of 1,203, ranked by callers