def test_config2(self): try: config.read(testfile('config2.txt')) except: assert True else: assert False
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()
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]
def test_config1(self): config.read(testfile('config1.txt'))
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]