D4RL 的env.get_normalized_score
在调用d4rl的库函数时用了env.get_normalized_score
这里遇到的问题是
env has no attribute get_normalized_score
后记
D4RL的用法指南
D4RL本质上是一个数据库,用于离线的强化学习
D4RL的env和gym的环境并不同
简单来说,gym提供的是在线的交互式env,而D4RL则是离线的env
最直观的来看名字就不同
#gym
env = gym.make('Hopper')
#D4RL
env = gym.make('hopper-medium-v0')
分析
首先的分析的问题是env写法的问题
到D4RL官网看一看
Normalizing Scores
You can use the env.get_normalized_score(returns) function to compute a normalized score for an episode, where returns is the undiscounted total sum of rewards accumulated during an episode.
我在网上找到了一个用法,似乎没有问题
分析一下是不是D4RL的安装问题
protobuf
按照官方的下载路线之后得到了以下的报错
可以看到问题是protobuf
尝试的方法1
pip uninstall protobuf
pip install protobuf==3.20.1
打开根目录下的/d4rl后发现,下载的文件可能有问题
计划重新下载安装
rm -rf files
git clone https://github.com/rail-berkeley/d4rl.git
cd d4rl
pip install -e .
遇到的报错为
fatal: unable to access ‘https://github.com/aravindr93/mjrl/’: GnuTLS recv error (-110): The TLS connection was non-properly terminated.
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with ‘git status’
and retry with 'git restore --source=HEAD
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)