Skip to content
Snippets Groups Projects
Commit ba4d8e61 authored by Armin Co's avatar Armin Co
Browse files

Save results even if learning is turned off.

Make sure you change the name of the agent, otherwise the old data may be overriden.
parent b7a0a83c
Branches
No related tags found
No related merge requests found
...@@ -22,7 +22,6 @@ def run(conf): ...@@ -22,7 +22,6 @@ def run(conf):
# Register an *atexit* callback, # Register an *atexit* callback,
# to store the corrent result of the agent # to store the corrent result of the agent
# if the program is interrupted. # if the program is interrupted.
if conf.learn:
atexit.register(marvin.save, conf.save_to) atexit.register(marvin.save, conf.save_to)
# Offline training of the agent with # Offline training of the agent with
...@@ -38,7 +37,6 @@ def run(conf): ...@@ -38,7 +37,6 @@ def run(conf):
loss, avg_score = ew.run(conf.env, marvin, conf.run_episodes, render=conf.render, learn=_LEARN, conf=conf) loss, avg_score = ew.run(conf.env, marvin, conf.run_episodes, render=conf.render, learn=_LEARN, conf=conf)
# Save the final training result of the agent. # Save the final training result of the agent.
if conf.learn:
marvin.save(conf.save_to) marvin.save(conf.save_to)
ew.process_logs(avg_score, loss, conf) ew.process_logs(avg_score, loss, conf)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment