2015-11-11 22:10:41 +01:00
<h1>Challenge How To
2017-09-28 20:44:44 +02:00
<h2>Install GEval (recommended, but not obligatory)
2015-11-11 22:10:41 +01:00
2018-04-09 11:38:34 +02:00
<h4>option A — install GEval with Haskell Stack (needs some time and a couple of gigabytes of hard disk space)
2017-09-23 15:45:14 +02:00
<p>In order to evaluate your work locally, you need the GEval tool. First, install <a href="https://docs.haskellstack.org/en/stable/README/">Haskell Stack</a>:
<pre>
curl -sSL https://get.haskellstack.org/ | sh
<p>and then install GEval itself:
2015-11-11 22:10:41 +01:00
<pre>
git clone git://gonito.net/geval
cd geval
stack setup
stack install
2018-04-09 11:38:34 +02:00
~/.local/bin/geval --help
2015-11-11 22:10:41 +01:00
2018-04-09 11:38:34 +02:00
<h4>option B — just download the GEval binary (simpler if you have a standard 64-bit Linux)
2017-09-28 20:44:44 +02:00
<pre>
2018-06-09 20:22:53 +02:00
wget <a href="https://gonito.net/get/bin/geval">https://gonito.net/get/bin/geval</a>
2018-04-09 11:38:34 +02:00
chmod u+x geval
./geval --help
2017-09-28 20:44:44 +02:00
<p>(GEval will make your life easier, but is not obligatory, so if you have any trouble with installing/running GEval, you can skip this step, for the time being.)
2017-09-23 15:45:14 +02:00
2015-11-11 22:10:41 +01:00
<h2>Get your repo
2018-06-06 10:30:53 +02:00
$case (appRepoScheme settings)
$of SelfHosted
$if not isIDSet || not isSSHUploaded
<p>You need to
$if not isIDSet
\ set up your ID
$if not isSSHUploaded
\ and
$if not isSSHUploaded
\ upload your SSH public key
\ (see <a href="@{YourAccountR}">your account</a>) if you want to have a repo hosted on Gonito.net, then:
2015-11-11 22:10:41 +01:00
2018-06-06 10:30:53 +02:00
<pre>
2018-10-15 14:19:20 +02:00
git clone --single-branch #{appRepoHost settings}#{shownId}/#{challengeName challenge}
2017-10-03 22:19:18 +02:00
2018-06-06 10:30:53 +02:00
<p>(Warning about empty repository is expected, don't worry about it.)
2017-10-03 22:19:18 +02:00
2018-06-06 10:30:53 +02:00
<pre>
cd #{challengeName challenge}
git pull #{appRepoHost settings}#{challengeName challenge}
<p>(Alternatively, you can use any other Git repo, e.g. GitLab, make sure Gonito.net has access to your repo.)
$of Branches
<p>Clone the repo:
<pre>
2018-10-15 14:19:20 +02:00
git clone --single-branch #{repoUrl repo}
2015-11-11 22:10:41 +01:00
2018-06-06 10:30:53 +02:00
$maybe gitAnnexRemote <- (repoGitAnnexRemote repo)
<pre>
git annex init
git annex initremote storage #{gitAnnexRemote}
git annex get --from storage
<p>Switch to some branch, let's say <tt>my-brilliant-solution</tt>:
<pre>
git checkout -b my-brilliant-solution
2017-09-23 15:45:14 +02:00
2015-11-11 22:10:41 +01:00
<h2>Work on your solution
<p>You need to generate your solution for the test set as <tt>test-A/out.tsv</tt>. You may also generate the solution for the dev set (<tt>dev-0/out.tsv</tt>).
<p>You can evaluate results for the dev set locally:
<pre>
cd #{challengeName challenge}
geval --test-name dev-0
2017-09-28 16:51:10 +02:00
<h2>Push your solution to the git repo
2015-11-11 22:10:41 +01:00
2017-09-28 16:51:10 +02:00
<p>Commit and push <tt>out.tsv</tt> files to your repo. It is also recommended to push your source codes along with <tt>out.tsv</tt> files.
2015-11-11 22:10:41 +01:00
<pre>
cd #{challengeName challenge}
2018-06-06 10:30:53 +02:00
git add foo.py build.sh # add your source codes
2018-07-28 21:36:45 +02:00
$if isJust (repoGitAnnexRemote repo)
2018-06-06 10:30:53 +02:00
<pre>
# if your output files are large or if they should not pushed to the regular repo (e.g. contain sensitive information):
git annex add dev-0/out.tsv test-A/out.tsv
git annex copy --to storage
# otherwise (e.g. they are just class labels), add the output files in a regular manner:
git add dev-0/out.tsv test-A/out.tsv
2018-07-28 21:36:45 +02:00
$else
2018-06-06 10:30:53 +02:00
<pre>
git add dev-0/out.tsv test-A/out.tsv # add your output files
<pre>
2015-11-11 22:10:41 +01:00
git commit -m 'my brilliant solution'
2018-06-06 10:30:53 +02:00
$case (appRepoScheme settings)
$of SelfHosted
<pre>
git push origin master
2018-09-01 11:06:42 +02:00
<h3>Repos hosted on Gonito.net
<p>If you use a repo hosted here, a submission and evaluation is triggered automatically. You'll see the evaluation results in your console while pushing.
2018-06-06 10:30:53 +02:00
$of Branches
<pre>
git push origin my-brilliant-solution:my-brilliant-solution
2015-11-11 22:10:41 +01:00
2017-09-28 16:51:10 +02:00
<h3>External repos
2018-09-01 11:06:42 +02:00
<p>If you use an external repo (e.g. at your own of Gitolite or at GitLab/GitHub), you can configure a webhook.
2017-09-28 16:51:10 +02:00
$maybe token <- mToken
<p>Your webook is:
<pre>
2018-09-01 11:06:42 +02:00
wget --timeout=0 --quiet -O - '#{appRoot settings}/trigger-remotely' --post-data 'token=#{token}&branch=#{myBranch}&challenge=#{challengeName challenge}&url=URL_TO_YOUR_REPO'
2017-09-28 16:51:10 +02:00
<h3>Manual submission
<p>In case other methods fail, you can submit your solution manually — go to the <a href="@{ChallengeSubmissionR $ challengeName challenge}">submit form</a>.
2018-10-06 23:30:12 +02:00
<h2>Submission metadata
<p>Gonito can take the description, tags and parameters of a submission from a number of sources (in order of precedence):
<ol>
<li>submission form (when submitting manually),
<li>git commit message,
<li>names of output files (only for parameters)
<p>It might seem a little bit complicated, but you could simply use the method which is the most convenient for you.