def test_rapids_funs_basic3(self): DO_FAIL = False if DO_FAIL: bucket = 'home-0xdiag-datasets' csvPathname = 'standard/covtype.data' else: bucket = 'smalldata' csvPathname = 'iris/iris_wheader.csv' hexKey = 'r1' parseResult = h2i.import_parse(bucket=bucket, path=csvPathname, schema='put', hex_key=hexKey) keys = [] # works for 1 pass..why is execExpr set for 2nd pass? should be new instance? # if we reuse the same object in the list, it has state? # do we need to copy the object...hmm for trial in range(1): for execObj in funsList: freshObj = copy(execObj) result = freshObj.do() # rapids doesn't like complicated params right now? if DO_FAIL: a = Assign('junk', Fcn('anon', KeyIndexed('r1', col=0)), do=False) else: a = Assign('junk', Fcn('anon', 'r1'), do=False) result = a.do(timeoutSecs=60) # rows might be zero! if a.execResult['num_rows'] or a.execResult['num_cols']: keys.append(a.execExpr) print "\nExpressions that created keys" for k in keys: print k # for execExpr in exprList: # h2e.exec_expr(execExpr=execExpr, resultKey=None, timeoutSecs=10) h2o.check_sandbox_for_errors()
def test_rapids_funs_basic3(self): DO_FAIL = False if DO_FAIL: bucket = 'home-0xdiag-datasets' csvPathname = 'standard/covtype.data' else: bucket = 'smalldata' csvPathname = 'iris/iris_wheader.csv' hexKey = 'r1' parseResult = h2i.import_parse(bucket=bucket, path=csvPathname, schema='put', hex_key=hexKey) keys = [] # works for 1 pass..why is execExpr set for 2nd pass? should be new instance? # if we reuse the same object in the list, it has state? # do we need to copy the object...hmm for trial in range(1): for execObj in funsList: freshObj = copy(execObj) result = freshObj.do() # rapids doesn't like complicated params right now? if DO_FAIL: a = Assign('junk', Fcn('anon', KeyIndexed('r1',col=0)), do=False) else: a = Assign('junk', Fcn('anon', 'r1'), do=False) result = a.do(timeoutSecs=60) # rows might be zero! if a.execResult['num_rows'] or a.execResult['num_cols']: keys.append(a.execExpr) print "\nExpressions that created keys" for k in keys: print k # for execExpr in exprList: # h2e.exec_expr(execExpr=execExpr, resultKey=None, timeoutSecs=10) h2o.check_sandbox_for_errors()
def test_rapids_funs_1000_stmnt(self): DO_FAIL = False if DO_FAIL: bucket = 'home-0xdiag-datasets' csvPathname = 'standard/covtype.data' else: bucket = 'smalldata' csvPathname = 'iris/iris_wheader.csv' hexKey = 'r1' parseResult = h2i.import_parse(bucket=bucket, path=csvPathname, schema='put', hex_key=hexKey) keys = [] for trial in range(3): for execObj in funsList: freshObj = copy(execObj) print "ast length:", len(str(freshObj)) result = freshObj.do() # rapids doesn't like complicated params right now? if DO_FAIL: a = Assign('junk', Fcn('anon', KeyIndexed('r1',col=0))) else: a = Assign('junk', Fcn('anon', 'r1')) result = a.do(timeoutSecs=60) # rows might be zero! if a.execResult['num_rows'] or a.execResult['num_cols']: keys.append(a.execExpr) print "\nExpressions that created keys" for k in keys: print k # for execExpr in exprList: # h2e.exec_expr(execExpr=execExpr, resultKey=None, timeoutSecs=10) h2o.check_sandbox_for_errors()