diff --git a/ArchGym_Intro ipynb.ipynb b/ArchGym_Intro.ipynb similarity index 100% rename from ArchGym_Intro ipynb.ipynb rename to ArchGym_Intro.ipynb diff --git a/sims/AstraSim/trainBOAstraSim.py b/sims/AstraSim/train_bo_AstraSim.py similarity index 100% rename from sims/AstraSim/trainBOAstraSim.py rename to sims/AstraSim/train_bo_AstraSim.py diff --git a/sims/AstraSim/trainRandomWalkerAstraSim.py b/sims/AstraSim/train_randomwalker_AstraSim.py similarity index 100% rename from sims/AstraSim/trainRandomWalkerAstraSim.py rename to sims/AstraSim/train_randomwalker_AstraSim.py diff --git a/sims/customenv/supported_algo.py b/sims/CustomSim/supported_algo.py similarity index 100% rename from sims/customenv/supported_algo.py rename to sims/CustomSim/supported_algo.py diff --git a/sims/customenv/train_EMUKIT_GP_vizier.py b/sims/CustomSim/train_EMUKIT_GP_CustomSim.py similarity index 100% rename from sims/customenv/train_EMUKIT_GP_vizier.py rename to sims/CustomSim/train_EMUKIT_GP_CustomSim.py diff --git a/sims/customenv/train_NSGA2_vizier.py b/sims/CustomSim/train_NSGA2_CustomSim.py similarity index 100% rename from sims/customenv/train_NSGA2_vizier.py rename to sims/CustomSim/train_NSGA2_CustomSim.py diff --git a/sims/customenv/train_gridsearch_vizier.py b/sims/CustomSim/train_gridsearch_CustomSim.py similarity index 100% rename from sims/customenv/train_gridsearch_vizier.py rename to sims/CustomSim/train_gridsearch_CustomSim.py diff --git a/sims/customenv/train_quasirandom_vizier.py b/sims/CustomSim/train_quasirandom_CustomSim.py similarity index 100% rename from sims/customenv/train_quasirandom_vizier.py rename to sims/CustomSim/train_quasirandom_CustomSim.py diff --git a/sims/customenv/train_randomsearch_vizier.py b/sims/CustomSim/train_randomsearch_CustomSim.py similarity index 100% rename from sims/customenv/train_randomsearch_vizier.py rename to sims/CustomSim/train_randomsearch_CustomSim.py diff --git a/sims/customenv/train_randomwalker.py b/sims/CustomSim/train_randomwalker_CustomSim.py similarity index 100% rename from sims/customenv/train_randomwalker.py rename to sims/CustomSim/train_randomwalker_CustomSim.py diff --git a/sims/DRAM/train_DRAMEnv.py b/sims/DRAM/train_DRAMEnv.py deleted file mode 100644 index 47df1334..00000000 --- a/sims/DRAM/train_DRAMEnv.py +++ /dev/null @@ -1,63 +0,0 @@ -import os - -os.sys.path.insert(0, os.path.abspath('../configs')) - -import configs -import ray -import gym -import ray.rllib.agents.ppo as ppo -from ray.tune.registry import register_env -import sys -from arch_gym.envs.DRAMEnv import DRAMEnv - -import shutil - - -select_env = "DRAMEnv-v0" - -register_env(select_env, lambda config: DRAMEnv()) - -# for testing environment -''' -env = gym.make(select_env) -state = env.reset() -print(state, type(state),state.shape) - -#sys.exit() -''' - - -chkpt_root = "tmp/DRAMEnv" -shutil.rmtree(chkpt_root, ignore_errors=True, onerror=None) -ray_results = "{}/ray_results/".format(os.getenv("HOME")) -shutil.rmtree(ray_results, ignore_errors=True, onerror=None) - -config = ppo.DEFAULT_CONFIG.copy() - - -config["log_level"] = "WARN" -config["num_workers"] = 2 -config["sgd_minibatch_size"] = 32 -config["model"]["fcnet_hiddens"] = [100,100] - - -agent = ppo.PPOTrainer(config, env=select_env) - - - -status = "{:2d} reward {:6.2f}/{:6.2f}/{:6.2f} len {:4.2f} saved {}" -result = agent.train() -''' -n_iter = 1 -for n in range(n_iter): - result = agent.train() - chkpt_file = agent.save(chkpt_root) - print(status.format( - n + 1, - result["episode_reward_min"], - result["episode_reward_mean"], - result["episode_reward_max"], - result["episode_len_mean"], - chkpt_file - )) -''' diff --git a/sims/DRAM/train_EMUKIT_vizier.py b/sims/DRAM/train_EMUKIT_DRAMSys.py similarity index 100% rename from sims/DRAM/train_EMUKIT_vizier.py rename to sims/DRAM/train_EMUKIT_DRAMSys.py diff --git a/sims/DRAM/train_NSGA2_vizier.py b/sims/DRAM/train_NSGA2_DRAMSys.py similarity index 100% rename from sims/DRAM/train_NSGA2_vizier.py rename to sims/DRAM/train_NSGA2_DRAMSys.py diff --git a/sims/DRAM/train_brute_force.py b/sims/DRAM/train_brute_force_DRAMSys.py similarity index 100% rename from sims/DRAM/train_brute_force.py rename to sims/DRAM/train_brute_force_DRAMSys.py diff --git a/sims/DRAM/train_gridsearch_vizier.py b/sims/DRAM/train_gridsearch_DRAMSys.py similarity index 100% rename from sims/DRAM/train_gridsearch_vizier.py rename to sims/DRAM/train_gridsearch_DRAMSys.py diff --git a/sims/DRAM/train_ppo.py b/sims/DRAM/train_ppo_DRAMSys.py similarity index 100% rename from sims/DRAM/train_ppo.py rename to sims/DRAM/train_ppo_DRAMSys.py diff --git a/sims/DRAM/train_quasirandom_vizier.py b/sims/DRAM/train_quasirandom_DRAMSys.py similarity index 100% rename from sims/DRAM/train_quasirandom_vizier.py rename to sims/DRAM/train_quasirandom_DRAMSys.py diff --git a/sims/DRAM/train_randomsearch_vizier.py b/sims/DRAM/train_randomsearch_DRAMSys.py similarity index 100% rename from sims/DRAM/train_randomsearch_vizier.py rename to sims/DRAM/train_randomsearch_DRAMSys.py diff --git a/sims/DRAM/train_simpleEnv.py b/sims/DRAM/train_simpleEnv.py deleted file mode 100644 index 867a7ca2..00000000 --- a/sims/DRAM/train_simpleEnv.py +++ /dev/null @@ -1,40 +0,0 @@ -import ray -import ray.rllib.agents.ppo as ppo - -from ray.tune.registry import register_env -import sys -sys.path.append("/home/skrishnan/workspace/arch_gym/arch_gym") -from arch_gym.envs.simpleEnv import simpleEnv - - -import shutil -import os - -select_env = "simpleEnv-v0" - -register_env(select_env, lambda config: simpleEnv()) - -chkpt_root = "tmp/simpleEnv" -shutil.rmtree(chkpt_root, ignore_errors=True, onerror=None) -ray_results = "{}/ray_results/".format(os.getenv("HOME")) -shutil.rmtree(ray_results, ignore_errors=True, onerror=None) - -config = ppo.DEFAULT_CONFIG.copy() -config["log_level"] = "WARN" -agent = ppo.PPOTrainer(config, env=select_env) - -status = "{:2d} reward {:6.2f}/{:6.2f}/{:6.2f} len {:4.2f} saved {}" -n_iter = 50 -for n in range(n_iter): - result = agent.train() - chkpt_file = agent.save(chkpt_root) - print(status.format( - n + 1, - result["episode_reward_min"], - result["episode_reward_mean"], - result["episode_reward_max"], - result["episode_len_mean"], - chkpt_file - )) - - diff --git a/sims/DRAM/train_single_agent.py b/sims/DRAM/train_single_agent_DRAMSys.py similarity index 100% rename from sims/DRAM/train_single_agent.py rename to sims/DRAM/train_single_agent_DRAMSys.py diff --git a/sims/Timeloop/launch_gcp.py b/sims/Timeloop/launch_gcp.py index d61eb29a..f86d52db 100644 --- a/sims/Timeloop/launch_gcp.py +++ b/sims/Timeloop/launch_gcp.py @@ -120,7 +120,7 @@ def run_task(task): os.chdir(base_dir) # Create the command to run the simulation - cmd = "python train_rw_timeloop.py --script " + script_dir \ + cmd = "python train_rw_Timeloop.py --script " + script_dir \ + " --output " + output_dir \ + " --arch " + arch_dir \ + " --mapper " + mapper_dir \ @@ -142,7 +142,7 @@ def run_task(task): os.chdir(base_dir) # Create the command to run the simulation - cmd = "python train_ga_timeloop.py --script " + script_dir \ + cmd = "python train_ga_Timeloop.py --script " + script_dir \ + " --output " + output_dir \ + " --arch " + arch_dir \ + " --mapper " + mapper_dir \ @@ -177,7 +177,7 @@ def run_task(task): os.chdir(base_dir) # Create the command to run the simulation - cmd = "python train_aco_timeloop.py --script " + script_dir \ + cmd = "python train_aco_Timeloop.py --script " + script_dir \ + " --output " + output_dir \ + " --arch " + arch_dir \ + " --mapper " + mapper_dir \ @@ -201,7 +201,7 @@ def run_task(task): os.chdir(base_dir) # Create the command to run the simulation - cmd = "python train_bo_timeloop.py --script " + script_dir \ + cmd = "python train_bo_Timeloop.py --script " + script_dir \ + " --output " + output_dir \ + " --arch " + arch_dir \ + " --mapper " + mapper_dir \ @@ -243,7 +243,7 @@ def run_task(task): os.chdir(base_dir) # single agent - cmd = "python train_single_agent.py " + \ + cmd = "python train_single_agent_Timeloop.py " + \ "--script={} ".format(script_dir) + \ "--output={} ".format(output_dir) + \ "--arch={} ".format(arch_dir) + \ diff --git a/sims/Timeloop/train_aco_timeloop.py b/sims/Timeloop/train_aco_Timeloop.py similarity index 100% rename from sims/Timeloop/train_aco_timeloop.py rename to sims/Timeloop/train_aco_Timeloop.py diff --git a/sims/Timeloop/train_bo_timeloop.py b/sims/Timeloop/train_bo_Timeloop.py similarity index 100% rename from sims/Timeloop/train_bo_timeloop.py rename to sims/Timeloop/train_bo_Timeloop.py diff --git a/sims/Timeloop/train_ga_timeloop.py b/sims/Timeloop/train_ga_Timeloop.py similarity index 100% rename from sims/Timeloop/train_ga_timeloop.py rename to sims/Timeloop/train_ga_Timeloop.py diff --git a/sims/Timeloop/train_ppo_timeloop.py b/sims/Timeloop/train_ppo_Timeloop.py similarity index 100% rename from sims/Timeloop/train_ppo_timeloop.py rename to sims/Timeloop/train_ppo_Timeloop.py diff --git a/sims/Timeloop/train_single_agent.py b/sims/Timeloop/train_single_agent_Timeloop.py similarity index 100% rename from sims/Timeloop/train_single_agent.py rename to sims/Timeloop/train_single_agent_Timeloop.py