def test_random_guess(self): d1 = tuple([1, 5]) d2 = ["red", "green", "blue"] dims = [d1, d2] rg = random_guess(dims) self.assertTrue(rg[0] in [1, 2, 3, 4, 5]) self.assertTrue(rg[1] in d2)
def run_workflows(): TESTDB_NAME = 'rsled' launchpad = LaunchPad(name=TESTDB_NAME) # clean up tw database if necessary launchpad.reset(password=None, require_password=False) # load 10 batch workflows onto the launchpad for _ in range(10): launchpad.add_wf(wf_creator(random_guess(X_dim))) rapidfire(launchpad, nlaunches=10, sleep_time=0)
def load_parallel_wfs(n_processes): for i in range(n_processes): launchpad.add_wf(wf_creator(random_guess(dims)))