Coder Social home page Coder Social logo

Comments (3)

g0ulash avatar g0ulash commented on May 27, 2024

Can you show the complete code that you are trying to run? That would make debugging a tad easier.

from contextual.

fhujiil avatar fhujiil commented on May 27, 2024

Here it is :
prob_per_arm <- c(0.1, 0.1, 0.1, 0.1, 0.9)
horizon <- 250
simulations <- 1000

bandit <- BasicBernoulliBandit$new(weights = prob_per_arm)

agent <- list(Agent$new(EpsilonGreedyPolicy$new(0.1), bandit, "Epsilon = 0.1"),
Agent$new(EpsilonGreedyPolicy$new(0.2), bandit, "Epsilon = 0.2"),
Agent$new(EpsilonGreedyPolicy$new(0.3), bandit, "Epsilon = 0.3"),
Agent$new(EpsilonGreedyPolicy$new(0.4), bandit, "Epsilon = 0.4"),
Agent$new(EpsilonGreedyPolicy$new(0.5), bandit, "Epsilon = 0.5"))
history <- Simulator$new(agents = agent,
horizon = horizon,
simulations = 1000,do_parallel = T)$run()

from contextual.

robinvanemden avatar robinvanemden commented on May 27, 2024

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:

install.packages("devtools")
devtools::install_github('Nth-iteration-labs/contextual')

from contextual.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.