New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
R RandomForest Leads to a Crash #3021
Comments
You may need to request a larger memory size when running the interactive job on the cluster. This would need to be set with a flag that is dependent on the underlying scheduler (e.g. SLURM, PBS, ... ). |
Thanks @coatless! |
Hey @nkanrar, sorry this isn't working out of the box for you. What are the values of the labels you're providing as input? |
Thanks for you response @rcurtin! The labels I am using as input are a numeric matrix, with values ranging from 1:12, corresponding to the 12 different classes in the dataset. |
👍 are there any NaN values in the input? Is it possible you can provide the dataset or a small subset of it that causes the crash? |
Thanks @rcurtin could I e-mail the dataset to you directly? I would prefer not sharing it publicly over GitHub. Also, there are no NaNs in the input. Also: edit to my original post, my dataset is ~20k measurements with 200 features. But even subsetting it to ~10k measurements leads to the failure. |
Sure, my email is ryan@ratml.org. I'll try to run it and see if I can reproduce the issue. If you could send corresponding R code that can be used that would be great too. 👍 |
@rcurtin Sent! Thank you so much! |
I ran this locally in an R session with
and then saw that I also ran the command-line bindings with the given data and that too ran without any issues. |
Hi @rcurtin thanks for trying it out! One thing I noticed is if I try to run my function multiple times, then RStudio would stall and then crash. If you were to try that, does it lead to a crash? |
I suppose we need more information about the RStudio version on the cluster, size of the data set, and average amount of RAM the interactive job is launched with. |
Thanks @coatless! |
@nkanrar I need to see the RStudio Server version, please run: RStudio.Version() |
It is 1.3.959 |
Hi there I'm working with @nkanrar and we're using the same server.
To clarify, she's interactively running R on a server with over 2TB of memory. Lack of available memory on the machine isn't the problem here. I've reinstalled all system libraries with sudo using Multiple invocations of
Here is the R session (I'm not using RStudio):
Is it possible that there's a problem here with memory accession in the C++ code (or the Rcpp implementation)? That would explain an immediate segfault like this. There could be other explanations as well, of course. Thank you for the help with this. Best, Evan |
@evanbiederstedt thanks for chiming in and providing more details. I think this is a configuration hiccup on the actual server as we're not seeing a regression that would cause this to segfault elsewhere. Glancing at the two different R session overviews provided, I see:
vs.
So, I think there are multiple local R copies in play. For simplicity and to aide the debugging process, could we try starting from scratch? In particular, let's aim for:
install.packages("mlpack", dependencies = TRUE) Alternatively, we could use the pre-built
https://cran.r-project.org/bin/linux/ubuntu/#get-5000-cran-packages |
Hi @coatless Thanks for the help with this---I appreciate your time here
Yes, this is true. I wanted to try a different version of R than the R studio copy. I'm trying your instructions for the server right now. I tried installing on my Mac OS just now. There's a similar problem:
Here's the R session info:
I think you have the *rds files? They're not very big:
Could they be something in the inputs which trigger segfaults? RE:
This fails for me, actually. Command:
Error:
... |
@evanbiederstedt thanks for mentioning that. I am not an R expert, but when I tried to run the code locally in an R session, I too noticed that I got a segfault. I haven't had a chance to dig any deeper yet, so I was initially assuming it might have to do with my ignorance of R details. I will try to find some time shortly to set up a better environment that will tell me more of what is going on with the R bindings, and that should help diagnose what the issue is here. 👍 |
There is something strange here, and I think we're just following the API: https://www.mlpack.org/doc/mlpack-3.4.2/doxygen/r_quickstart.html I think this is either an issue whereby we're using the package incorrectly, or there's an architectural issue. We're using the function I realize I didn't share the function we're using in the examples above:
The segfault happens here at some point here:
whereby the datatype for
|
I do not have the RDS files. @rcurtin mind forwarding? How were the matrices constructed? For a quick reprex, I plugged # Load the mlpack library
library("mlpack")
# Construct model design
my_model_design = model.frame(Species ~., data = iris)
# Extract the model design matrix
X = model.matrix(my_model_design, data = iris)
# Extract the labels as a vector of factors
y_factor = model.response(my_model_design)
# Convert factor labels to integer encodings.
y_integer_encoded = as.matrix(as.integer(y_factor))
# Train the model
output <- random_forest(training=X, labels=y_integer_encoded, minimum_leaf_size=20,
num_trees=10, print_training_accuracy=TRUE)
# See model output
output
#> $output_model
#> <pointer: 0x7fe45345f240>
#> attr(,"type")
#> [1] "RandomForestModel"
#>
#> $predictions
#> [,1]
#>
#> $probabilities
#> <0 x 0 matrix>
# Extract the pointer to the underlying model for predicctions
rf_model = output$output_model
# Attempt to predict using the underlying model
my_model_test_data = random_forest(
input_model=rf_model,
test=X,
test_labels=y_integer_encoded)
# View predictions
my_model_test_data
#> $output_model
#> <pointer: 0x7fe45345f240>
#> attr(,"type")
#> [1] "RandomForestModel"
#>
#> $predictions
#> [,1]
#> [1,] 1
#> [2,] 1
#> [3,] 1
#> [4,] 1
#> [5,] 1
#>
#> $probabilities
#> [,1] [,2] [,3]
#> [1,] 0.980851064 0.019148936 0.000000000
#> [2,] 0.970851064 0.024148936 0.005000000
#> [3,] 0.970851064 0.024148936 0.005000000
#> [4,] 0.970851064 0.024148936 0.005000000
#> [5,] 0.980851064 0.019148936 0.000000000 This seems to work well for testing the predictions; however, the results on the training data set are MIA. Perhaps the segfault is relating to accessing the training results, e.g. |
Sad news, I'm short on memory to handle this compile within the docker container. I won't be able to easily look into this until I get a new office computer in August. :( g++: fatal error: Killed signal terminated program cc1plus
compilation terminated.
make[1]: *** [/usr/local/RDvalgrind/lib/R/etc/Makeconf:177: adaboost.o] Error 1
make[1]: Leaving directory '/tmp/RtmpIytvGc/R.INSTALL31a78511356/mlpack/src'
ERROR: compilation failed for package ‘mlpack’
* removing ‘/usr/local/RDvalgrind/lib/R/site-library/mlpack’ |
I appreciate the help, @coatless
I hope I'm not being too nosy about how you're using this (as I'm very likely wrong), but if you use the container interactively, shouldn't it use your computer's memory? The RDS files feel very small; how memory intensive is this operation? I am running this on my Mac OS. The segfault happens immediately; I don't even notice a massive surge in memory. I mention the above simply to help with collectively debugging :) |
@evanbiederstedt So, the From there, I'm currently running valgrind from r-debug container on the procedure with all tracking enabled. Some quick steps to replicate: Step 1: Setup the debugging environment # Download wch1/r-debug and launch it under the rd tag.
# Map access to where the files are stored.
docker run --rm -ti --name rd --security-opt seccomp=unconfined -v ~/Downloads/mlpack_issue_3021/:/mlpack_issue_3021 wch1/r-debug
# Install the mlpack r package from source
RDvalgrind -e "install.packages('mlpack')" Step 2: Tag the container to avoid another 30min compile Outside of the docker container's terminal, we'll create a checkpoint once mlpack is installed. docker commit rd mlpackvalgrind Step 3: Start trying to diagnose what's up. Back inside the container with mlpack installed, let's open up a valgrind session and run the code with maximum logging. RDvalgrind -d "valgrind --track-origins=yes --leak-check=full --show-reachable=yes" -f /mlpack_issue_3021/mlpack-issue-code-only.R |
Alrighty, so... Looks like there is a leak, but I wasn't able to immediately trigger a segfault. See attached for some logs. |
Ah, this makes sense. That would cause a few problems, yes :) Here's what I see running the commands above:
|
@evanbiederstedt Nice! RE: Valgrind The
I'm not sure if you have unpacked the tar that @nkanrar sent into downloads. If you do, I think the path: ~/Downloads/mlpack_issue_3021 should exist. Thus, when the container is launched, we should have the following file mapping into the docker container: -v ~/Downloads/mlpack_issue_3021/:/mlpack_issue_3021 From there, I think the file name needs to be slightly changed in the launch command to: RDvalgrind -d "valgrind --track-origins=yes --leak-check=full --show-reachable=yes" -f /mlpack_issue_3021/mlpack_issue.R I have this going again... It takes about an hour to fully run with all tracking. |
Thank you for explaining this:
I didn't quite understand the issue, as I didn't have the file. I've re-run everything with this file in
Well, I remain confused.... |
Is it easier to run with gdb? |
@rcurtin I can throw it into One note that I found interesting was a set seed call warning. output <- mlpack::random_forest(training = training_data, labels = labels)
Warning message:
In random_forest_mlpackMain() :
When called from R, the RNG seed has to be set at the R level via set.seed() |
On the second run with gdb enabled, I'm getting the segmentation fault at: Thread 1 "R" received signal SIGSEGV, Segmentation fault.
mlpack::tree::DecisionTree<mlpack::tree::GiniGain, mlpack::tree::BestBinaryNumericSplit, mlpack::tree::AllCategoricalSplit, mlpack::tree::MultipleRandomDimensionSelect, double, false>::~DecisionTree (this=0x555556589230,
__in_chrg=<optimized out>) at ./mlpack/methods/decision_tree/decision_tree_impl.hpp:445 StepsStep 0: Launch container with mapping docker run --rm -ti --name rd --security-opt seccomp=unconfined -v ~/Downloads/mlpack_issue_3021/:/mlpack_issue_3021 wch1/r-debug Step 1: Install mlpack package under R-devel # Install mlpack under R-devel
RD -e "install.packages('mlpack')" Note: Step 2: Load R-devel with a debugger RD -d gdb Once gdb is loaded, type: run To begin the session. Step 3: Run R code and aim to trigger the segfault. source('/mlpack_issue_3021/mlpack_issue.R') |
(I wrote this comment last night, but somehow did not hit the Interesting; I guess for the R distribution of mlpack we may want to modify the Anyway, I dug a bit and found that the
I'll try to keep digging a little more tomorrow. The gdb backtrace was a little bit unclear on why the free was being called twice; I didn't see where or |
Here is a reduced script that produces the issue:
I think I understand what is happening here. After the first call to But that second call to Then, we set I am not an Rcpp expert. Is there a way to mark an |
Actually we have code in the generated Python bindings that does this exact check. Here's the generated code for the part of the random forest binding in Python that sets the output model:
In Python, it looks like the choice being made is to make the output model a Python-level copy/alias of the given input model, instead of using the model pointer directly from C++. Perhaps a similar strategy would work in R? I'd prefer to get some advice from some R experts before implementing something though. 😄 |
Ok, I got the PR #3034 to compile, and so if you are brave, you can download the tarball directly from the Github Actions build: https://github.com/mlpack/mlpack/suites/3531895147/artifacts/84500190 (That is a tarball that... contains another tarball. You can unpack that and then install it directly with And, I think that should fix the issue! If you're up for giving a shot, let us know if it works. 😄 |
I can confirm that #3034 fixes the Xptr issue with RandomForest. Though, we need to remove the debug statements showing pointer creation: R> # Attempt to predict using the underlying model
R> my_model_test_data = random_forest(
+ input_model=rf_model,
+ test=X,
+ test_labels=y_integer_encoded)
create params 0x7fa91ae83230
create timers 0x7fa9157bc220 Full reprex# Load the mlpack library
library("mlpack")
# Construct model design
my_model_design = model.frame(Species ~., data = iris)
# Extract the model design matrix
X = model.matrix(my_model_design, data = iris)
# Extract the labels as a vector of factors
y_factor = model.response(my_model_design)
# Convert factor labels to integer encodings.
y_integer_encoded = as.matrix(as.integer(y_factor))
# Train the model
output <- random_forest(training=X, labels=y_integer_encoded, minimum_leaf_size=20,
num_trees=10, print_training_accuracy=TRUE)
# See model output
output
#> $output_model
#> <pointer: 0x7fc6eed34460>
#> attr(,"type")
#> [1] "RandomForestModel"
#>
#> $predictions
#> [,1]
#>
#> $probabilities
#> <0 x 0 matrix>
#> $output_model
#> <pointer: 0x7fe45345f240>
#> attr(,"type")
#> [1] "RandomForestModel"
#>
#> $predictions
#> [,1]
#>
#> $probabilities
#> <0 x 0 matrix>
# Extract the pointer to the underlying model for predicctions
rf_model = output$output_model
# Attempt to predict using the underlying model
my_model_test_data = random_forest(
input_model=rf_model,
test=X,
test_labels=y_integer_encoded)
# View predictions
my_model_test_data
#> $output_model
#> <pointer: 0x7fc6eed34460>
#> attr(,"type")
#> [1] "RandomForestModel"
#>
#> $predictions
#> [,1]
#> [1,] 1
#> [2,] 1
#> [3,] 1
#> [4,] 1
#> [5,] 1
#> [6,] 1
#> [7,] 1
#> [8,] 1
#> [9,] 1
#> [10,] 1
#> [11,] 1
#> [12,] 1
#> [13,] 1
#> [14,] 1
#> [15,] 1
#> [16,] 1
#> [17,] 1
#> [18,] 1
#> [19,] 1
#> [20,] 1
#> [21,] 1
#> [22,] 1
#> [23,] 1
#> [24,] 1
#> [25,] 1
#> [26,] 1
#> [27,] 1
#> [28,] 1
#> [29,] 1
#> [30,] 1
#> [31,] 1
#> [32,] 1
#> [33,] 1
#> [34,] 1
#> [35,] 1
#> [36,] 1
#> [37,] 1
#> [38,] 1
#> [39,] 1
#> [40,] 1
#> [41,] 1
#> [42,] 1
#> [43,] 1
#> [44,] 1
#> [45,] 1
#> [46,] 1
#> [47,] 1
#> [48,] 1
#> [49,] 1
#> [50,] 1
#> [51,] 2
#> [52,] 2
#> [53,] 2
#> [54,] 2
#> [55,] 2
#> [56,] 2
#> [57,] 2
#> [58,] 2
#> [59,] 2
#> [60,] 2
#> [61,] 2
#> [62,] 2
#> [63,] 2
#> [64,] 2
#> [65,] 2
#> [66,] 2
#> [67,] 2
#> [68,] 2
#> [69,] 2
#> [70,] 2
#> [71,] 3
#> [72,] 2
#> [73,] 2
#> [74,] 2
#> [75,] 2
#> [76,] 2
#> [77,] 2
#> [78,] 2
#> [79,] 2
#> [80,] 2
#> [81,] 2
#> [82,] 2
#> [83,] 2
#> [84,] 3
#> [85,] 2
#> [86,] 2
#> [87,] 2
#> [88,] 2
#> [89,] 2
#> [90,] 2
#> [91,] 2
#> [92,] 2
#> [93,] 2
#> [94,] 2
#> [95,] 2
#> [96,] 2
#> [97,] 2
#> [98,] 2
#> [99,] 2
#> [100,] 2
#> [101,] 3
#> [102,] 3
#> [103,] 3
#> [104,] 3
#> [105,] 3
#> [106,] 3
#> [107,] 2
#> [108,] 3
#> [109,] 3
#> [110,] 3
#> [111,] 3
#> [112,] 3
#> [113,] 3
#> [114,] 3
#> [115,] 3
#> [116,] 3
#> [117,] 3
#> [118,] 3
#> [119,] 3
#> [120,] 3
#> [121,] 3
#> [122,] 3
#> [123,] 3
#> [124,] 3
#> [125,] 3
#> [126,] 3
#> [127,] 3
#> [128,] 3
#> [129,] 3
#> [130,] 3
#> [131,] 3
#> [132,] 3
#> [133,] 3
#> [134,] 3
#> [135,] 3
#> [136,] 3
#> [137,] 3
#> [138,] 3
#> [139,] 3
#> [140,] 3
#> [141,] 3
#> [142,] 3
#> [143,] 3
#> [144,] 3
#> [145,] 3
#> [146,] 3
#> [147,] 3
#> [148,] 3
#> [149,] 3
#> [150,] 3
#>
#> $probabilities
#> [,1] [,2] [,3]
#> [1,] 1.000000000 0.000000000 0.000000000
#> [2,] 0.944000000 0.048000000 0.008000000
#> [3,] 1.000000000 0.000000000 0.000000000
#> [4,] 1.000000000 0.000000000 0.000000000
#> [5,] 1.000000000 0.000000000 0.000000000
#> [6,] 1.000000000 0.000000000 0.000000000
#> [7,] 1.000000000 0.000000000 0.000000000
#> [8,] 1.000000000 0.000000000 0.000000000
#> [9,] 0.944000000 0.048000000 0.008000000
#> [10,] 1.000000000 0.000000000 0.000000000
#> [11,] 1.000000000 0.000000000 0.000000000
#> [12,] 1.000000000 0.000000000 0.000000000
#> [13,] 0.944000000 0.048000000 0.008000000
#> [14,] 0.944000000 0.048000000 0.008000000
#> [15,] 0.905882353 0.088235294 0.005882353
#> [16,] 0.905882353 0.088235294 0.005882353
#> [17,] 1.000000000 0.000000000 0.000000000
#> [18,] 1.000000000 0.000000000 0.000000000
#> [19,] 0.905882353 0.088235294 0.005882353
#> [20,] 1.000000000 0.000000000 0.000000000
#> [21,] 1.000000000 0.000000000 0.000000000
#> [22,] 1.000000000 0.000000000 0.000000000
#> [23,] 1.000000000 0.000000000 0.000000000
#> [24,] 1.000000000 0.000000000 0.000000000
#> [25,] 1.000000000 0.000000000 0.000000000
#> [26,] 0.944000000 0.048000000 0.008000000
#> [27,] 1.000000000 0.000000000 0.000000000
#> [28,] 1.000000000 0.000000000 0.000000000
#> [29,] 1.000000000 0.000000000 0.000000000
#> [30,] 1.000000000 0.000000000 0.000000000
#> [31,] 1.000000000 0.000000000 0.000000000
#> [32,] 1.000000000 0.000000000 0.000000000
#> [33,] 1.000000000 0.000000000 0.000000000
#> [34,] 1.000000000 0.000000000 0.000000000
#> [35,] 1.000000000 0.000000000 0.000000000
#> [36,] 1.000000000 0.000000000 0.000000000
#> [37,] 1.000000000 0.000000000 0.000000000
#> [38,] 1.000000000 0.000000000 0.000000000
#> [39,] 0.944000000 0.048000000 0.008000000
#> [40,] 1.000000000 0.000000000 0.000000000
#> [41,] 1.000000000 0.000000000 0.000000000
#> [42,] 0.944000000 0.048000000 0.008000000
#> [43,] 1.000000000 0.000000000 0.000000000
#> [44,] 1.000000000 0.000000000 0.000000000
#> [45,] 1.000000000 0.000000000 0.000000000
#> [46,] 0.944000000 0.048000000 0.008000000
#> [47,] 1.000000000 0.000000000 0.000000000
#> [48,] 1.000000000 0.000000000 0.000000000
#> [49,] 1.000000000 0.000000000 0.000000000
#> [50,] 1.000000000 0.000000000 0.000000000
#> [51,] 0.005882353 0.868539053 0.125578594
#> [52,] 0.005882353 0.868539053 0.125578594
#> [53,] 0.005882353 0.689274839 0.304842808
#> [54,] 0.044000000 0.944666667 0.011333333
#> [55,] 0.005882353 0.859250515 0.134867132
#> [56,] 0.005882353 0.962174688 0.031942959
#> [57,] 0.005882353 0.868539053 0.125578594
#> [58,] 0.044000000 0.944666667 0.011333333
#> [59,] 0.005882353 0.864012420 0.130105227
#> [60,] 0.044000000 0.882761905 0.073238095
#> [61,] 0.044000000 0.944666667 0.011333333
#> [62,] 0.005882353 0.868649373 0.125468274
#> [63,] 0.000000000 0.943569334 0.056430666
#> [64,] 0.005882353 0.812107658 0.182009989
#> [65,] 0.005882353 0.984901961 0.009215686
#> [66,] 0.005882353 0.891266326 0.102851321
#> [67,] 0.005882353 0.845922100 0.148195547
#> [68,] 0.000000000 0.968095238 0.031904762
#> [69,] 0.000000000 0.906080156 0.093919844
#> [70,] 0.000000000 0.968095238 0.031904762
#> [71,] 0.000000000 0.383985507 0.616014493
#> [72,] 0.005882353 0.960376057 0.033741590
#> [73,] 0.000000000 0.654710874 0.345289126
#> [74,] 0.005882353 0.874012420 0.120105227
#> [75,] 0.005882353 0.950376057 0.043741590
#> [76,] 0.005882353 0.891266326 0.102851321
#> [77,] 0.005882353 0.766942823 0.227174824
#> [78,] 0.005882353 0.503714163 0.490403484
#> [79,] 0.005882353 0.875744022 0.118373625
#> [80,] 0.000000000 0.968095238 0.031904762
#> [81,] 0.044000000 0.944666667 0.011333333
#> [82,] 0.044000000 0.944666667 0.011333333
#> [83,] 0.000000000 0.968095238 0.031904762
#> [84,] 0.000000000 0.422007340 0.577992660
#> [85,] 0.044000000 0.805686806 0.150313194
#> [86,] 0.005882353 0.821396196 0.172721451
#> [87,] 0.005882353 0.868539053 0.125578594
#> [88,] 0.000000000 0.933569334 0.066430666
#> [89,] 0.005882353 0.930554135 0.063563512
#> [90,] 0.044000000 0.944666667 0.011333333
#> [91,] 0.044000000 0.944666667 0.011333333
#> [92,] 0.005882353 0.821396196 0.172721451
#> [93,] 0.000000000 0.968095238 0.031904762
#> [94,] 0.044000000 0.944666667 0.011333333
#> [95,] 0.000000000 0.968095238 0.031904762
#> [96,] 0.005882353 0.930554135 0.063563512
#> [97,] 0.005882353 0.984901961 0.009215686
#> [98,] 0.005882353 0.950376057 0.043741590
#> [99,] 0.044000000 0.944666667 0.011333333
#> [100,] 0.005882353 0.984901961 0.009215686
#> [101,] 0.000000000 0.003571429 0.996428571
#> [102,] 0.000000000 0.162916431 0.837083569
#> [103,] 0.000000000 0.007692308 0.992307692
#> [104,] 0.000000000 0.048630717 0.951369283
#> [105,] 0.000000000 0.007692308 0.992307692
#> [106,] 0.000000000 0.007692308 0.992307692
#> [107,] 0.044000000 0.860034632 0.095965368
#> [108,] 0.000000000 0.052751596 0.947248404
#> [109,] 0.000000000 0.124180168 0.875819832
#> [110,] 0.000000000 0.007692308 0.992307692
#> [111,] 0.000000000 0.147692308 0.852307692
#> [112,] 0.000000000 0.120059289 0.879940711
#> [113,] 0.000000000 0.007692308 0.992307692
#> [114,] 0.000000000 0.154220779 0.845779221
#> [115,] 0.000000000 0.082792208 0.917207792
#> [116,] 0.000000000 0.003571429 0.996428571
#> [117,] 0.000000000 0.016387960 0.983612040
#> [118,] 0.000000000 0.007692308 0.992307692
#> [119,] 0.000000000 0.115484515 0.884515485
#> [120,] 0.000000000 0.422007340 0.577992660
#> [121,] 0.000000000 0.007692308 0.992307692
#> [122,] 0.000000000 0.274696970 0.725303030
#> [123,] 0.000000000 0.044055944 0.955944056
#> [124,] 0.000000000 0.395619964 0.604380036
#> [125,] 0.000000000 0.007692308 0.992307692
#> [126,] 0.000000000 0.016387960 0.983612040
#> [127,] 0.000000000 0.415495741 0.584504259
#> [128,] 0.000000000 0.290684899 0.709315101
#> [129,] 0.000000000 0.039935065 0.960064935
#> [130,] 0.005882353 0.363714163 0.630403484
#> [131,] 0.000000000 0.052751596 0.947248404
#> [132,] 0.000000000 0.007692308 0.992307692
#> [133,] 0.000000000 0.039935065 0.960064935
#> [134,] 0.005882353 0.485956920 0.508160727
#> [135,] 0.000000000 0.422007340 0.577992660
#> [136,] 0.000000000 0.007692308 0.992307692
#> [137,] 0.000000000 0.003571429 0.996428571
#> [138,] 0.000000000 0.012267081 0.987732919
#> [139,] 0.000000000 0.377641421 0.622358579
#> [140,] 0.000000000 0.007692308 0.992307692
#> [141,] 0.000000000 0.007692308 0.992307692
#> [142,] 0.000000000 0.147692308 0.852307692
#> [143,] 0.000000000 0.162916431 0.837083569
#> [144,] 0.000000000 0.007692308 0.992307692
#> [145,] 0.000000000 0.007692308 0.992307692
#> [146,] 0.000000000 0.007692308 0.992307692
#> [147,] 0.000000000 0.210059289 0.789940711
#> [148,] 0.000000000 0.007692308 0.992307692
#> [149,] 0.000000000 0.003571429 0.996428571
#> [150,] 0.000000000 0.105124224 0.894875776 |
Awesome, #3034 is merged, so hopefully this is fixed. There is at least one more little R fix that I want to get merged, and then I'll get a new version posted to CRAN. 👍 Thanks again for the report! |
Issue description
Hi,
Thanks for this great package. I was interested in using the random forest classifier in R's mlpack for a classification problem using relatively large matrices (thousands of rows each with 200 features, so a 1000s x 200 dimension). The random forest classifier works great when I run it once, but within a few seconds after one run of a call of the classifier, my RStudio session crashes and forces a restart, with a message "Error occurred during transmission." I looked up why this could happen in RStudio and the most likely cause is that the memory in the session is maxed out by running the function.
I would appreciate any insights in understanding what exactly is causing this issue.
Thank you so much!
Your environment
Steps to reproduce
Expected behavior
Actual behavior
The text was updated successfully, but these errors were encountered: