Git Product home page Git Product logo

colabgymrender's Introduction

Hi! I'm a student at the California Institute of Technology with a focus in Computer Science & Electrical Engineering. Feel free to visit my website and explore my various projects!

Contact Me

Click these to get in touch!

Personal School Discord

My Online Presence

Select any of these to teleport to that page!

LinkedIn GitHub Kaggle Medium PyPI

Languages I Love

Python

Swift



Languages I Tolerate

Java

C



Tools and Frameworks I Like

PyTorch TensorFlow Keras NumPy OpenCV Matplotlib Pandas
SciPy SymPy scikit-learn huggingface openaigym

My Editor of Choice

Visual Studio Code

colabgymrender's People

Contributors

ryanrudes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

colabgymrender's Issues

Resolving breaking changes leading up to Gym 1.0

Gym 1.0, according to the developers' roadmap, will introduce a number of breaking changes and deprecations that will necessitate appropriate changes to colabgymrender. The ones of concern are mainly:

  • Updated render API requires render mode to be provided at environment initialization, rather than on step()
  • Updated step API will soon return 5 outputs, that is, observation, reward, terminal, truncation, info
  • Updated reset will always return info now, in addition to observation

As of right now, the plan for colabgymrender is to play along with these new changes by incrementing the major version of this package to avoid any strange surprises. We'll probably introduce colabgymrender==2.0.0 around the same time gym introduces its first major version.

UPDATE (10/02/22)

I have created a new branch gym-1.0. All pull requests targeted at resolving recent breaking changes in gym will be referred to this branch. Once gym version 1.0 is released, this branch will be merged with the base. See #8 and #9.

Feel free to discuss your opinion on this roadmap below. #

Only getting 1 second of recording

When I attempt to record an environment, it only records 1 second worth of video. What am I doing wrong?

import gym

env = gym.make("LunarLander-v2")
env.action_space.seed(42)

env = Recorder(env, './video')

observatio = env.reset()

# img = plt.imshow(env.render('rgb_array'))

observation = env.reset()
for _ in range(10000):
  # img.set_data(env.render('rgb_array'))
  # display.display(plt.gcf())
  # display.clear_output(wait=True)
  observation, reward, done, info = env.step(env.action_space.sample())

  if done:
      observation = env.reset()

env.release()
env.play()
env.close()

moviepy error

Hey !

Thanks for this tool ! Actually I tried running it but keep getting the same error:

TypeError                                 Traceback (most recent call last)
<ipython-input-2-3635bafa8091> in <module>
     12   observation, reward, terminal, info = env.step(action)
     13 
---> 14 env.play()

/usr/local/lib/python3.9/dist-packages/colabgymrender/recorder.py in play(self)
     70         filename = 'temp-{start}.mp4'
     71         clip = VideoFileClip(self.path)
---> 72         clip.write_videofile(filename, progress_bar = False, verbose = False)
     73         display(Video(filename, embed = True))
     74         os.remove(filename)

TypeError: write_videofile() got an unexpected keyword argument 'progress_bar'

I guess it's related to the moviepy library and that I don't have the right version thus could you specify which version is required ?

ROM is missing for Google colab?

I followed the instructions and tutorial for Google colab and after my imports I get this error when running the wrapper?

Exception                                 Traceback (most recent call last)
<ipython-input-12-35e2a7b78893> in <module>()
      1 
----> 2 env = gym.make("Breakout-v0")
      3 directory = './video'
      4 env = Recorder(env, directory)

4 frames
/usr/local/lib/python3.7/dist-packages/atari_py/games.py in get_game_path(game_name)
     18     path = os.path.join(_games_dir, game_name) + ".bin"
     19     if not os.path.exists(path):
---> 20         raise Exception('ROM is missing for %s, see https://github.com/openai/atari-py#roms for instructions' % (game_name,))
     21     return path
     22 

Exception: ROM is missing for breakout, see https://github.com/openai/atari-py#roms for instructions`
```

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.