#!/usr/bin/env python
import sys
-sys.path.append('.')
+#sys.path.append('.')
import moe
import moe.config
import os
e = moe.eval.Eval()
-
try:
- overrides = moe.config.parse_overrides(sys.argv)
- e.builtins.set("HOME", ".")
- e.builtins.set("TASK", "sum")
- e.builtins.set("CONTESTANT", "mj")
- e.log.progress("### Evaluating task %s of contestant %s ###\n\n" % (e['TASK'], e['CONTESTANT']))
- e.init(overrides)
-except moe.MoeError, err:
- e.log.shout("FATAL: %s\n" % err)
+ e.init(['TASK = "sum"; CONTESTANT = "mj"; SOURCE = "som_sol.c"; VERBOSE = "2"'] + sys.argv[1:])
+ e.log.debug("### Evaluating task %s of contestant %s ###\n\n" % (e['TASK'], e['CONTESTANT']))
+ try:
+ e.run()
+ except moe.SolutionError, err: # Why are we catching this?
+ e.status["error"] = err
+ e.log.user.error(err)
+ e.log.exception()
+except:
+ e.log.exception("Moe fatal error")
sys.exit(1)
-
-try:
- if len(sys.argv) > 1:
- file = sys.argv[1]
- else:
- file = None
- moe.batch.locate(e, file)
- e.run()
-except moe.MoeError, err:
- e.log.shout("FATAL: %s\n" % err)
- sys.exit(1)
-except moe.SolutionError, err:
- e.stat["error"] = err
- e.log.shout("%s\n" % err)
-except Exception:
- moe.log.fatal_exception()
-
-moe.log.default.progress_file.write("\nFinal status file:\n")
-e.stat.write(file=moe.log.default.progress_file)