nested futures that doesn't terminate
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- r
- Área
- distributed-systems
Línea de trabajo
Comienza con el reproductor en R del issue, comparando el plan secuencial con el plan anidado de multiproceso/secuencial alrededor de furrr::future_map. Inspecciona cómo future y parallel gestionan el cierre de los procesos hijo, incluido el mensaje reportado „unable to terminate some child processes“. Se considera terminado cuando la reproducción tiene una causa documentada y una resolución verificada, o un informe upstream claramente delimitado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I am having issues with nested future calls.
Here I'm using mlr3 and furrr, both using future package. When using them both together I'm having issues to have the parallelized calls to terminate.
library(magrittr)
library(mlr3)
library(mlr3learners)
dtas_lst <-
list(
dta1 = iris %>% dplyr::select(-Species) %>% utils::head(75),
dta2 = iris %>% dplyr::select(-Species) %>% utils::tail(75)
)
run_xgb <- function(dta, target_column = "Sepal.Length") {
ttsk <- mlr3::TaskRegr$new("ttsk", backend = dta, target = target_column)
learner <-
mlr3::lrn(
"regr.xgboost",
objective = "reg:linear",
eval_metric = "rmse",
nrounds = 100,
verbose = 0
)
learner$train(ttsk)
learner$predict(ttsk)$response
}
future::plan(list(future::sequential))
furrr::future_map(dtas_lst, run_xgb, .progress = TRUE) # works!
future::plan(list(future::multiprocess, future::sequential))
furrr::future_map(dtas_lst, run_xgb, .progress = TRUE) # doesn't terminate
I've had cases where the parallel runs do work once during a session, but then not terminating on a rerun.
Sometimes when closing down the session (after manually terminating the parallel run), I get the below message
# Error while shutting down parallel: unable to terminate some child processes
Upon googling this, I found that I could do the following check.
parallel::mcparallel(scan(n = 1, quiet = TRUE))
# $pid
# [1] 32763
# $fd
# [1] 21 24
# attr(,"class")
# [1] "parallelJob" "childProcess" "process"
Does anyone have any solutions to this? Is this perhaps a bug? Related to future or perhaps parallel or other package? I was having the same issue when I was running the mlr package.
> Sys.info()
sysname
"Linux"
release
"4.15.0-66-generic"
version
"#75-Ubuntu SMP Tue Oct 1 05:24:09 UTC 2019"
...
machine
"x86_64"
...
- Lenguaje dominante
- R
- Estrellas
- 1k
- Forks
- 93
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de futureverse/future
-
The first code example in the README does not workPosiblemente ocupada @sean0407 la tomó hace 1 día. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
futureverse/future#838 · 1 comentario · 1 reacción ·
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
futureverse/future#836 · 2 comentarios ·
-
Entire global environment getting passed along with user-defined (global) functions in shinyAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
futureverse/future#833 ·
-
feature/resources RNG
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
futureverse/future#832 ·
-
RNG
Dificultad 5/5 Más de una semana Aptitud para principiantes 38/100
futureverse/future#831 · 1 comentario ·
Todos los issues de futureverse/future
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
bennettoxford/opencodecounts#170 ·
-
complexity::1-low effort::1-hours priority::3-could
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
jumpingrivers/audit.workbench#43 ·
Los mantenedores suelen responder en 1 día
-
complexity::1-low effort::1-hours priority::3-could
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
jumpingrivers/audit.connect#71 ·
Los mantenedores suelen responder en 1 día
-
bug complexity::1-low effort::1-hours priority::2-should
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
jumpingrivers/audit.base#61 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
pharmaverse/admiraldev#580 ·