Loading
Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more

crowdAI is shutting down - please read our blog post for more information

NeurIPS 2018: AI for Prosthetics Challenge

Reinforcement learning with musculoskeletal models


Completed
4575
Submissions
477
Participants
67144
Views

[Submit Fail] Connection reset by peer

Posted by MT_AI_Crew over 1 year ago

I try to Submit my result, but “Connection reset by peer” occur every time

Traceback (most recent call last): File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 600, in urlopen chunked=chunked) File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 384, in _make_request six.raise_from(e, None) File “", line 2, in raise_from File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 1331, in getresponse response.begin() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) ConnectionResetError: [Errno 54] Connection reset by peer

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/requests/adapters.py”, line 445, in send timeout=timeout File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 638, in urlopen _stacktrace=sys.exc_info()[2]) File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/util/retry.py”, line 367, in increment raise six.reraise(type(error), error, _stacktrace) File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/packages/six.py”, line 685, in reraise raise value.with_traceback(tb) File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 600, in urlopen chunked=chunked) File “/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py”, line 384, in _make_request six.raise_from(e, None) File “", line 2, in raise_from File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, in _make_request httplib_response = conn.getresponse() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 1331, in getresponse response.begin() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 297, in begin version, status, reason = self._read_status() File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/http/client.py", line 258, in _read_status line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1") File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/socket.py", line 586, in readinto return self._sock.recv_into(b) urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File “submit.py”, line 136, in [observation, reward, done, info] = client.env_step(action.tolist()) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/osim/http/client.py", line 72, in env_step resp = self._post_request(route, data) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/osim/http/client.py", line 41, in _post_request data=json.dumps(data)) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/requests/sessions.py", line 559, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/requests/sessions.py", line 512, in request resp = self.send(prep, **send_kwargs) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/requests/sessions.py", line 622, in send r = adapter.send(request, **kwargs) File "/Users/Weapon/anaconda/envs/opensim3/lib/python3.6/site-packages/requests/adapters.py", line 495, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', ConnectionResetError(54, 'Connection reset by peer'))

My Submit Code: …………………… args = parse_args()

remote_base = 'http://grader.crowdai.org:1729'
client = Client(remote_base)

args.token = '*****************'
observation = client.env_create(args.token, env_id="ProstheticsEnv")
  
agent = get_agent(args)
saver = tf.train.Saver()

episode_reward = 0.
step = 0

with tf.Session() as sess:
    agent.initialize(sess)
    print("EVAL Model: {}".format(args.load_model))
    saver.restore(sess,args.load_model)
    while True:
        observation = agent.ob2state(observation)
        action, q = agent.pi(observation, apply_noise=False, compute_Q=True)
        [observation, reward, done, info] = client.env_step(action.tolist())
        step += 1
        episode_reward += reward

        if done:
            print("Reward: {}, Step: {}".format(episode_reward, step))
            observation = client.env_reset()
            episode_reward = 0.
            step = 0
            if not observation:
                break

client.submit()

Posted by ItsHighNoonBangBangBang  over 1 year ago |  Quote

I encountered the same issue! one of my submission is always successful while another which repeats action twice always crashes after taking this action: POST http://grader.crowdai.org:1729/v1/envs/8078___78cb73746b/step/ {“action”: [1.0, 0.0, 1.0, 0.0, 1.0, 0.11727721244096756, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], “render”: true}