0e1f9982cbf60d509e87e324c7076f7b44aeea1d,examples/mujoco_all_sac_real_nvp.py,,run_experiment,#Any#,193
Before Change
def run_experiment(variant):
if variant["env_name"] == "humanoid-rllab":
from rllab.envs.mujoco.humanoid_env import HumanoidEnv
env = normalize(HumanoidEnv())
elif variant["env_name"] == "swimmer-rllab":
from rllab.envs.mujoco.swimmer_env import SwimmerEnv
env = normalize(SwimmerEnv())
elif variant["env_name"] == "multi-direction-swimmer":
env = normalize(MultiDirectionSwimmerEnv())
elif variant["env_name"] == "random-goal-swimmer":
env = normalize(RandomGoalSwimmerEnv(
goal_reward_weight=variant["env_goal_reward_weight"]
))
elif variant["env_name"] == "multi-direction-ant":
env = normalize(MultiDirectionAntEnv())
elif variant["env_name"] == "multi-direction-humanoid":
env = normalize(MultiDirectionHumanoidEnv())
else:
env = normalize(GymEnv(variant["env_name"]))
pool = SimpleReplayBuffer(
env_spec=env.spec,
max_replay_buffer_size=variant["max_pool_size"],
)
After Change
def run_experiment(variant):
env_name = variant["env_name"]
env_type = env_name.split("-")[-1]
if "multi-direction" in env_name:
EnvClass = MULTI_DIRECTION_ENVS[env_type]
env = normalize(EnvClass())
elif "random-goal" in env_name:
EnvClass = RANDOM_GOAL_ENVS[env_type]
env_args = {
name.lstrip("env_"): value
for name, value in variant.items()
if name.startswith("env_")
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 10
Instances Project Name: rail-berkeley/softlearning
Commit Name: 0e1f9982cbf60d509e87e324c7076f7b44aeea1d
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: examples/mujoco_all_sac_real_nvp.py
Class Name:
Method Name: run_experiment
Project Name: commonsense/conceptnet5
Commit Name: 9582b206c63f01ca3f6990f50b0cd7754e2fe65b
Time: 2013-05-24
Author: rob@luminoso.com
File Name: conceptnet5/nodes.py
Class Name:
Method Name: make_concept_uri
Project Name: rail-berkeley/softlearning
Commit Name: f33e7b5201494eb52360efc14dbfc7e6eeb02096
Time: 2018-05-22
Author: kristian.hartikainen@gmail.com
File Name: examples/mujoco_all_sac_real_nvp_hierarchy.py
Class Name:
Method Name: run_experiment