-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
training metaenvs (such as time-series envs) from yaml files
- Loading branch information
Showing
9 changed files
with
154 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# stable-baselines3 configuration | ||
|
||
algo: "PPO" | ||
meta_env_id: "TimeSeries-v2" | ||
meta_env_kwargs: {N_mem: 3} | ||
base_env_id: "GreenCrab-v2" | ||
base_env_cfg: {r: 0.5, imm: 2000, problem_scale: 2000, action_reward_scale: 0.5, env_stoch: 0.1} | ||
n_envs: 12 | ||
tensorboard: "/home/rstudio/logs" | ||
total_timesteps: 6000000 | ||
use_sde: True | ||
id: "N_mem_3" | ||
repo: "cboettig/rl-ecology" | ||
save_path: "/home/rstudio/saved_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
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,14 @@ | ||
# stable-baselines3 configuration | ||
|
||
algo: "TQC" | ||
meta_env_id: "TimeSeries-v2" | ||
meta_env_kwargs: {N_mem: 3} | ||
base_env_id: "GreenCrab-v2" | ||
base_env_cfg: {r: 0.5, imm: 2000, problem_scale: 2000, action_reward_scale: 0.5, env_stoch: 0.1} | ||
n_envs: 12 | ||
tensorboard: "/home/rstudio/logs" | ||
total_timesteps: 6000000 | ||
use_sde: True | ||
id: "N_mem_3" | ||
repo: "cboettig/rl-ecology" | ||
save_path: "/home/rstudio/saved_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
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,10 @@ | ||
#!/opt/venv/bin/python | ||
import argparse | ||
parser = argparse.ArgumentParser() | ||
parser.add_argument("-f", "--file", help="Path config file", type=str) | ||
args = parser.parse_args() | ||
|
||
import rl4greencrab | ||
from rl4greencrab import sb3_train_metaenv | ||
|
||
sb3_train_metaenv(args.file) |
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 |
---|---|---|
@@ -1,8 +1,9 @@ | ||
from rl4greencrab.invasive_ipm import invasive_IPM, invasive_IPM_v2 | ||
from rl4greencrab.ts_model import ts_env_v1 | ||
from rl4greencrab.util import sb3_train, sb3_train_v2 | ||
from rl4greencrab.ts_model import ts_env_v1, ts_env_v2 | ||
from rl4greencrab.util import sb3_train, sb3_train_v2, sb3_train_metaenv | ||
|
||
from gymnasium.envs.registration import register | ||
register(id="GreenCrab-v1", entry_point="rl4greencrab.invasive_ipm:invasive_IPM") | ||
register(id="GreenCrab-v2", entry_point="rl4greencrab.invasive_ipm:invasive_IPM_v2") | ||
register(id="TimeSeries-v1", entry_point="rl4greencrab.ts_model:ts_env_v1") | ||
register(id="TimeSeries-v1", entry_point="rl4greencrab.ts_model:ts_env_v1") | ||
register(id="TimeSeries-v2", entry_point="rl4greencrab.ts_model:ts_env_v2") |
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