futureverse / futureverse/BiocParallel.FutureParam

bplapply() et al. returns RngFutureError:s rather than signals them

Offen
#5 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
bug
Vorherrschende Sprache
Makefile
Sterne
7
Forks
4
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

```r
library(BiocParallel.FutureParam)
register(FutureParam())
options(future.rng.onMisuse = "error")
y <- bplapply(1:2, rnorm)
```

```r
> str(y)
List of 2
$ :List of 2
..$ message: chr "UNRELIABLE VALUE: Future ('') unexpectedly generated random numbers without specifying argument 'seed'. T"| __truncated__
..$ call : NULL
..- attr(*, "class")= chr [1:6] "RngFutureError" "FutureError" "error" "RngFutureCondition" ...
..- attr(*, "future")=Classes 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment'
$ :List of 2
..$ message: chr "UNRELIABLE VALUE: Future ('') unexpectedly generated random numbers without specifying argument 'seed'. T"| __truncated__
..$ call : NULL
..- attr(*, "class")= chr [1:6] "RngFutureError" "FutureError" "error" "RngFutureCondition" ...
..- attr(*, "future")=Classes 'SequentialFuture', 'UniprocessFuture', 'Future', 'environment'
```

The expected behavior should be:

```r
y <- bplapply(1:2, rnorm)
Error: UNRELIABLE VALUE: Future ('') unexpectedly generated random numbers without specifying argument 'seed'. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".
```

Similarly, with RngFutureWarning:s, we would expect:

```r
library(BiocParallel.FutureParam)
register(FutureParam())
options(future.rng.onMisuse = "warning") # default
y <- bplapply(1:2, rnorm)
Warning: UNRELIABLE VALUE: Future ('') unexpectedly generated random numbers without specifying argument 'seed'. There is a risk that those random numbers are not statistically sound and the overall results might be invalid. To fix this, specify 'seed=TRUE'. This ensures that proper, parallel-safe random numbers are produced via the L'Ecuyer-CMRG method. To disable this check, use 'seed=NULL', or set option 'future.rng.onMisuse' to "ignore".
```

but right now those warnings are muffled and never signaled.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, das Beispiel mit bplapply(), FutureParam() und future.rng.onMisuse auf "error" oder "warning" reproduzierbar nachzustellen. Verfolge, wie RngFutureError und RngFutureWarning behandelt werden, und überprüfe anschließend, dass Fehler signalisiert, Warnungen ausgegeben und die bestehenden erwarteten Meldungen beibehalten werden.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
r
Bereich
distributed-systems
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
45/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.