Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
famura committed Aug 24, 2020
1 parent e84a9da commit 48c975d
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Pyrado/pyrado/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@


# Pyrado version number
VERSION = '0.1'
VERSION = '0.2'

# Provide global data directories
PERMA_DIR = osp.join(osp.dirname(__file__), '..', 'data', 'perma')
Expand Down
10 changes: 6 additions & 4 deletions Pyrado/pyrado/exploration/stochastic_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,13 @@ def __init__(self,
super().__init__(param_dim)

if full_cov:
self._noise = FullNormalNoise(noise_dim=param_dim, std_init=std_init, std_min=std_min,
train_mean=train_mean)
self._noise = FullNormalNoise(
use_cuda=False, noise_dim=param_dim, std_init=std_init, std_min=std_min, train_mean=train_mean
)
else:
self._noise = DiagNormalNoise(noise_dim=param_dim, std_init=std_init, std_min=std_min,
train_mean=train_mean)
self._noise = DiagNormalNoise(
use_cuda=False, noise_dim=param_dim, std_init=std_init, std_min=std_min, train_mean=train_mean
)

@property
def noise(self) -> [FullNormalNoise, DiagNormalNoise]:
Expand Down
6 changes: 3 additions & 3 deletions Pyrado/scripts/training/qbb_spota_hc.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
expl_factor=1.1,
expl_std_init=0.5,
)
subrtn_hparam_cand = subrtn_hparam_cand
subrtn_hparam_refs = deepcopy(subrtn_hparam_cand)

sr_cand = HCNormal(ex_dir, env, policy, **subrtn_hparam_cand)
sr_refs = HCNormal(ex_dir, env, deepcopy(policy), **subrtn_hparam_cand)
sr_refs = HCNormal(ex_dir, env, deepcopy(policy), **subrtn_hparam_refs)

spota_hparam = dict(
max_iter=10,
Expand All @@ -109,7 +109,7 @@
save_list_of_dicts_to_yaml([
dict(env=env_hparams, seed=ex_dir.seed),
dict(policy=policy_hparam),
dict(subrtn_cand=subrtn_hparam_cand, subrtn_refs=subrtn_hparam_cand, subrtn_name=HCNormal.name),
dict(subrtn_name=HCNormal.name, subrtn_cand=subrtn_hparam_cand, subrtn_refs=subrtn_hparam_refs),
dict(algo=spota_hparam, algo_name=SPOTA.name)],
ex_dir
)
Expand Down
6 changes: 3 additions & 3 deletions Pyrado/scripts/training/qbb_spota_ppo.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,10 @@
max_grad_norm=1.,
lr=1e-4,
)
subrtn_hparam_cand = subrtn_hparam_cand
subrtn_hparam_refs = deepcopy(subrtn_hparam_cand)

sr_cand = PPO(ex_dir, env, policy, critic_cand, **subrtn_hparam_cand)
sr_refs = PPO(ex_dir, env, deepcopy(policy), critic_refs, **subrtn_hparam_cand)
sr_refs = PPO(ex_dir, env, deepcopy(policy), critic_refs, **subrtn_hparam_refs)

# Meta-Algorithm
spota_hparam = dict(
Expand Down Expand Up @@ -139,7 +139,7 @@
dict(env=env_hparams, seed=ex_dir.seed),
dict(policy=policy_hparam),
dict(critic_cand_and_ref=critic_hparam),
dict(subrtn_cand=subrtn_hparam_cand, subrtn_refs=subrtn_hparam_cand, subrtn_name=PPO.name),
dict(subrtn_name=PPO.name, subrtn_cand=subrtn_hparam_cand, subrtn_refs=subrtn_hparam_refs),
dict(algo=spota_hparam, algo_name=SPOTA.name)],
ex_dir
)
Expand Down
2 changes: 1 addition & 1 deletion Pyrado/scripts/training/wam-bic_bayrn_cem.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
num_eval_rollouts_real=100 if isinstance(env_real, WAMBallInCupSim) else 5,
num_eval_rollouts_sim=100,
# policy_param_init=policy_init.param_values.data,
subroutine_snapshot_mode='latest'
subrtn_snapshot_mode='latest'
)

# Save the environments and the hyper-parameters (do it before the init routine of BDR)
Expand Down
2 changes: 1 addition & 1 deletion RcsPySim/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def build_extension(self, ext):

setup(
name='RcsPySim',
version='0.1',
version='0.2',
description='Robotic simulation environments backed by Rcs',
author='Fabio Muratore & Felix Treede',
author_email='fabio.muratore@famura.net',
Expand Down

0 comments on commit 48c975d

Please sign in to comment.