AlineTalhouk / splendid

Supervised Learning Ensemble for Diagnostic Identification
https://alinetalhouk.github.io/splendid/
Other
1 stars 0 forks source link

Splendid Error: Segmentation Fault #34

Closed Dustin21 closed 7 years ago

Dustin21 commented 7 years ago

@dchiu911

When running splendid::prediction(fit, ..., probability = TRUE) %@% "prob", we receive the following error:

Error in conditionMessage(list(message = "unimplemented type (31) in 'eval'\n",  : unimplemented type (31) in 'duplicate'

In other instances, we receive an error:

*** caught segfault ***
address 0xXXXXXX, cause 'memory not mapped'

....

An irrecoverable exception occurred. R is aborting now ...
Segmentation fault (core dumped)

Any help on this issue would be greatly appreciated.

Dustin21 commented 7 years ago

Looking at the Traceback of the error I find the following:

1: .Call("dplyr_mutate_impl", PACKAGE = "dplyr", df, dots)
2: mutate_impl(.data, dots)
3: mutate_.tbl_df(tbl_df(.data), .dots = dots)
4: mutate_(tbl_df(.data), .dots = dots)
5: as.data.frame(mutate_(tbl_df(.data), .dots = dots))
6: mutate_.data.frame(.data, .dots = lazyeval::lazy_dots(...))
7: mutate_(.data, .dots = lazyeval::lazy_dots(...))
8: dplyr::mutate(., `:=`(!(!"max_prop"), purrr::pmap_dbl(., max)),     `:=`(!(!"max_class"), purrr::pmap(., list) %>% purrr::map_chr(~names(which.max(.x))) %>% ifelse(.data$max_prop >= threshold, ., "unclassified")))
9: function_list[[i]](value)
10: freduce(value, `_function_list`)
11: `_fseq`(`_lhs`)
12: eval(quote(`_fseq`(`_lhs`)), env, env)
13: eval(quote(`_fseq`(`_lhs`)), env, env)
14: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
15: prob %>% as.data.frame() %>% dplyr::mutate(`:=`(!(!"max_prop"),     purrr::pmap_dbl(., max)), `:=`(!(!"max_class"), purrr::pmap(.,     list) %>% purrr::map_chr(~names(which.max(.x))) %>% ifelse(.data$max_prop >=     threshold, ., "unclassified"))) %>% magrittr::extract2("max_class") %>%     factor() %>% forcats::fct_expand(colnames(prob))
16: class_threshold(prob, threshold = threshold)
17: prediction_output(pred, prob, class, test.id, threshold)
18: eval(lhs, parent, parent)
19: eval(lhs, parent, parent)
20: prediction_output(pred, prob, class, test.id, threshold) %>%     structure(probabilities = NULL)
21: prediction.svm(fit, test1.dat, test.id = 1:length(test1.class$CL),     class = test1.class$CL, probability = TRUE)
22: splendid::prediction(fit, test1.dat, test.id = 1:length(test1.class$CL),     class = test1.class$CL, probability = TRUE)
23: splendid::prediction(fit, test1.dat, test.id = 1:length(test1.class$CL),     class = test1.class$CL, probability = TRUE) %@% "prob"

Hope this helps narrow it down.

dchiu911 commented 7 years ago

Do you have code for a reproducible example of this bug?

Dustin21 commented 7 years ago

Yes I do. I can walk you through it or post it here? Let me know what works.

dchiu911 commented 7 years ago

You can post as much detail as necessary for me to try and recreate your error.

Dustin21 commented 7 years ago

The example shown in ?splendid::prediction produces the error above.

Dustin21 commented 7 years ago

We have confirmed that the issue is due to dplyr 0.5.0. We ran the example on dplyr 0.5.0 on R-3.3.3 and received the error, then updated to dplyr 0.7.2 and error was resolved. The dependency bindrcpp is required for >0.5.0 which I am unable to install on Genesis, so unless I figure out a way to get this compiled, the best route would be to roll splendid back to run on dplyr 0.5.0.

dchiu911 commented 7 years ago

Please pull and rebuild splendid, see if it works now.

Dustin21 commented 7 years ago

Great! Testing it now.

Dustin21 commented 7 years ago

We're back in business! Everything is working great now. Thanks @dchiu911