Skip to content

Commit

Permalink
multi renamed to multippo2
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrecka committed May 16, 2023
1 parent c8531be commit 57d5ee1
Show file tree
Hide file tree
Showing 15 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion myGym/configs/debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/debug1.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
4 changes: 2 additions & 2 deletions myGym/configs/debugdist.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"ppo",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
"steps" :5120,
"steps" :50020,
"pretrained_model" :null,
"multiprocessing" :false,
#Evaluation
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/pnr_easy.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/pnr_hard.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/pnr_medium.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/pnr_medium_multi2.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :1024,
"algo_steps" :1024,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/train_pnp_3n.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/train_pnp_3n_debug.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/train_pnp_3nrot.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :3,
"max_episode_steps" :512,
"algo_steps" :512,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/train_pnp_4n_multitask2.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :4,
"max_episode_steps" :1024,
"algo_steps" :1024,
Expand Down
2 changes: 1 addition & 1 deletion myGym/configs/train_pnp_4n_multitask3.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"yolact_config" :null,
#Train
"train_framework" :"tensorflow",
"algo" :"multi",
"algo" :"multippo2",
"num_networks" :4,
"max_episode_steps" :1024,
"algo_steps" :1024,
Expand Down
2 changes: 1 addition & 1 deletion myGym/stable_baselines_mygym/multi_ppo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ def learn(self, total_timesteps, callback=None, log_interval=1, tb_log_name="Dua

if self.verbose >= 1 and (update % log_interval == 0 or update == 1):
explained_var = explained_variance(values, returns)
#logger.logkv("Steps", steps_used)
logger.logkv("Steps", steps_used)
logger.dumpkvs()

i+=1
Expand Down
2 changes: 1 addition & 1 deletion myGym/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def test_model(env, model=None, implemented_combos=None, arg_dict=None, model_lo
test_env(env, arg_dict)
else:
try:
if arg_dict["algo"] == "multi":
if "multi" in arg_dict["algo"]:
model_args = implemented_combos[arg_dict["algo"]][arg_dict["train_framework"]][1]
model = implemented_combos[arg_dict["algo"]][arg_dict["train_framework"]][0].load(arg_dict["model_path"], env=model_args[1].env)
else:
Expand Down
2 changes: 1 addition & 1 deletion myGym/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def configure_implemented_combos(env, model_logdir, arg_dict):
"torchppo": {"tensorflow": [TorchPPO, (TorchMlpPolicy, env), {"n_steps": arg_dict["algo_steps"], "verbose": 1, "tensorboard_log": model_logdir}]},
"myalgo": {"tensorflow": [MyAlgo, (MyMlpPolicy, env), {"n_steps": arg_dict["algo_steps"], "verbose": 1, "tensorboard_log": model_logdir}]},
"ref": {"tensorflow": [REFER, (MlpPolicy, env), {"n_steps": arg_dict["algo_steps"], "verbose": 1, "tensorboard_log": model_logdir}]},
"multi": {"tensorflow": [MultiPPO2, (MlpPolicy, env), {"n_steps": arg_dict["algo_steps"],"n_models": arg_dict["num_networks"], "verbose": 1, "tensorboard_log": model_logdir}]},
"multippo2": {"tensorflow": [MultiPPO2, (MlpPolicy, env), {"n_steps": arg_dict["algo_steps"],"n_models": arg_dict["num_networks"], "verbose": 1, "tensorboard_log": model_logdir}]},
"multiacktr": {"tensorflow": [MultiACKTR, (MlpPolicy, env), {"n_steps": arg_dict["algo_steps"],"n_models": arg_dict["num_networks"], "verbose": 1, "tensorboard_log": model_logdir}]}}

if "PPO_P" in sys.modules:
Expand Down

0 comments on commit 57d5ee1

Please sign in to comment.