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

NIPS 2017: Learning to Run

Reinforcement learning environments with musculoskeletal models


Completed
2154
Submissions
630
Participants
91889
Views

submit.py || Connection error

Posted by Ish_ over 2 years ago

Getting connection error while executing submit.py

Traceback (most recent call last): File “submit.py”, line 19, in observation = client.env_create(args.token) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 52, in env_create resp = self._post_request(route, data) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 39, in _post_request data=json.dumps(data)) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/requests/sessions.py", line 549, in post return self.request('POST', url, data=data, json=json, **kwargs) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/requests/sessions.py", line 502, in request resp = self.send(prep, **send_kwargs) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/requests/sessions.py", line 612, in send r = adapter.send(request, **kwargs) File "/Users/Ish/anaconda/envs/opensim-rl/lib/python2.7/site-packages/requests/adapters.py", line 490, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))

1

Posted by Lukasz  over 2 years ago |  Quote

Thanks for participating! Actually, just on the launch of the challenge, we changed the port of the grader server, sorry for that. Please try the updated environment or just set remote_base = "http://grader.crowdai.org:1729"

1

Posted by Ish_  over 2 years ago |  Quote

Thanks a lot. It’s working now :)

1

Posted by Anton_Pechenko  over 2 years ago |  Quote

I have problem with submit

$ python submit2.py [2017-07-15 01:12:37,033] POST http://grader.crowdai.org:1729/v1/envs/ {“env_id”: “Run”, “token”: “my key”} Traceback (most recent call last): File “submit2.py”, line 12, in observation = client.env_create(crowdai_token) File "/home/anton/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 52, in env_create resp = self._post_request(route, data) File "/home/anton/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 40, in _post_request return self._parse_server_error_or_raise_for_status(resp) File "/home/anton/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 31, in _parse_server_error_or_raise_for_status raise ServerError(message=j["message"], status_code=resp.status_code) osim.http.client.ServerError

with sample code

import opensim as osim from osim.http.client import Client from osim.env import RunEnv

Settings

remote_base = “http://grader.crowdai.org:1729” crowdai_token = “my key”

client = Client(remote_base)

Create environment

observation = client.env_create(crowdai_token)

IMPLEMENTATION OF YOUR CONTROLLER

# my_controller = … (for example the one trained in keras_rl)

while True: [observation, reward, done, info] = client.env_step(my_controller(observation), True) print(observation) if done: observation = client.env_reset() if not observation: break

client.submit()

Please, help if possible

Posted by LiberiFatali  over 2 years ago |  Quote

@Anton: osim-rl was updated to v1.3, I think you need to reinstall it https://github.com/stanfordnmbl/osim-rl/issues/40