From 41ce3754b9aca9c16c049200af619fb772f0b429 Mon Sep 17 00:00:00 2001 From: Joshua Achiam Date: Thu, 14 Mar 2019 10:41:29 -0700 Subject: [PATCH] Some exception handling in plotter. --- spinup/utils/plot.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spinup/utils/plot.py b/spinup/utils/plot.py index e8d253dab..a6b8f4e36 100644 --- a/spinup/utils/plot.py +++ b/spinup/utils/plot.py @@ -84,7 +84,11 @@ def get_datasets(logdir, condition=None): unit = units[condition1] units[condition1] += 1 - exp_data = pd.read_table(os.path.join(root,'progress.txt')) + try: + exp_data = pd.read_table(os.path.join(root,'progress.txt')) + except: + print('Could not read from %s'%os.path.join(root,'progress.txt')) + continue performance = 'AverageTestEpRet' if 'AverageTestEpRet' in exp_data else 'AverageEpRet' exp_data.insert(len(exp_data.columns),'Unit',unit) exp_data.insert(len(exp_data.columns),'Condition1',condition1)