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

Learning How to Walk

Reinforcement learning environments with musculoskeletal models


Completed
200
Submissions
125
Participants
18142
Views

Setting up the submission script

Posted by ViktorM over 2 years ago

1) What are the associated CrowdAI Server and the ChallengeID that I should fill into the localsettings.py ? It would be nice if localsettings.py.example has this data fiiled in. And I can’t find any information on ChallengeID on the challenge page. 2) Am I right that after entering the correct data mentioned in point ! should only run python gym_http_server.py -p 80 -l 127.0.0.1 and then just ran python submit.py … every time I want to submit a new solution?

Posted by spMohanty  over 2 years ago |  Quote

Hi @ViktorM,

You do not need to setup the crowdAI server to submit solutions. You can try out this script to submit an example solution : https://github.com/stanfordnmbl/osim-rl/blob/master/scripts/submit.py

But can you elaborate on what exactly is your use case ? Are you trying to submit a solution in the challenge ? or are you trying to setup a parallel instance of crowdAI server using the code on Github ?

Cheers, Mohanty

Posted by ViktorM  over 2 years ago |  Quote

I’m trying to submit a solution for the challenge. But setup script didn’t work for me either. I’ve got an error:

File “submit_cdqn.py”, line 68 client = Client(remote_base) ^ SyntaxError: invalid syntax

I’ve already set my CROWDAI_TOKEN.

Posted by spMohanty  over 2 years ago |  Quote

Hi @ViktorM,

This looks more like a syntax error in your code and not in the submission per se ?

If you add the relevant block of code in your script which deals with submission, I can try to tell you more on where things are wrong.

Best Regards. Mohanty

Posted by ViktorM  over 2 years ago |  Quote

Hi,

You were right, thanks, there was a syntax error in that case. I’m trying base submit.py script for some other agent. I’ve fixed that error and I’ve met some more:

1) One of them was simple: TypeError: env_create() takes exactly 2 arguments (3 given) due to that line: observation = client.env_create(env_id, args.token)

It was fixes simply by removing env_id from the arguments list as:
def env_create(self, token): env_id = “Gait”

Took only one argument and Gait environment is set by default. Looks like at least the script is working now. But after the submit attempt I’ve got such message:

requests.exceptions.ConnectionError: HTTPConnectionPool(host=’54.154.84.135’, port=80): Max retries exceeded with url: /v1/envs/ (Caused by NewConnectionError(‘<requests.packages.urllib3.connection.HTTPConnection object at 0x7f569068d950>: Failed to establish a new connection: [Errno 110] Connection timed out’,))

Does it sounds familiar to you?

Posted by spMohanty  over 2 years ago |  Quote

Hi @ViktorM,

Thats because the grading server is now at grader.crowdai.org (https://github.com/stanfordnmbl/osim-rl/blob/master/scripts/submit.py#L10) And you seem to be trying to connect to the old grading server.

Cheers, Mohanty

Posted by ViktorM  over 2 years ago |  Quote

Looks so that I had an old grading server adress, thanks. After fixing this error now I has another connection error:

Traceback (most recent call last): File “submit_cdqn.py”, line 73, in observation = client.env_create(args.token) File "/home/apexteam/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 53, in env_create resp = self._post_request(route, data) File "/home/apexteam/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/apexteam/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/osim/http/client.py", line 29, in _parse_server_error_or_raise_for_status resp.raise_for_status() File "/home/apexteam/anaconda3/envs/opensim-rl/lib/python2.7/site-packages/requests/models.py", line 909, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: http://grader.crowdai.org/v1/envs/

Posted by AbhinavRai  over 2 years ago |  Quote

Hi,

I am also getting the same error on submission :-

requests.exceptions.HTTPError: 502 Server Error: Bad Gateway for url: http://grader.crowdai.org/v1/envs/

How do I resolve this ? Thanks Abhinav Rai

Posted by spMohanty  over 2 years ago |  Quote

Hi @Abhinav, @ViktorM,

This time it was an issue at our end. The grading server had crashed, but it should be back online again now.

Thanks for pointing out. Cheers, Mohanty

Posted by ViktorM  over 2 years ago |  Quote

Thanks @spMohanty,

Now the submission was succesful.