-
Notifications
You must be signed in to change notification settings - Fork 27
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
contextual do_parallel dosnt work on MRAN 3.5.1 #17
Comments
Can you show the complete code that you are trying to run? That would make debugging a tad easier. |
Here it is : bandit <- BasicBernoulliBandit$new(weights = prob_per_arm) agent <- list(Agent$new(EpsilonGreedyPolicy$new(0.1), bandit, "Epsilon = 0.1"), |
Hi @fhujiil -thanks for reporting this issue! It seems that using setMKLthreads() in MRO 3.5.3 in combination with RStudio crashes R. See also here. I was able to resolve the issue by skipping "setMKLthreads(1)" when both RStudio and MRAN are detected . This might degrade performance when running contextual on MRAN+RStudio though - as contextual's parallel processing and MRAN's multi-threaded linear algebra computations will now compete for the same processors. This solution will be in contextual's next CRAN release, probably sometime next month. To use the updated code right away, just install from GitHub:
|
Hi!
I try to run on my MRAN 3.5.1:
history <- Simulator$new(agents = agent,
horizon = horizon,
simulations = 1000,do_parallel = T)$run()
but recieve :
Setting up parallel backend.
Cores available: 4
Workers assigned: 3
Simulation horizon: 250
Number of simulations: 5000 # this also stay unchanged!
Number of batches: 3
Starting main loop.
Error in gp$globals[[match(s, syms)]] : subscript out of bounds
Matrix products: default
locale:
[1] LC_COLLATE=Russian_Russia.1251 LC_CTYPE=Russian_Russia.1251 LC_MONETARY=Russian_Russia.1251
[4] LC_NUMERIC=C LC_TIME=Russian_Russia.1251
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] itertools_0.1-3 iterators_1.0.10 data.table_1.11.4 contextual_0.9.8.3 RevoUtils_11.0.1
[6] RevoUtilsMath_11.0.0
loaded via a namespace (and not attached):
[1] codetools_0.2-15 listenv_0.7.0 future_1.9.0 withr_2.1.2 digest_0.6.15 foreach_1.5.0
[7] R.methodsS3_1.7.1 R6_2.3.0 R.devices_2.16.0 doParallel_1.0.13 R.oo_1.22.0 R.utils_2.6.0
[13] devtools_1.13.6 Formula_1.2-3 rjson_0.2.20 tools_3.5.1 yaml_2.2.0 parallel_3.5.1
[19] compiler_3.5.1 base64enc_0.1-3 globals_0.12.1 memoise_1.1.0
The text was updated successfully, but these errors were encountered: