[rllib] Fix LSTM regression on truncated sequences and add regression test (#2898)

* fix

* add test

* yapf

* yapf

* fix space

* Oops that should be lstm: True

* Update cartpole_lstm.py
This commit is contained in:
Eric Liang
2018-09-18 15:09:16 -07:00
committed by GitHub
parent ab8348b1f5
commit 3a3782c39f
5 changed files with 197 additions and 2 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ def _parse_results(res_path):
for line in f:
pass
res_dict = _flatten_dict(json.loads(line.strip()))
except Exception as e:
except Exception:
logger.exception("Importing %s failed...Perhaps empty?" % res_path)
return res_dict
@@ -45,7 +45,7 @@ def _parse_configs(cfg_path):
try:
with open(cfg_path) as f:
cfg_dict = _flatten_dict(json.load(f))
except Exception as e:
except Exception:
logger.exception("Config parsing failed.")
return cfg_dict