Bug in plot_writer_data
See original GitHub issueThe following code:
from rlberry.agents import UCBVIAgent
from rlberry.envs import GridWorld
from rlberry.manager import AgentManager, plot_writer_data
manager = AgentManager(
UCBVIAgent,
(GridWorld, {}),
fit_budget=10,
output_dir='rlberry_data/ucbvi_experiment',
outdir_id_style=None
)
manager.fit()
plot_writer_data(manager, tag='episode_rewards')
raises the error:
ValueError: input dir not found, verify that the agent are trained and that AgentManager.outdir_id_style="timestamp"
Since the agent manager is given to plot_writer_data
, we should not care about outdir_id_style
, all we need is already in the manager.
Also, this leads to a completely unexpected behavior if the code above is previously called with outdir_id_style="timestamp"
, since we’ll plot the data from the previous run, instead of data in the current manager.
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
No results found
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok for me. I can do it.
I think we could distinguish two cases when we have a path:
input_obj
is a path to a .pickle file, we load the file as an AgentManager (which should allow us to load older experiments);input_obj
is a folder, we take the .pickle file in the most recent subfolder (either by looking at the timestamp in the folder name, or by looking at its creation time).What do you think?