openai / universe

Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
https://universe.openai.com
MIT License
7.45k stars 956 forks source link

VNC environments' log output makes iPython unusable. #181

Closed NHDaly closed 7 years ago

NHDaly commented 7 years ago

Option to quiet/silence VNCEnv Logs

Starting a vnc environment from within python cli/ipython is nearly impossible because the vnc process creates so many logs that it floods the output and makes interactive python unusable.

To solve this, it would be nice if there was a way to configure the logLevel on the (I assume) forked vnc process before starting it. I know that some environments allow configuration, but I couldn't find any options to silence the logs. I think it would be helpful to be able to either:

  1. disable / silence all output from the forked VNC process
  2. set the logLevel for that process.

Here is a gist that demonstrates this difficulty in a Jupyter notebook, but the problem is even worse on the command-line iPython, since the output writes over your input line: https://gist.github.com/NHDaly/346315a83d3a386de7c6ed6249c82b57

Thanks!

Versions

Please include the result of running

$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow

My output:

$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow
Darwin Nathans2016MBP 16.5.0 Darwin Kernel Version 16.5.0: Fri Mar  3 16:52:33 PST 2017; root:xnu-3789.51.2~3/RELEASE_X86_64 x86_64
Python 3.5.2 :: Continuum Analytics, Inc.
Name: universe
Version: 0.21.2
Summary: Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
Home-page: https://github.com/openai/universe
Author: OpenAI
Author-email: universe@openai.com
License: UNKNOWN
Location: /Users/daly/src/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
---
Name: gym
Version: 0.7.3
Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents.
Home-page: https://github.com/openai/gym
Author: OpenAI
Author-email: gym@openai.com
License: UNKNOWN
Location: /Users/daly/miniconda3/envs/universe_p3/lib/python3.5/site-packages
Requires: six, numpy, pyglet, requests
---
Name: tensorflow
Version: 0.12.1
Summary: TensorFlow helps the tensors flow
Home-page: http://tensorflow.org/
Author: Google Inc.
Author-email: opensource@google.com
License: Apache 2.0
Location: /Users/daly/miniconda3/envs/universe_p3/lib/python3.5/site-packages
Requires: protobuf, numpy, six, wheel
---
Name: numpy
Version: 1.11.3
Summary: NumPy: array processing for numbers, strings, records, and objects.
Home-page: http://www.numpy.org
Author: NumPy Developers
Author-email: numpy-discussion@scipy.org
License: BSD
Location: /Users/daly/miniconda3/envs/universe_p3/lib/python3.5/site-packages
Requires:
---
Name: go-vncdriver
Version: 0.4.19
Summary: UNKNOWN
Home-page: UNKNOWN
Author: UNKNOWN
Author-email: UNKNOWN
License: UNKNOWN
Location: /Users/daly/miniconda3/envs/universe_p3/lib/python3.5/site-packages
Requires: numpy
---
Name: Pillow
Version: 4.0.0
Summary: Python Imaging Library (Fork)
Home-page: http://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
License: Standard PIL License
Location: /Users/daly/miniconda3/envs/universe_p3/lib/python3.5/site-packages
Requires: olefile
tlbtlbtlb commented 7 years ago

If you check out the tlb-less-logging branch and set OPENAI_REMOTE_VERBOSE=0 in your environment, it does this. Should I merge this to master?

NHDaly commented 7 years ago

Oooh, cool, thanks!

I haven't had a chance to try this yet, but yes, I think it would be a useful option. Thank you!

ethancaballero commented 7 years ago

merging tlb-less-logging to master would be preferred

tlbtlbtlb commented 7 years ago

Merged to master