我正在通过AWS Sagemaker使用rl coach,并且遇到了我难以理解的问题。
我正在使用AWS Sagemaker进行学习以及针对环境使用AWS Robomaker进行学习,例如DeepRacer中也使用rl教练。实际上,该代码与学习方面的DeepRacer code几乎没有什么不同。但是环境却完全不同。
会发生什么:
代理程序引发以下异常:Failed to restore agent's checkpoint: 'main_level/agent/main/online/global_step'
回溯指向this rl coach module中发生的错误:
File "/someverylongpath/rl_coach/architectures/tensorflow_components/savers.py", line 93, in <dictcomp>
for ph, v in zip(self._variable_placeholders, self._variables)
KeyError: 'main_level/agent/main/online/global_step'
我就像Deepracer一样使用patch on rl coach。 补丁中值得注意的一件事是:
- self._variables = tf.global_variables()
+ self._variables = tf.trainable_variables()
但是它不应该导致'main_level/agent/main/online/global_step'
不在self._variables中吗?
我认为问题在于global_step位于self._variables中,因此不应存在。
因此,对于这个问题,我有些事情不了解,而且我不习惯做教练,所以任何帮助都是有价值的。
更多信息:
rl-coach-slim 1.0.0
和tensorflow 1.11.0
答案 0 :(得分:0)
我删除了补丁(从技术上讲,我删除了正在应用它的dockerfile中的patch命令),现在它可以工作了,可以从检查点正确还原模型。