Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GAIL tensorboard logging does not appear to work #853

Open
eufrizz opened this issue Jun 29, 2024 · 0 comments
Open

GAIL tensorboard logging does not appear to work #853

eufrizz opened this issue Jun 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@eufrizz
Copy link

eufrizz commented Jun 29, 2024

Bug description

I'm following along with the GAIL example, and am trying to log to tensorboard. If I understand the API correctly, I should be able to log directly to tensorboard with the init_tensorboard and init_tensorboard_graph arguments (not entirely sure on the distinction, but have tried using both independently and together).
On training, it creates a *.tfevents.* file in the expected directory, but the file stays empty (i.e. 88 bytes in size) for the duration of the run, and nothing is logged to it. This is the how the GAIL is constructed:

gail_trainer = GAIL(
    demonstrations=rollouts,
    demo_batch_size=1024,
    gen_replay_buffer_capacity=512,
    n_disc_updates_per_round=8,
    venv=env,
    gen_algo=learner,
    reward_net=reward_net,
    log_dir='../runs',
    init_tensorboard=True,
    init_tensorboard_graph=True
)

If I use a custom logger, it works fine, so that's what I'm using for now.

mylogger = logger.configure('../runs', format_strs=["tensorboard"])
gail_trainer = GAIL(
    ...
    custom_logger=mylogger
)

Steps to reproduce

Follow the tutorial, and set the init_tensorboard and init_tensorboard_graph arguments true:
https://imitation.readthedocs.io/en/latest/algorithms/gail.html

Environment

  • Operating system and version: macOS 13.6.6,
  • Python version: 3.10.9, imitation v1.0.0 and sb3 v2.3.2 installed with conda and running in ipynb
  • Output of pip freeze --all:
@eufrizz eufrizz added the bug Something isn't working label Jun 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant