Skip to content

Commit

Permalink
Ignore formating config sections
Browse files Browse the repository at this point in the history
  • Loading branch information
Toni-SM committed Nov 4, 2024
1 parent 6ef70fe commit 6942e7c
Show file tree
Hide file tree
Showing 38 changed files with 76 additions and 0 deletions.
2 changes: 2 additions & 0 deletions skrl/agents/jax/a2c/a2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from skrl.resources.schedulers.jax import KLAdaptiveLR


# fmt: off
# [start-config-dict-jax]
A2C_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -56,6 +57,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


def compute_gae(rewards: np.ndarray,
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/cem/cem.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
CEM_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -47,6 +48,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


class CEM(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/ddpg/ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
DDPG_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -58,6 +59,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


# https://jax.readthedocs.io/en/latest/faq.html#strategy-1-jit-compiled-helper-function
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/dqn/ddqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
DDQN_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -57,6 +58,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


# https://jax.readthedocs.io/en/latest/faq.html#strategy-1-jit-compiled-helper-function
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/dqn/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
DQN_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -57,6 +58,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


# https://jax.readthedocs.io/en/latest/faq.html#strategy-1-jit-compiled-helper-function
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/ppo/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from skrl.resources.schedulers.jax import KLAdaptiveLR


# fmt: off
# [start-config-dict-jax]
PPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -63,6 +64,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


def compute_gae(rewards: np.ndarray,
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/rpo/rpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from skrl.resources.schedulers.jax import KLAdaptiveLR


# fmt: off
# [start-config-dict-jax]
RPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -64,6 +65,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


def compute_gae(rewards: np.ndarray,
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/sac/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
SAC_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -57,6 +58,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


# https://jax.readthedocs.io/en/latest/faq.html#strategy-1-jit-compiled-helper-function
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/jax/td3/td3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.optimizers.jax import Adam


# fmt: off
# [start-config-dict-jax]
TD3_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -62,6 +63,7 @@
}
}
# [end-config-dict-jax]
# fmt: on


# https://jax.readthedocs.io/en/latest/faq.html#strategy-1-jit-compiled-helper-function
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/a2c/a2c.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
A2C_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -55,6 +56,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class A2C(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/a2c/a2c_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
A2C_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -55,6 +56,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class A2C_RNN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/amp/amp.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
AMP_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -72,6 +73,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class AMP(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/cem/cem.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
CEM_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -44,6 +45,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class CEM(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/ddpg/ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
DDPG_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -56,6 +57,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class DDPG(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/ddpg/ddpg_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
DDPG_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -56,6 +57,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class DDPG_RNN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/dqn/ddqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
DDQN_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -55,6 +56,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class DDQN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/dqn/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
DQN_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -55,6 +56,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class DQN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/ppo/ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
PPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -64,6 +65,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class PPO(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/ppo/ppo_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
PPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -62,6 +63,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class PPO_RNN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/q_learning/q_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
Q_LEARNING_DEFAULT_CONFIG = {
"discount_factor": 0.99, # discount factor (gamma)
Expand All @@ -34,6 +35,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class Q_LEARNING(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/rpo/rpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
RPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -63,6 +64,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class RPO(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/rpo/rpo_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.resources.schedulers.torch import KLAdaptiveLR


# fmt: off
# [start-config-dict-torch]
RPO_DEFAULT_CONFIG = {
"rollouts": 16, # number of rollouts before updating
Expand Down Expand Up @@ -63,6 +64,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class RPO_RNN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/sac/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
SAC_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -56,6 +57,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class SAC(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/sac/sac_rnn.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
SAC_DEFAULT_CONFIG = {
"gradient_steps": 1, # gradient steps
Expand Down Expand Up @@ -56,6 +57,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class SAC_RNN(Agent):
Expand Down
2 changes: 2 additions & 0 deletions skrl/agents/torch/sarsa/sarsa.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from skrl.models.torch import Model


# fmt: off
# [start-config-dict-torch]
SARSA_DEFAULT_CONFIG = {
"discount_factor": 0.99, # discount factor (gamma)
Expand All @@ -34,6 +35,7 @@
}
}
# [end-config-dict-torch]
# fmt: on


class SARSA(Agent):
Expand Down
Loading

0 comments on commit 6942e7c

Please sign in to comment.