Skip to content

Commit

Permalink
Fix behavior cloning due to API changes (openai#1014)
Browse files Browse the repository at this point in the history
  • Loading branch information
yenchenlin authored and pzhokhov committed Oct 25, 2019
1 parent f40a477 commit 665b888
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions baselines/gail/behavior_clone.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

def argsparser():
parser = argparse.ArgumentParser("Tensorflow Implementation of Behavior Cloning")
parser.add_argument('--env_id', help='environment ID', default='Hopper-v1')
parser.add_argument('--env_id', help='environment ID', default='Hopper-v2')
parser.add_argument('--seed', help='RNG seed', type=int, default=0)
parser.add_argument('--expert_path', type=str, default='data/deterministic.trpo.Hopper.0.00.npz')
parser.add_argument('--checkpoint_dir', help='the directory to save model', default='checkpoint')
Expand Down Expand Up @@ -73,7 +73,7 @@ def learn(env, policy_func, dataset, optim_batch_size=128, max_iters=1e4,
savedir_fname = tempfile.TemporaryDirectory().name
else:
savedir_fname = osp.join(ckpt_dir, task_name)
U.save_state(savedir_fname, var_list=pi.get_variables())
U.save_variables(savedir_fname, variables=pi.get_variables())
return savedir_fname


Expand Down
2 changes: 1 addition & 1 deletion baselines/gail/run_mujoco.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def runner(env, policy_func, load_model_path, timesteps_per_batch, number_trajs,
U.initialize()
# Prepare for rollouts
# ----------------------------------------
U.load_state(load_model_path)
U.load_variables(load_model_path)

obs_list = []
acs_list = []
Expand Down

0 comments on commit 665b888

Please sign in to comment.