Skip to content

Commit

Permalink
Prevent lineplot crash if no complete train trajectories
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaixhin authored Aug 6, 2021
1 parent cc1c621 commit aff0689
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def main(cfg: DictConfig) -> None:
if cfg.algorithm == 'BC':
lineplot(range(cfg.evaluation.interval, cfg.steps + 1, cfg.evaluation.interval), metrics['test_returns'] * (cfg.steps // cfg.evaluation.interval), 'test_returns')
break
else:
elif len(metrics['train_returns']) > 0: # Plot train returns if any
lineplot(metrics['train_steps'], metrics['train_returns'], 'train_returns')
elif cfg.algorithm == 'BC' and cfg.check_time_usage: break

Expand Down

0 comments on commit aff0689

Please sign in to comment.