google-deepmind / envlogger

A tool for recording RL trajectories.
Apache License 2.0
91 stars 13 forks source link

Random agent catch does not run. #12

Closed Itssshikhar closed 1 month ago

Itssshikhar commented 1 month ago

Hi! When I run the random_agent_catch.py file, there seems to some kind of RuntimeError saying that no such file /tmp/catch_data/metadata.riegeli exists and quits right after that. Even when building and testing with Bazel, it seems to fail at the same metadata.riegeli does not exists RuntimeError.

Am I doing something wrong in setting the repo up? Screenshot from 2024-08-02 10-40-03

kenjitoyama commented 1 month ago

Hello @Itssshikhar, thanks for opening this bug!

Can you try creating the directory before running EnvLogger?

mkdir /tmp/catch_data/

The code is expected to fail if the directory doesn't exist before instantiating the logger. Please see these lines: https://github.com/google-deepmind/envlogger/blob/a20961243cd24235fe02d5c8f8780931ecc38373/envlogger/backends/cc/riegeli_dataset_writer.h#L39-L48

I can see that the info is only present in C++, but not in Python. I'll see if I can add a sentence to the docs, and also to the README.

Cheers,

Daniel

Itssshikhar commented 1 month ago

Hey @kenjitoyama! Thanks for the heads up.

Was able to solve this issue precisely by creating a catch_data directory in /tmp/.

Cheers, Shikhar