nested futures that doesn't terminate
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- r
- Ambito
- distributed-systems
Direzione di ricerca
Inizia con il riproduttore in R nell’issue, confrontando il piano sequenziale con il piano annidato multiprocesso/sequenziale intorno a furrr::future_map. Esamina come future e parallel gestiscono l’arresto dei processi figli, incluso il messaggio segnalato „unable to terminate some child processes“. Il lavoro è completato quando la riproduzione ha una causa documentata e una risoluzione verificata, oppure un report upstream chiaramente circoscritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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"
...
- Lingua principale
- R
- Stelle
- 1k
- Fork
- 93
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di futureverse/future
-
The first code example in the README does not workForse già presa @sean0407 l’ha presa 2 giorni fa. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
futureverse/future#838 · 1 commento · 1 reazione ·
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
futureverse/future#833 ·
-
feature/resources RNG
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
futureverse/future#832 ·
-
RNG
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
futureverse/future#831 · 1 commento ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
futureverse/future#822 · 1 reazione ·
Tutte le issue di futureverse/future
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
mitchelloharawild/ggtime#39 ·
-
enhancement good first issue help wanted
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
question
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
-
Breaking 🏴☠️ Consistency :green_apple: :apple:
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
easystats/bayestestR#789 ·
I maintainer di solito rispondono entro 1 giorno