Category : r

Hi I am trying to call a python function with reticulate in a parallel manner using foreach like so: library(reticulate) library(doParallel) library(foreach) library(parallel) py_install("wandb") wandb <- import("wandb") cl <- makeCluster(detectCores(), type = ‘PSOCK’) registerDoParallel(cl) foreach(i = 1:5) %dopar% { wandb$init(project = "test") } gives: Error in {: task 1 failed – "attempt to apply non-function" ..

Read more