Unverified Commit c5d8449f authored by Benjamin Beyret's avatar Benjamin Beyret Committed by GitHub
Browse files

Add agent reset to testDocker loop

Add agent reset to testDocker loop
parents b5d62c69 68293a60
......@@ -18,7 +18,7 @@ work on the ML Agents `BrainInfo` you can access them via `info['brain_info']`
~~**NEW (v1.0.4)**: you can now select the resolution of the observation your agent takes as input, this argument will be passed to the environment directly (must be between 4 and 256)~~ (this option was removed, for evaluation inputs are 84x84, [see discussion](https://github.com/beyretb/AnimalAI-Olympics/issues/61#issuecomment-521933419))
Make sure any data loaded in the docker is referred to using **absolute paths** in the container or the form `/aaio/data/...` (see below). An example that you can modify is provided [here](https://github.com/beyretb/AnimalAI-Olympics/blob/master/examples/submission/agent.py)
Make sure any data loaded in the docker image is referred to using **absolute paths** in the container or the form `/aaio/data/...` (see below). An example that you can modify is provided [here](https://github.com/beyretb/AnimalAI-Olympics/blob/master/examples/submission/agent.py)
## Create an EvalAI account and add submission details
......@@ -50,7 +50,7 @@ If your submission only requires the `animalai-train` library to run, you can us
docker build --tag=submission .
```
You can give your docker the name you want, it does not have to be `submission`. Note that the Dockerfile creates two
You can give your docker image the name you want, it does not have to be `submission`. Note that the Dockerfile creates two
folders `/aaio` and `/aaio/data` at the root of the image, and copies the `agent.py` file and `data` folder from your local machine into the image. Your submission must keep this architecture. References to these folders in
your code **should use absolute paths** (see the example agent provided in `examples/submission`).
......@@ -76,7 +76,7 @@ You can now submit your image to EvalAI for evaluation as explained on the [Eval
**Note**: the phase name to use when pushing is: `animalai-main-396`. To push your image use `evalai push <image>:<tag> --phase animalai-main-396` (details are at the bottom of the EvalAI page linked above).
## Docker evaluation and results
## Docker image evaluation and results
On the EvalAI page you will see that the number of valid submissions is limited to one a day. A submission is valid if it fulfils the following requirements:
......
......@@ -52,6 +52,12 @@ def main():
env.reset(arenas_configurations=arena_config_in)
cumulated_reward = 0
print('Episode {} starting'.format(k))
try:
submitted_agent.reset(t=arena_config_in.arenas[0].t)
except Exception as e:
print('Agent reset failed during episode {}'.format(k))
raise e
try:
obs, reward, done, info = env.step([0, 0])
for i in range(arena_config_in.arenas[0].t):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment