Farama-Foundation / Gymnasium

An API standard for single-agent reinforcement learning environments, with popular reference environments and related utilities (formerly Gym)
https://gymnasium.farama.org
MIT License
7.39k stars 836 forks source link

[Bug Report] gym.make(env_id) adds a StreamHandler to the root logger #363

Closed jtatusko closed 1 year ago

jtatusko commented 1 year ago

Describe the bug

env_id = "PongNoFrameskip-v4"
print("HANDLERS", logging.root.handlers)
env = gym.make(env_id)
print("HANDLERS", logging.root.handlers)

output:

HANDLERS []
HANDLERS [<StreamHandler <stderr> (NOTSET)>]

Having an extra stream handler is making all my log messages show twice. Also I'm looking for a way to not print this:

A.L.E: Arcade Learning Environment (version 0.8.1+53f58b7)
[Powered by Stella]

I'm spawning many environments for RL and this message spams stderr

Code example

No response

System info

No response

Additional context

No response

Checklist

pseudo-rnd-thoughts commented 1 year ago

The message is either being produced by Stella itself or ale-py https://github.com/mgbellemare/Arcade-Learning-Environment could you move your question to the project that print the message

jtatusko commented 1 year ago

Will do, thx