Skip to content

Commit e4217e1

Browse files
committed
updated readme
1 parent 64f1a90 commit e4217e1

File tree

1 file changed

+38
-10
lines changed

1 file changed

+38
-10
lines changed

README.md

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ Our template supports both the "submit data" and "submit code" submission styles
1414
<your code>
1515
```
1616

17-
The `/solution/solution.csv` is the output your algorithm generates on the provisional test set. The format of this file will be described in the challenge specification.
17+
The file `/solution/solution.csv` is the output your algorithm generates on the provisional test set. The format of this file will be described in the challenge specification.
1818

19-
The `/code` directory should contain a dockerized version of your system that will be used to reproduce your results in a well defined, standardized way. This folder must contain a `Dockerfile` that will be used to build a docker container that will host your system during final testing. How you organize the rest of the contents of the `/code` folder is up to you, as long as it satisfies the requirements listed below in the Final testing section.
19+
The `/code` directory should contain a dockerized version of your system that will be used to reproduce your results in a well defined, standardized way. This folder must contain a `Dockerfile` that will be used to build a docker container that will host your system during final testing. How you organize the rest of the contents of the `/code` folder is up to you, as long as it satisfies the requirements listed below in the Final testing section. This repository contains code created in a toy challenge, for demonstration only. See the [Sample challenge](#a-sample-challenge) section at the end of this document for details.
2020

2121
#### Notes:
2222
- During provisional testing only your `solution.csv` file will be used for scoring, however the tester tool will verify that your submission file conforms to the required format. This means that at least the `/code/Dockerfile` must be present from day 1, even if it doesn't describe any meaningful system to be built. However, we recommend that you keep working on the dockerized version of your code as the challenge progresses, especially if you are at or close to a prize winning rank on the provisional leaderboard.
@@ -27,7 +27,6 @@ The `/code` directory should contain a dockerized version of your system that wi
2727

2828
- Make sure that the contents of the `/solution` and `/code` folders are in sync, i.e. your solution.csv file contains the exact output of the current version of your code.
2929

30-
3130
## Final testing
3231

3332
To be able to successfully submit your system for final testing, some familiarity with [Docker](https://www.docker.com/) is required. If you have not used this technology before then you may first check [this page](https://www.docker.com/why-docker) and other learning material linked from there. To install Docker follow [these instructions](https://www.docker.com/community-edition).
@@ -56,11 +55,6 @@ docker run -v <local_data_path>:/data:ro -v <local_writable_area_path>:/wdata -i
5655
```
5756
command, where the `-v` parameter mounts the contest's data to the container's `/data` folder. This means that all the raw contest data will be available for your container within the `/data` folder. Note that your container will have read only access to the `/data` folder. You can store large temporary files in the `/wdata` folder.
5857

59-
To validate the template file supplied with this repo, you can execute the following command:
60-
```
61-
docker run -it <id>
62-
```
63-
6458
#### Custom docker options
6559
In some cases it may be necessary to pass custom options to the `docker` or `nvidia-docker` commands. If you need such flags, you should list them in a file named `flags.txt` and place this file in the `/code` folder of your submission. The file must contain a single line only. If this file exists then its content will be added to the options list of the `docker run` command.
6660

@@ -122,9 +116,13 @@ data/
122116
// e.g. unlabeled images
123117
```
124118
## Code requirements
125-
Your training and inference scripts must output progress information. This may be as detailed as you wish but at the minimum it should contain the number of test cases processed so far.
119+
Your training and inference scripts must output progress information. This may be as detailed as you wish but at the minimum it should contain the number of test cases processed so far.
120+
121+
Your testing code must process the test and validation data the same way, that is it must not contain any conditional logic based on whether it works on data that you have already downloaded or on unseen data.
122+
123+
Your `Dockerfile` must not contain `CMD` or `ENTRYPOINT` commands.
126124

127-
Your testing code must process the test and validation data the same way, that is it must not contain any conditional logic based on whether it works on data that you have already downloaded or on unseen data.
125+
Your `Dockerfile` must contain a `WORKDIR` command that makes sure that when the container starts the `test.sh` and `train.sh` scripts will be found in the current directory.
128126

129127

130128
## Verification workflow
@@ -135,3 +133,33 @@ Your testing code must process the test and validation data the same way, that i
135133

136134
A note on reproducibility: we are aware that it is not always possible to reproduce the exact same results. E.g. if you do online training then the difference in the training environments may result in different number of iterations, meaning different models. Also you may have no control over random number generation in certain 3rd party libraries. In any case, the results must be statistically similar, and in case of differences you must have a convincing explanation why the same result can not be reproduced.
137135

136+
## A sample challenge
137+
For demonstration only, this repository contains code for a hypothetical challenge in which your task is to predict weight of people based on their height. To illustrate the task, the `code/data` folder contains a simple training and testing file. These files generally need not be part of your submission, in this case this is added only so that you can test the sample code.
138+
139+
Assume that in this challenge `train.sh` is specified to take a single parameter: the location of a file containing training data. In a typical challange this would rather be a folder containg several files that store training data, but for simplicity we have a single training file now.
140+
141+
Similarly, `test.sh` takes two parameters: path to a testing file (again, in real challenges this is typically a folder) and an output file name.
142+
143+
Both these scripts forward their parameters to a solution written in Java, and they also pass an internal parameter: the location of a simple 'model' file. This demonstrates that the communication between the train and test scrips and the rest of your system is up to you, the testing environment is only interested in whether you comply to the input / output requirements of the train and test scripts.
144+
145+
During training the `sample.submission.Tester` class calculates linear regression parameters from the provided training data, which is written to `/model/dummy-model.txt` and this will be used during testing by the `sample.submission.Tester` class. Make sure that the model files required during testing are already packaged in your submission (or downloaded during building your container), so that testing is possible without running training first.
146+
147+
### Running the sample
148+
Build the container from within the `/code` folder by
149+
`docker build -t docker-template .`
150+
151+
Note that the build process makes sure that the Java files get compiled.
152+
153+
Launch the container with
154+
`docker run -it docker-template`
155+
156+
Verify that testing works out of the box. Within the container, run
157+
`./test.sh ./data/testing.txt ./data/solution.csv`
158+
159+
This should create a `solution.csv` file within the `/data` folder. This should be identical that is already present in the submission's `/solution` folder.
160+
161+
Verify that training works:
162+
`./train.sh ./data/training.txt`
163+
164+
This should overwrite the `/model/dummy-model.txt` file, so subsequent testing will use the new model instead of the one shipped with the submission.
165+

0 commit comments

Comments
 (0)