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
Multiple instances of minerl running in same execution environment causes shutdowns #177
Comments
Can you attach your ./logs?
jon-chuang <notifications@github.com> schrieb am Do. 25. Juli 2019 um 17:43:
I have experienced multiple shutdowns of minerl when 1. running multiple
instances (e.g. 5) in parallel, 2. interrupting a jupyter kernel
communicating with minerl.
The first is more serious and the second is just info.
The range of error messages I get are as follows:
`~/.local/lib/python3.7/site-packages/gym/wrappers/time_limit.py in
step(self, action)
13 def step(self, action):
14 assert self._elapsed_steps is not None, "Cannot call env.step() before
calling reset()"
---> 15 observation, reward, done, info = self.env.step(action)
16 self._elapsed_steps += 1
17 if self._elapsed_steps >= self._max_episode_steps:
~/miniconda/envs/py37/lib/python3.7/site-packages/minerl/env/core.py in
step(self, action)
525 # Receive reward done and sent.
526 reply = comms.recv_message(self.client_socket)
--> 527 reward, done, sent = struct.unpack('!dbb', reply)
528
529 # Receive info from the environment.
TypeError: a bytes-like object is required, not 'NoneType'`
Failed to reset (socket error), trying again! Cleaning connection!
Something must have gone wrong. Failed to reset (socket error), trying
again! Cleaning connection! Something must have gone wrong. Connection with
Minecraft client cleaned more than once; restarting.
This can require the restarting of my jupyter kernel, which is extremely
disruptive to running experiments.
There are other error messages which I will add to this issue once I
encounter them again.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#177?email_source=notifications&email_token=AAFPVL22FT3LXJ37YG4U77TQBIM7FA5CNFSM4IG6VKP2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBSVUGA>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAFPVL4XNBDFX5SAI7JDFPTQBIM7FANCNFSM4IG6VKPQ>
.
--
William Guss
T +1-801-891-0781
E william@wguss.com
http://www.wguss.com
|
I'm not sure which logs correspond to my errors. When I get the same issue, I will attach my logs. |
Sweet! I have seen this error before :)))) Im on it ! |
Great thanks! |
I've noticed this error only occurs when I try starting multiple instances of minerl at the same time; consquently a quick fix is just to stagger, annoying but I haven't encountered errors since. |
I have been able to reproduce this: |
I have exactly the same issue when trying to train in 4 separate processes on a machine with 4 GPUs. The error messages are all over each other: |
We ended up fixing this here HumanCompatibleAI#5 which led to another parallelization error addressed by HumanCompatibleAI#6 . Be happy to merge this in the future if the maintainers are interested (though I'm a bit busy right now, so probably in a week or two) |
I have experienced multiple shutdowns of minerl when 1. running multiple instances (e.g. 5) in parallel, 2. interrupting a jupyter kernel communicating with minerl.
The first is more serious and the second is just additional info.
I believe this is a bug.
The range of error messages I get are as follows:
~/.local/lib/python3.7/site-packages/gym/wrappers/time_limit.py in step(self, action) 13 def step(self, action): 14 assert self._elapsed_steps is not None, "Cannot call env.step() before calling reset()" ---> 15 observation, reward, done, info = self.env.step(action) 16 self._elapsed_steps += 1 17 if self._elapsed_steps >= self._max_episode_steps: ~/miniconda/envs/py37/lib/python3.7/site-packages/minerl/env/core.py in step(self, action) 525 # Receive reward done and sent. 526 reply = comms.recv_message(self.client_socket) --> 527 reward, done, sent = struct.unpack('!dbb', reply) 528 529 # Receive info from the environment. TypeError: a bytes-like object is required, not 'NoneType'
Failed to reset (socket error), trying again! Cleaning connection! Something must have gone wrong. Failed to reset (socket error), trying again! Cleaning connection! Something must have gone wrong. Connection with Minecraft client cleaned more than once; restarting.
This can require the restarting of either the gym make of minecraft, which is not a big issue, or my jupyter kernel, which is extremely disruptive to my running experiments.
There are other error messages which I will add to this issue once I encounter them again.
The text was updated successfully, but these errors were encountered: