Additional context
I replace "from slm_lab.env import OpenAIEnv" to "from slm_lab.env import make_env" line 5
"from slm_lab.experiment.monitor import Body" to "from slm_lab.agent import Body" line 7
"self.env = OpenAIEnv(self.spec)" to "self.env = make_env(self.spec)" line 17
Because previous components can not be found.
Error logs
Traceback (most recent call last):
File "pipex.py", line 56, in <module>
sess = Session(spec)
File "pipex.py", line 18, in __init__
body = Body(self.env, self.spec['agent'])
File "/Users/shiwanyin/SLM-Lab/slm_lab/agent/__init__.py", line 113, in __init__
self.init_tb()
File "/Users/shiwanyin/SLM-Lab/slm_lab/agent/__init__.py", line 132, in init_tb
log_prepath = self.spec['meta']['log_prepath']
TypeError: list indices must be integers or slices, not str
Hi @Wen-Wen-Luffy thanks for spotting this. The code snippet was a bit old. I have updated it to the latest version that is runnable. Please check the page again. Thanks!
Describe the bug Can not implement a Session in an external project using the code in the gitbook.
To Reproduce
git rev-parse HEAD
to get it):spec
file used: slm_lab/spec/benchmark/ppo/ppo_cartpole.jsonAdditional context I replace "from slm_lab.env import OpenAIEnv" to "from slm_lab.env import make_env" line 5 "from slm_lab.experiment.monitor import Body" to "from slm_lab.agent import Body" line 7 "self.env = OpenAIEnv(self.spec)" to "self.env = make_env(self.spec)" line 17 Because previous components can not be found.
Error logs