Skip to content

Commit

Permalink
Merge pull request #27 from airboxlab/deps-upgrade
Browse files Browse the repository at this point in the history
bump deps
  • Loading branch information
antoine-galataud committed May 21, 2024
2 parents c00ded2 + 08585d2 commit ead2bc6
Show file tree
Hide file tree
Showing 7 changed files with 2,384 additions and 2,049 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ jobs:
timeout-minutes: 5
steps:
- name: Checkout repo
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Poetry
uses: abatilo/actions-poetry@v2.0.0
with:
poetry-version: "1.5.1"

- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.10"
cache: "poetry"
Expand Down
2,449 changes: 1,353 additions & 1,096 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "rl-energyplus"
version = "0.7.0"
version = "0.8.0"
description = "EnergyPlus Gym Environments for Reinforcement Learning"
authors = ["Antoine Galataud <antoine@foobot.io>"]
packages = [
Expand All @@ -13,7 +13,7 @@ priority = "primary"

[tool.poetry.dependencies]
python = ">=3.8,<3.12"
ray = { version = "2.8.0", extras = ["default", "rllib"] }
ray = { version = "2.12.0", extras = ["default", "rllib"] }
gymnasium = "0.28.1"
numpy = "1.23.5"
protobuf = "3.20.3"
Expand Down
1,959 changes: 1,021 additions & 938 deletions requirements.txt

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion rleplus/train/pearl.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
from pearl.history_summarization_modules.lstm_history_summarization_module import (
LSTMHistorySummarizationModule,
)
from pearl.neural_networks.common.value_networks import EnsembleQValueNetwork
from pearl.neural_networks.sequential_decision_making.q_value_networks import (
EnsembleQValueNetwork,
)
from pearl.pearl_agent import PearlAgent
from pearl.policy_learners.sequential_decision_making.bootstrapped_dqn import (
BootstrappedDQN,
Expand Down
12 changes: 3 additions & 9 deletions rleplus/train/rllib.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def parse_args() -> argparse.Namespace:
)
parser.add_argument(
"--output",
help="EnergyPlus output directory. Default is a generated one in /tmp/",
help="EnergyPlus output directory. Default is a generated one in ~/ray_results/",
required=False,
default=TemporaryDirectory().name,
)
Expand All @@ -47,16 +47,10 @@ def parse_args() -> argparse.Namespace:
default=0,
help="The number of GPUs to use",
)
parser.add_argument(
"--alg",
default="PPO",
choices=["APEX", "DQN", "IMPALA", "PPO", "R2D2"],
help="The algorithm to use",
)
parser.add_argument(
"--use-lstm",
action="store_true",
help="Whether to auto-wrap the model with an LSTM. Only valid option for " "--run=[IMPALA|PPO|R2D2]",
help="Whether to auto-wrap the model with an LSTM",
)
built_args = parser.parse_args()
print(f"Running with following CLI args: {built_args}")
Expand Down Expand Up @@ -90,8 +84,8 @@ def main():
"use_lstm": args.use_lstm,
"vf_share_layers": False,
},
_enable_learner_api=True,
)
.experimental(_enable_new_api_stack=True)
.rl_module(_enable_rl_module_api=True)
.framework(
# to use tensorflow, you'll need install it first,
Expand Down
1 change: 0 additions & 1 deletion tests/test_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ def test_ray_runner_config(self):
self.assertEqual(args.timesteps, 1e6)
self.assertEqual(args.num_workers, 2)
self.assertEqual(args.num_gpus, 0)
self.assertEqual(args.alg, "PPO")
self.assertFalse(args.use_lstm)

0 comments on commit ead2bc6

Please sign in to comment.