Hello @shaneshixiang
I've been running experiments with rllab++ with Q-prop and TRPO code selecting a 'mlp' gaussian baseline. Training runs fine, but when I simulate the learned policy this error shows up:
Traceback (most recent call last):
File "/home/iaslab/rllabplusplus/scripts/sim_policy.py", line 47, in <module>
data = joblib.load(file)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 575, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 507, in _unpickle
obj = unpickler.load()
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/pickle.py", line 1039, in load
dispatch[key[0]](self)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 327, in load_build
Unpickler.load_build(self)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/pickle.py", line 1510, in load_build
setstate(state)
File "/home/iaslab/rllabplusplus/sandbox/rocky/tf/core/parameterized.py", line 96, in __setstate__
tf.get_default_session().run(tf.variables_initializer(self.get_params()))
File "/home/iaslab/rllabplusplus/sandbox/rocky/tf/core/parameterized.py", line 36, in get_params
if tag_tuple not in self._cached_params:
AttributeError: 'GaussianMLPBaseline' object has no attribute '_cached_params'
I tried to fix it by adding
Parameterized.__init__(self) in the __init__ method of
rllabplusplus/sandbox/rocky/tf/baselines/gaussian_mlp_baseline.py
But now raises a NotImplementedError:
Traceback (most recent call last):
File "/home/iaslab/rllabplusplus/scripts/sim_policy.py", line 67, in <module>
break
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1313, in __exit__
exec_type, exec_value, exec_tb)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/tensorflow/python/framework/ops.py", line 3812, in get_controller
yield default
File "/home/iaslab/rllabplusplus/scripts/sim_policy.py", line 47, in <module>
data = joblib.load(file)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 575, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle_utils.py", line 190, in _read_fileobject
yield _buffered_read_file(BinaryZlibFile(fileobj, 'rb'))
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 575, in load
obj = _unpickle(fobj, filename, mmap_mode)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 507, in _unpickle
obj = unpickler.load()
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/pickle.py", line 1039, in load
dispatch[key[0]](self)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/site-packages/joblib/numpy_pickle.py", line 327, in load_build
Unpickler.load_build(self)
File "/home/iaslab/anaconda3/envs/rllab3/lib/python3.5/pickle.py", line 1510, in load_build
setstate(state)
File "/home/iaslab/rllabplusplus/sandbox/rocky/tf/core/parameterized.py", line 96, in __setstate__
tf.get_default_session().run(tf.variables_initializer(self.get_params()))
File "/home/iaslab/rllabplusplus/sandbox/rocky/tf/core/parameterized.py", line 37, in get_params
self._cached_params[tag_tuple] = self.get_params_internal(**tags)
File "/home/iaslab/rllabplusplus/sandbox/rocky/tf/core/parameterized.py", line 28, in get_params_internal
raise NotImplementedError
NotImplementedError
Hello @shaneshixiang I've been running experiments with rllab++ with Q-prop and TRPO code selecting a 'mlp' gaussian baseline. Training runs fine, but when I simulate the learned policy this error shows up:
I tried to fix it by adding
Parameterized.__init__(self)
in the__init__
method ofrllabplusplus/sandbox/rocky/tf/baselines/gaussian_mlp_baseline.py
But now raises aNotImplementedError
:Are there any tips to fix this?
Thanks again for your golden help :)