Skip to content

Commit

Permalink
Add per-episode metrics.
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewGerber committed Oct 8, 2024
1 parent 465ad84 commit 5b817c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rlai/policy_gradient/monte_carlo/reinforce.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,6 @@ def improve(

plt.close()

if pdf is not None:
pdf.close()

# plot per-episode metrics
if len(environment.metric_episode_value) > 0:
for metric in environment.metric_episode_value:
Expand All @@ -414,6 +411,9 @@ def improve(

plt.close()

if pdf is not None:
pdf.close()

num_fallback_iterations = 0
if (
training_pool is not None and
Expand Down

0 comments on commit 5b817c7

Please sign in to comment.