question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug in plot_writer_data

See original GitHub issue

The 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
TimotheeMathieucommented, Mar 10, 2022

Ok for me. I can do it.

0reactions
omardrwchcommented, Mar 10, 2022

I think we could distinguish two cases when we have a path:

  • If input_obj is a path to a .pickle file, we load the file as an AgentManager (which should allow us to load older experiments);
  • If 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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found