예제 #1
0
 def test_config2(self):
     try:
         config.read(testfile('config2.txt'))
     except: 
         assert True
     else: 
         assert False
예제 #2
0
 def test_config2(self):
     try:
         config.read(testfile('config2.txt'))
     except:
         assert True
     else:
         assert False
예제 #3
0
def run(configfile=None):
    try:
        configfile = configfile or sys.argv[2]
    except:
        usage("Please specify a config file.")

    config.read(configfile)

    numtasks = config.get('learner.numtasks')
    tasks = learner.fromconfig().split(numtasks)

    controller = taskcontroller.fromconfig()
    results = controller.run(tasks)

    merged_result = result.merge(results)
    if config.get('result.format') == 'html':
        merged_result.tohtml()
    else:
        merged_result.tofile()
예제 #4
0
def run(configfile=None):
    try:
        configfile = configfile or sys.argv[2]
    except:
        usage("Please specify a config file.")

    config.read(configfile)

    numtasks = config.get('learner.numtasks')
    tasks = learner.fromconfig().split(numtasks)

    controller = taskcontroller.fromconfig()
    results = controller.run(tasks)

    merged_result = result.merge(results)
    if config.get('result.format') == 'html':
        merged_result.tohtml()
    else:
        merged_result.tofile()
예제 #5
0
파일: test_xgrid.py 프로젝트: Anaphory/pebl
from pebl.taskcontroller import xgrid
from pebl.test import testfile

help = """Test the Xgrid TaskController.

USAGE: test_xgrid.py configfile

You need to provide the configfile for use with XGridController.

###############################################################################
    WARNING for pebl devs: 
        Do NOT put your configfile under svn. 
        It contains sensitve information.
###############################################################################
"""

if len(sys.argv) < 2:
    print help
    sys.exit(1)

config.read(sys.argv[1])
d = data.fromfile(testfile("testdata5.txt"))
d.discretize()

tc = xgrid.XgridController()
results = tc.run([greedy.GreedyLearner(d, max_time=10) for i in xrange(10)])
results = result.merge(results)

print results
print [r.host for r in results.runs]
예제 #6
0
 def test_config1(self):
     config.read(testfile('config1.txt'))
예제 #7
0
 def test_config1(self):
     config.read(testfile('config1.txt'))
예제 #8
0
파일: test_xgrid.py 프로젝트: while519/pebl
from pebl.taskcontroller import xgrid
from pebl.test import testfile

help = """Test the Xgrid TaskController.

USAGE: test_xgrid.py configfile

You need to provide the configfile for use with XGridController.

###############################################################################
    WARNING for pebl devs: 
        Do NOT put your configfile under svn. 
        It contains sensitve information.
###############################################################################
"""

if len(sys.argv) < 2:
    print help
    sys.exit(1)

config.read(sys.argv[1])
d = data.fromfile(testfile("testdata5.txt"))
d.discretize()

tc = xgrid.XgridController()
results = tc.run([greedy.GreedyLearner(d, max_time=10) for i in xrange(10)])
results = result.merge(results)

print results
print[r.host for r in results.runs]