def setUpClass(cls): print "setUpClass" h2o.build_cloud_with_json() # normally this shouldn't be necessary? h2o.stabilize_cloud(h2o.nodes[0], node_count=len(h2o.nodes), timeoutSecs=90)
def setUpClass(cls): print "setUpClass" # standard method for being able to reproduce the random.* seed h2o.setup_random_seed() h2o.build_cloud_with_json() # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize # normally this is baked into build_cloud, but let's leave it here for now h2o.stabilize_cloud(h2o.nodes[0], node_count=len(h2o.nodes), timeoutSecs=90) # this ?should? work although not guaranteed all will agree on the cloud size # unless we do the conservative stabilize above h2o.verify_cloud_size()
def quick_startup(num_babies=3, sigar=False): babies = [] try: for i in xrange(num_babies): # ports_per_node now 3. inc to avoid sticky ports babies.append(h2o.LocalH2O(port=54321+3*i, sigar=sigar)) n = h2o.ExternalH2O(port=54321) h2o.stabilize_cloud(n, num_babies) except Exception, e: print e err = 'Error starting %d nodes quickly (sigar is %s)' % (num_babies,'enabled' if sigar else 'disabled') raise Exception(err)
def quick_startup(num_babies=3, sigar=False): babies = [] ports_per_node = 3 try: for i in xrange(num_babies): # ports_per_node now 3. inc to avoid sticky ports babies.append( h2o.LocalH2O(port=54321 + ports_per_node * i, sigar=sigar)) n = h2o.ExternalH2O(port=54321) h2o.stabilize_cloud(n, num_babies) except Exception, e: print e err = 'Error starting %d nodes quickly (sigar is %s)' % ( num_babies, 'enabled' if sigar else 'disabled') raise Exception(err)
def setUpClass(cls): print "setUpClass" # standard method for being able to reproduce the random.* seed h2o.setup_random_seed() # do a hack so we can run release tests with a -cj arg. so we don't have to build the cloud separately # those tests will always want to run non-local (big machien) so detecting -cj is fine if h2o.config_json: h2o_hosts.build_cloud_with_hosts() else: # this is the normal thing for release tests (separate cloud was built. clone it) h2o.build_cloud_with_json() # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize # normally this is baked into build_cloud, but let's leave it here for now h2o.stabilize_cloud(h2o.nodes[0], h2o.nodes, timeoutSecs=90) # this ?should? work although not guaranteed all will agree on the cloud size # unless we do the conservative stabilize above h2o.verify_cloud_size()
def setUpClass(cls): print "setUpClass" # standard method for being able to reproduce the random.* seed h2o.setup_random_seed() # do a hack so we can run release tests with a -cj arg. so we don't have to build the cloud separately # those tests will always want to run non-local (big machien) so detecting -cj is fine if h2o.config_json: h2o_hosts.build_cloud_with_hosts() else: # this is the normal thing for release tests (separate cloud was built. clone it) h2o.build_cloud_with_json() # if you're fast with a test and cloud building, you may need to wait for cloud to stabilize # normally this is baked into build_cloud, but let's leave it here for now h2o.stabilize_cloud(h2o.nodes[0], node_count=len(h2o.nodes), timeoutSecs=90) # this ?should? work although not guaranteed all will agree on the cloud size # unless we do the conservative stabilize above h2o.verify_cloud_size()
import h2o, cmd nodes_per_host = 2 hosts = [ h2o.RemoteHost('rufus.local', 'fowles'), h2o.RemoteHost('eiji.local', 'boots'), ] # pulling this out front, because I want all the nodes # to come up quickly and fight with each other for h in hosts: print 'Uploading jar to', h h.upload_file(h2o.find_file('target/h2o.jar')) nodes = [] for h in hosts: for i in xrange(nodes_per_host): print 'Starting node', i, 'via', h nodes.append(h.remote_h2o(port=54321 + i*3)) print 'Stabilize' h2o.stabilize_cloud(nodes[0], len(nodes)) print 'Random Forest' cmd.runRF(nodes[0], h2o.find_file('smalldata/poker/poker-hand-testing.data'), trees=10, timeoutSecs=60) print 'Completed'
import h2o, cmd nodes_per_host = 2 hosts = [ h2o.RemoteHost('rufus.local', 'fowles'), h2o.RemoteHost('eiji.local', 'boots'), ] # pulling this out front, because I want all the nodes # to come up quickly and fight with each other for h in hosts: print 'Uploading jar to', h h.upload_file(h2o.find_file('target/h2o.jar')) nodes = [] for h in hosts: for i in xrange(nodes_per_host): print 'Starting node', i, 'via', h nodes.append(h.remote_h2o(port=54321 + i * 3)) print 'Stabilize' h2o.stabilize_cloud(nodes[0], len(nodes)) print 'Random Forest' cmd.runRF(nodes[0], h2o.find_file('smalldata/poker/poker-hand-testing.data'), trees=10, timeoutSecs=60) print 'Completed'