Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
vmoens committed Dec 14, 2024
2 parents 4a2d3e5 + 957ec6e commit 89db585
Show file tree
Hide file tree
Showing 54 changed files with 96 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sota-implementations/a2c/a2c_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/a2c/a2c_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import warnings

import hydra
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/a2c/utils_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import numpy as np
import torch.nn
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/a2c/utils_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import numpy as np
import torch.nn
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/bandits/dqn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import argparse

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/cql/cql_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import time
import warnings

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/cql/cql_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/cql/discrete_cql_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/cql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import functools

import torch.nn
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/crossq/crossq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import warnings

import hydra
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/crossq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch
from tensordict.nn import InteractionType, TensorDictModule
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/ddpg/ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/ddpg/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import functools

import torch
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/decision_transformer/dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
The helper functions are coded in the utils.py associated with this script.
"""

from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/decision_transformer/lamb.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# Lamb optimizer directly copied from https://github.com/facebookresearch/online-dt
from __future__ import annotations

import math

import torch
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/decision_transformer/online_dt.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
This is a self-contained example of an Online Decision Transformer training script.
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import time
import warnings

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/decision_transformer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import os
from pathlib import Path

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/discrete_sac/discrete_sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
The helper functions are coded in the utils.py associated with this script.
"""

from __future__ import annotations

import warnings

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/discrete_sac/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import functools
import tempfile
from contextlib import nullcontext
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/dqn/dqn_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
DQN: Reproducing experimental results from Mnih et al. 2015 for the
Deep Q-Learning Algorithm on Atari Environments.
"""
from __future__ import annotations

import tempfile
import warnings

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/dqn/dqn_cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.

from __future__ import annotations

import warnings

import hydra
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/dqn/utils_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch.nn
import torch.optim
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/dqn/utils_cartpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch.nn
import torch.optim
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/dreamer/dreamer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import contextlib
import time

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/dreamer/dreamer_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import functools
import tempfile
from contextlib import nullcontext
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/gail/gail.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
The helper functions for gail are coded in the gail_utils.py and helper functions for ppo in ppo_utils.
"""
from __future__ import annotations

import hydra
import numpy as np
import torch
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/gail/gail_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch.nn as nn
import torch.optim
Expand Down
1 change: 1 addition & 0 deletions sota-implementations/gail/ppo_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch.nn
import torch.optim
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/impala/impala_multi_node_ray.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
This script reproduces the IMPALA Algorithm
results from Espeholt et al. 2018 for the on Atari Environments.
"""
from __future__ import annotations

import hydra
from torchrl._utils import logger as torchrl_logger

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/impala/impala_multi_node_submitit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
This script reproduces the IMPALA Algorithm
results from Espeholt et al. 2018 for the on Atari Environments.
"""
from __future__ import annotations

import hydra
from torchrl._utils import logger as torchrl_logger

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/impala/impala_single_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
This script reproduces the IMPALA Algorithm
results from Espeholt et al. 2018 for the on Atari Environments.
"""
from __future__ import annotations

import hydra
from torchrl._utils import logger as torchrl_logger

Expand Down
1 change: 1 addition & 0 deletions sota-implementations/impala/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import torch.nn
import torch.optim
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/iql/discrete_iql.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/iql/iql_offline.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/iql/iql_online.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
The helper functions are coded in the utils.py associated with this script.
"""
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/iql/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import functools

import torch.nn
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/iql.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/maddpg_iddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/mappo_ippo.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/qmix_vdn.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/sac.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import time

import hydra
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/utils/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

import os

import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/multiagent/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations

from tensordict import unravel_key
from torchrl.envs import Transform

Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/ppo/ppo_atari.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
This script reproduces the Proximal Policy Optimization (PPO) Algorithm
results from Schulman et al. 2017 for the Atari Environments.
"""
from __future__ import annotations

import hydra
from torchrl._utils import logger as torchrl_logger
from torchrl.record import VideoRecorder
Expand Down
2 changes: 2 additions & 0 deletions sota-implementations/ppo/ppo_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
This script reproduces the Proximal Policy Optimization (PPO) Algorithm
results from Schulman et al. 2017 for the on MuJoCo Environments.
"""
from __future__ import annotations

import hydra
from torchrl._utils import logger as torchrl_logger
from torchrl.record import VideoRecorder
Expand Down
Loading

0 comments on commit 89db585

Please sign in to comment.