Newly defined S3 generics and methods not passed using plan(multisession)
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
ソースファイルもテストも指定されていません。まず、提供された R の再現例を plan(multisession) と foreach %dopar% を使って実行し、次に関係する future バックエンドの経路を追跡してください。完了の条件は、sequentially および multicore の場合と同様に、multisession で例が両方の反復に対して 4 を返すことです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
A clear and concise description of what the bug is.
Newly defined S3 generics and methods do not work with plan(multisession).
Reproduce example
A reproducible example using R code.
library(doFuture)
registerDoFuture()
plan(multisession)
new_s3_obj <- list(value = 2)
class(new_s3_obj) <- "new_s3"
new_method <- function(x) {
UseMethod("new_method", x)
}
new_method.new_s3 <- function(obj) {
obj$value^2
}
foreach(i = 1:2) %dopar% {
new_method(new_s3_obj)
}
Expected behavior
A clear and concise description of what you expected to happen.
Changing the %dopar% to %do% (sequential), or using plan(multicore) results in the below as expected:
[[1]]
[1] 4
[[2]]
[1] 4
Session information
Please share your session information after the error has occurred so that we also see which packages and versions are involved, e.g.
> sessionInfo()
R version 4.1.0 (2021-05-18)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Big Sur 11.4
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1-arm64/Resources/lib/libRlapack.dylib
locale:
[1] en_AU.UTF-8/en_AU.UTF-8/en_AU.UTF-8/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] doFuture_0.12.0 future_1.21.0 foreach_1.5.1
loaded via a namespace (and not attached):
[1] Rcpp_1.0.6 pillar_1.6.1 compiler_4.1.0 iterators_1.0.13 tools_4.1.0
[6] digest_0.6.27 tsibble_1.0.1 lubridate_1.7.10 lifecycle_1.0.0 tibble_3.1.2
[11] gtable_0.3.0 anytime_0.3.9 pkgconfig_2.0.3 rlang_0.4.11 DBI_1.1.1
[16] cli_3.0.0 rstudioapi_0.13 parallel_4.1.0 dplyr_1.0.7 globals_0.14.0
[21] generics_0.1.0 vctrs_0.3.8 grid_4.1.0 tidyselect_1.1.1 glue_1.4.2
[26] listenv_0.8.0 R6_2.5.0 parallelly_1.26.1 fansi_0.5.0 distributional_0.2.2
[31] ggplot2_3.3.5 purrr_0.3.4 farver_2.1.0 tidyr_1.1.3 magrittr_2.0.1
[36] scales_1.1.1 codetools_0.2-18 ellipsis_0.3.2 fabletools_0.3.1 assertthat_0.2.1
[41] colorspace_2.0-2 utf8_1.2.1 munsell_0.5.0 crayon_1.4.1
- 主要言語
- R
- スター
- 1k
- フォーク
- 93
- 平均マージ
- 2日 4時間
- マージ済み PR(30日)
- 1
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
futureverse/future のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
futureverse/future#852 · コメント 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 35/100
futureverse/future#849 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
futureverse/future#833 ·
-
feature/resources RNG
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
futureverse/future#832 ·
-
RNG
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
futureverse/future#831 · コメント 1 件 ·
futureverse/future の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
nf-core/provenancereport#75 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
garner-code/PsyR#80 ·