Runit testing handleSimpleError seems to blow up with something it doesn't like

Description

this was on runit_v_4_createfunctions.R
I would think an error handling function should be more robust to bad input??

http://mr-0xb1:8080/job/h2o_master_DEV_runit_small/1201/artifact/h2o-r/tests/results/testdir_jira_runit_v_4_createfunctions.R.out.txt

> doTest('function', functiontest)
[2015-02-03 22:59:44] [INFO]: ======================== Begin Test ===========================

[2015-02-03 22:59:44] [INFO]: uploading function testing dataset

 

 

0%

 

======================================================================

100%
[2015-02-03 22:59:46] [INFO]: printing from h2o
[2015-02-03 22:59:46] [INFO]: c(1, 3, 5)
[2015-02-03 22:59:46] [INFO]: c(2, 4, 6)
[2015-02-03 22:59:46] [INFO]: applying over 1, 2, 1:2

  1.  

    1.  

      1.  

        1.  

          1.  

            1.  

              1.  

                1. ### #### ##

    2. ## ## ## ##

    3. ## ## ## ##

      1.  

        1.  

          1.  

            1. ## ## ## ##

    4. ######### ## ##

    5. ## ## ## ##

    6. ## ## #### ########

[2015-02-03 22:59:46] [ERROR] : Error: Test failed: 'function'
Not expected: cannot coerce type 'closure' to vector of type 'character'
1: withWarnings(test(conn))
2: withCallingHandlers(expr, warning = wHandler)
3: test(conn)
4: apply(df.h, 1, fn1)
5: apply(df.h, 1, fn1)
6: .handleSimpleError(function (e)
{
e$calls <- head(sys.calls()[-seq_len(frame + 7)], -2)
signalCondition(e)
}, "cannot coerce type 'closure' to vector of type 'character'", quote(as.character(FUN))).

SEED used: 1615091776

[2015-02-03 22:59:46] [ERROR] : TEST FAILED
No traceback available

Activity

Show:
Kevin Normoyle
February 4, 2015, 8:42 AM

Here's the R test...and the h2o java output. I highlighted the Rapids created, in green
there's nothing in the Rapids that looks like an h2o function definition to me.
I think that this must not be sending the function to h2o correctly for the apply.

the test blows up talking about closures. Maybe there's some R code that's broken

the failure..seems like an apply blows up?

has someone being working on functions and apply to h2o?

Not expected: cannot coerce type 'closure' to vector of type 'character'
1: withWarnings(test(conn))
2: withCallingHandlers(expr, warning = wHandler)
3: test(conn)
4: apply(df.h, 1, fn1)
5: apply(df.h, 1, fn1)
6: .handleSimpleError(function (e)
{
e$calls <- head(sys.calls()[-seq_len(frame + 7)], -2)
signalCondition(e)
}, "cannot coerce type 'closure' to vector of type 'character'", quote(as.character(FUN))).

SEED used: 1106296022

[2015-02-04 00:13:19] [ERROR] : TEST FAILED

the test

> functiontest <- function(conn){
+ Log.info('uploading function testing dataset')
+ df.h <- h2o.importFile(conn, locate('smalldata/jira/v-3.csv'))
+
+ Log.info('printing from h2o')
+ Log.info( head(df.h) )
+
+ Log.info('applying over 1, 2, 1:2')
+ fn1 <- function{ sum }
+ # h2o.addFunction(conn, fn1)
+ fn2 <- function{ x + 1 }
+ # h2o.addFunction(conn, fn2)
+
+ df.h.1 <- apply(df.h, 1, fn1)
+ df.h.2 <- apply(df.h, 2, fn1)
+ # df.h.3 <- apply(df.h, 1:2, fn2)
+
+ Log.info('pulling data locally')
+ df.1 <- as.data.frame( df.h.1 )
+ df.2 <- as.data.frame( df.h.2 )
+ # df.3 <- as.data.frame( df.h.3 )
+ print(df.1)
+ print(df.2)
+
+ expect_true(all(df.1 = c(3,7,11)))
+ expect_true(all(df.2 = c(9, 12)))
+ # expect_that(all( df.3[,1] == c(2,4,6) ))
+ # expect_that(all( df.3[,2] == c(3,5,7) ))
+
+ testEnd()
+ }

