Comments (8)
Hi Chase. I think this is an issue related to the PyQT renderer. Can you provide a code snippet to reproduce the issue?
from minigrid.
Hey thanks for the quick response. Here's where I've instantiated multiple envs:
import gym
from gym_minigrid.wrappers import RGBImgObsWrapper
from PEARL import PEARL
env0 = RGBImgObsWrapper(gym.make("MiniGrid-Empty-Random-5x5-v0"))
env00 = RGBImgObsWrapper(gym.make("MiniGrid-FourRooms-v0"))
env1 = RGBImgObsWrapper(gym.make("MiniGrid-MultiRoom-N2-S4-v0"))
env2 = RGBImgObsWrapper(gym.make("MiniGrid-MultiRoom-N4-S5-v0"))
train_tasks = [env00, env0, env1, env2]
test_env = RGBImgObsWrapper(gym.make("MiniGrid-MultiRoom-N6-v0"))
test_tasks = [test_env]
#train
pearl = PEARL(train_tasks[0], train_tasks, test_tasks)
pearl.train_algo()
#########################################################################
And here's where I'm rendering each environment to initialize them into replay buffers:
def get_path(self, env, policy, max_length):
...
s = env.reset()
env.render()
for i in range(max_length):
a = policy.get_action(s)
a = self.return_action(env, a)
s_p, r, t, e_info = env.step(a)
... # the line above breaks it
########################################################################
Thanks again for looking into it. I'll look up the issue in ref to PyQT in the meantime.
from minigrid.
One temporary fix that could work is to run the environments in forked processes.
Otherwise though, next week I will start looking at implementing a renderer based on NumPy (see #76). I would ideally like to eliminate the PyQT dependency. You're not the only one to run into issues. If you're available to help me test next week that could he useful :)
from minigrid.
Hey, thanks that's awesome. I'd be happy to help, though I'm working on the implementation so it will definitely not be bug-free. If it's still helpful though, that would be great!
from minigrid.
Hi @chasebos91. I have the new version of MiniGrid that uses NumPy to produce graphics on a new branch maximecb-numpy-render
, and matplotlib for rendering windows. Could you test it out and let me know if it fixes the problem you encountered or if you run into any other issues?
from minigrid.
So far so good! Will let you know as I keep working on it. Thank you!!
** EDIT: Sorry nvm I'm a GitHub noob, can you tell me how I can access the branch?
from minigrid.
You can access it by first doing a git pull, then:
git checkout maximecb-numpy-render`
Then to install the package in editable mode:
pip3 install -e .
from minigrid.
This is now pushed to the master branch as well :)
from minigrid.
Related Issues (20)
- [Bug Report] RGBImgObsWrapper hardcodes `highlight` parameter HOT 3
- [Bug Report] self.fig.canvas.set_window_title(title) API deprecated HOT 1
- [Question] Use of 'direction' in observation space? HOT 1
- [Bug Report] Toggling the box will make it disappear HOT 2
- [Bug Report] Error when creating BabyAI environment HOT 2
- [Question] Field of view algorithm explanation
- [Question] What do you mean by "done" action in the action space? HOT 3
- [Bug Report] Spec.to_json() of SimpleCrossing fails
- [Question] Getting total number of unique states HOT 1
- [Question] How to create vectorized envs for minigrid HOT 3
- [Bug Report] Unlock Pickup env is actually just Unlock HOT 4
- [Question] Difference between Minigrid and BabyAI envs HOT 1
- [Question] Is `ActionBonus` wrapper correct ? HOT 1
- [Question] How to build custom environment with custom action space HOT 1
- Python 3.11 support is missing from the README
- [Proposal] Update documentation HOT 3
- [Proposal] Add relevant project
- [Proposal] Discrete observations
- [Bug Report] ViewSizeWrapper ignored with RGBImgPartialObsWrapper HOT 1
- [Question] Get demonstration for 'MiniGrid-MultiRoom-N4-S5-v0' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from minigrid.