source: trunk/eval/config.php.sample @ 1184

Revision 1183, 1.5 KB checked in by bogdan2412, 4 weeks ago (diff)

Refactor eval code in preparation for new task types.

Previously, our eval code consisted of a 300 line method in
classic_grader.php, which was painful. :(

I've split the functionality into separate methods inside a BaseGrader?
and ClassicGrader? class. BaseGrader? provides functionality which is
common for all task types such as setting up a jail, compiling
evaluators, handling test groups, judging outputs (via diff or custom
evaluator), etc. Every different type of task will require a new class
which extends the BaseGrader? and implements the method testCaseJudge
which will contain the task type's specific behaviour. Other methods
in BaseGrader? can be subclassed as well: for example, for output only
tasks one would replace the 'compile user source code' method with a
'extract user outputs' method.

REVIEW URL: http://reviewboard.infoarena.ro/r/205/

  • Property svn:eol-style set to native
Line 
1<?php
2
3// link main configuration
4require_once(dirname($argv[0]) . '/../config.php');
5
6// Judge username/password, used via HTTP AUTH basic to download tests and
7// graders. Judge has to have admin access.
8// Set a strong & secret password when putting this into production.
9// Default works with svn.
10define("IA_JUDGE_USERNAME", 'eval');
11define("IA_JUDGE_PASSWORD", 'eval');
12
13// Poll interval, in miliseconds.
14define("IA_JUDGE_POLL_INTERVAL", 100);
15
16// The user to run unsafe code as. This defaults to nobody.
17define("IA_JUDGE_JRUN_UID", 65534);
18
19// The group to run unsafe code as. This defaults to nobody.
20define("IA_JUDGE_JRUN_GID", 65534);
21
22// Niceness to run the unsafe code. 0 disables.
23define("IA_JUDGE_JRUN_NICE", 0);
24
25// Time limit for graders.
26define("IA_JUDGE_TASK_EVAL_TIMELIMIT", 5000);
27
28// Memory limit for graders.
29define("IA_JUDGE_TASK_EVAL_MEMLIMIT", 64000);
30
31// Maximum score per task.
32define("IA_JUDGE_MAX_SCORE", 100);
33
34// Maximum length allowed for a evaluator's feedback message
35define("IA_JUDGE_MAX_EVAL_MESSAGE", 100);
36
37// If true then keep all jails forever.
38// This is useful in finding judge bugs.
39define("IA_JUDGE_KEEP_JAILS", true);
40
41// Retry downloading grader data.
42define("IA_JUDGE_MAX_GRADER_DOWNLOAD_RETRIES", 5);
43
44// Add log timestamps.
45// FIXME: horrible hack.
46define("IA_LOG_TIMESTAMP_FORMAT", "Y-m-d H:i:s");
47
48// Python support.
49define("IA_JUDGE_PY_DISTRO", "~/external/Python-2.6.1");
50define("IA_JUDGE_PY_COMPILER",
51       IA_ROOT_DIR."scripts/pybin.sh ".IA_JUDGE_PY_DISTRO." ".
52       IA_ROOT_DIR."eval/temp");
53
54?>
Note: See TracBrowser for help on using the repository browser.