172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/ImportFiles, route: /3/ImportFiles, parms: {path=/home2/jenkins/slave_dir_from_mr-0xb1/workspace/h2o_master_DEV_runit_small/smalldata/jira/v-3.csv}
02-03 23:57:15.950 172.16.2.177:41022 15194 # Session INFO: Method: POST , Path: /3/ParseSetup, route: /3/ParseSetup, parms: {srcs=["nfs://home2/jenkins/slave_dir_from_mr-0xb1/workspace/h2o_master_DEV_runit_small/smalldata/jira/v-3.csv"]}
02-03 23:57:16.380 172.16.2.177:41022 15194 # Session INFO: Method: POST , Path: /3/Parse, route: /3/Parse, parms: {ncols=2, singleQuotes=FALSE, hex=v_3.hex_1_sid_b193845916c5928c2b5db86169a64d14, pType=CSV, srcs=["nfs://home2/jenkins/slave_dir_from_mr-0xb1/workspace/h2o_master_DEV_runit_small/smalldata/jira/v-3.csv"], delete_on_done=TRUE, checkHeader=1, columnNames=["l","r"], sep=44}
02-03 23:57:16.383 172.16.2.177:41022 15194 # Session INFO: Chunk size 4194304
02-03 23:57:16.430 172.16.2.177:41022 15194 FJ-0-5 INFO: Parse result for v_3.hex_1_sid_b193845916c5928c2b5db86169a64d14 (3 rows):
02-03 23:57:16.440 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/Jobs/$0301ac1002b13fa0ffffffff$_84df1ed922108347aea1585b53ab40f0, route: /3/Jobs/(?<key>.*), parms: {key=$0301ac1002b13fa0ffffffff$_84df1ed922108347aea1585b53ab40f0}
02-03 23:57:16.447 172.16.2.177:41022 15194 FJ-0-5 INFO: ColV2 type min max NAs constant numLevels
02-03 23:57:16.448 172.16.2.177:41022 15194 FJ-0-5 INFO: l: numeric 1.00000 5.00000
02-03 23:57:16.448 172.16.2.177:41022 15194 FJ-0-5 INFO: r: numeric 2.00000 6.00000
02-03 23:57:16.449 172.16.2.177:41022 15194 FJ-0-5 INFO: Internal FluidVec compression/distribution summary:
02-03 23:57:16.449 172.16.2.177:41022 15194 FJ-0-5 INFO: Chunk type count fraction size rel. size
02-03 23:57:16.449 172.16.2.177:41022 15194 FJ-0-5 INFO: C1N 2 100.000 % 142 B 100.000 %
02-03 23:57:16.449 172.16.2.177:41022 15194 FJ-0-5 INFO: Total memory usage : 142 B
02-03 23:57:17.462 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/Jobs/$0301ac1002b13fa0ffffffff$_84df1ed922108347aea1585b53ab40f0, route: /3/Jobs/(?<key>.*), parms: {key=$0301ac1002b13fa0ffffffff$_84df1ed922108347aea1585b53ab40f0}
02-03 23:57:17.498 172.16.2.177:41022 15194 # Session INFO: Method: POST , Path: /3/Rapids, route: /3/Rapids, parms: {ast=(%v_3.hex_1_sid_b193845916c5928c2b5db86169a64d14)}
02-03 23:57:17.590 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/Rapids/isEval, route: /3/Rapids/isEval, parms: {ast_key=v_3.hex_1_sid_b193845916c5928c2b5db86169a64d14}
02-03 23:57:17.649 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/Rapids/isEval, route: /3/Rapids/isEval, parms: {ast_key=subset_2_sid_b193845916c5928c2b5db86169a64d14}
02-03 23:57:17.690 172.16.2.177:41022 15194 # Session INFO: Method: POST , Path: /3/Rapids, route: /3/Rapids, parms: {ast=(= !subset_2_sid_b193845916c5928c2b5db86169a64d14 ([ %v_3.hex_1_sid_b193845916c5928c2b5db86169a64d14 (: #0 #2) "null"))}
02-03 23:57:17.735 172.16.2.177:41022 15194 # Session INFO: Method: POST , Path: /3/Rapids, route: /3/Rapids, parms: {ast=(%subset_2_sid_b193845916c5928c2b5db86169a64d14)}
02-03 23:57:17.858 172.16.2.177:41022 15194 # Session INFO: Method: DELETE, Path: /3/Remove, route: /3/Remove, parms: {key=subset_2_sid_b193845916c5928c2b5db86169a64d14}
02-03 23:57:22.742 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /, route: /, parms: {}
02-03 23:57:22.778 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /, route: /, parms: {}
02-03 23:57:22.850 172.16.2.177:41022 15194 # Session INFO: Method: GET , Path: /3/InitID, route: /3/InitID, parms: {}

Your pinned fields
Click on the next to a field label to start pinning.

Assignee

New H2O Bugs

Reporter

Kevin Normoyle

CustomerVisible

No