-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feat/mpe_wrapper
- Loading branch information
Showing
35 changed files
with
2,978 additions
and
59 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defaults: | ||
- logger: logger | ||
- arch: anakin | ||
- system: sable/ff_sable | ||
- network: ff_retention | ||
- env: rware # [cleaner, connector, gigastep, lbf, rware, smax] | ||
- _self_ | ||
|
||
hydra: | ||
searchpath: | ||
- file://mava/configs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
defaults: | ||
- logger: logger | ||
- arch: anakin | ||
- system: sable/rec_sable | ||
- network: rec_retention | ||
- env: rware # [cleaner, connector, gigastep, lbf, rware, smax] | ||
- _self_ | ||
|
||
hydra: | ||
searchpath: | ||
- file://mava/configs |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# ---Environment Configs--- | ||
defaults: | ||
- _self_ | ||
- scenario: con-5x5x3a # [con-5x5x3a, con-7x7x5a, con-10x10x10a, con-15x15x23a] | ||
# Further environment config details in "con-10x10x5a" file. | ||
|
||
env_name: VectorMaConnector # Used for logging purposes. | ||
|
||
# Defines the metric that will be used to evaluate the performance of the agent. | ||
# This metric is returned at the end of an experiment and can be used for hyperparameter tuning. | ||
eval_metric: episode_return | ||
|
||
# Whether the environment observations encode implicit agent IDs. If True, the AgentID wrapper is not used. | ||
# This is false since the vector observation wrapper for connector cannot encode Agent IDs by default. | ||
implicit_agent_id: False | ||
# Whether or not to log the winrate of this environment. This should not be changed as not all | ||
# environments have a winrate metric. | ||
log_win_rate: False | ||
|
||
kwargs: | ||
{} # time limit set in scenario |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# --- Retention for ff-Sable --- | ||
net_config: | ||
n_block: 1 # Number of blocks | ||
embed_dim: 64 # Embedding dimension | ||
n_head: 1 # Number of heads | ||
|
||
memory_config: | ||
type: "ff_sable" # Type of the network. | ||
agents_chunk_size: ~ # Size of the chunk: calculated over agents dim. This directly sets the sequence length for chunkwise retention | ||
# If unspecified, the number of agents is used as the chunk size which means that we calculate full self-retention over all agents. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# --- Retention for Memory Sable --- | ||
net_config: | ||
n_block: 1 # Number of blocks | ||
embed_dim: 64 # Embedding dimension | ||
n_head: 1 # Number of heads | ||
|
||
memory_config: | ||
type: "rec_sable" # Type of the network. | ||
# --- Memory factor --- | ||
decay_scaling_factor: 0.8 # Decay scaling factor for the kappa parameter: kappa = kappa * decay_scaling_factor | ||
# --- Positional encoding --- | ||
timestep_positional_encoding: False # Timestamp positional encoding for Sable memory. | ||
# --- Chunking --- | ||
timestep_chunk_size: ~ # Size of the chunk: calculated over timesteps dim. | ||
# For example a chunksize of 2 results in a sequence length of 2 * num_agents because there num_agents observations within a timestep | ||
# If unspecified, the rollout length is used as the chunk size which means that the entire rollout is computed in parallel during training. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# --- Defaults ff-Sable --- | ||
|
||
total_timesteps: ~ # Set the total environment steps. | ||
# If unspecified, it's derived from num_updates; otherwise, num_updates adjusts based on this value. | ||
num_updates: 1000 # Number of updates | ||
seed: 42 | ||
|
||
# --- Agent observations --- | ||
add_agent_id: True | ||
|
||
# --- RL hyperparameters --- | ||
actor_lr: 2.5e-4 # Learning rate for Sable network. | ||
update_batch_size: 2 # Number of vectorised gradient updates per device. | ||
rollout_length: 128 # Number of environment steps per vectorised environment. | ||
ppo_epochs: 4 # Number of ppo epochs per training data batch. | ||
num_minibatches: 2 # Number of minibatches per ppo epoch. | ||
gamma: 0.99 # Discounting factor. | ||
gae_lambda: 0.95 # Lambda value for GAE computation. | ||
clip_eps: 0.2 # Clipping value for PPO updates and value function. | ||
ent_coef: 0.01 # Entropy regularisation term for loss function. | ||
vf_coef: 0.5 # Critic weight in | ||
max_grad_norm: 0.5 # Maximum norm of the gradients for a weight update. | ||
decay_learning_rates: False # Whether learning rates should be linearly decayed during training. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# --- Defaults Memory Sable --- | ||
|
||
total_timesteps: ~ # Set the total environment steps. | ||
# If unspecified, it's derived from num_updates; otherwise, num_updates adjusts based on this value. | ||
num_updates: 1000 # Number of updates | ||
seed: 42 | ||
|
||
# --- Agent observations --- | ||
add_agent_id: True | ||
|
||
# --- RL hyperparameters --- | ||
actor_lr: 2.5e-4 # Learning rate for Sable network. | ||
update_batch_size: 2 # Number of vectorised gradient updates per device. | ||
rollout_length: 128 # Number of environment steps per vectorised environment. | ||
ppo_epochs: 4 # Number of ppo epochs per training data batch. | ||
num_minibatches: 2 # Number of minibatches per ppo epoch. | ||
gamma: 0.99 # Discounting factor. | ||
gae_lambda: 0.95 # Lambda value for GAE computation. | ||
clip_eps: 0.2 # Clipping value for PPO updates and value function. | ||
ent_coef: 0.01 # Entropy regularisation term for loss function. | ||
vf_coef: 0.5 # Critic weight in | ||
max_grad_norm: 0.5 # Maximum norm of the gradients for a weight update. | ||
decay_learning_rates: False # Whether learning rates should be linearly decayed during training. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ | |
RecurrentValueNet, | ||
ScannedRNN, | ||
) | ||
from mava.networks.sable_network import SableNetwork |
This file contains 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
Oops, something went wrong.