Graceful error handling in future_lapply
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- r
調査の方向性
レポートで説明されている future_lapply の呼び出しと values(fs) のパスから開始し、クラスターノードへの接続に失敗したときに FutureError がどのように処理されるかを追跡します。Done は、完了したノードの結果を保持しつつ、個々のノードが失敗した場合の明確な動作として定義する必要があります。その動作は、要求されたエラーハンドリングインターフェースを通じて文書化するか、公開する必要があります。
索引モデルが issue の本文から書いたものです。
説明
I've been using future_lapply to submit jobs to a cluster of gcloud compute nodes - which is awesome!! Thanks so much for adding this user-friendly function.
One issue I'm running into, however, concerns the behavior when one of my gcloud compute nodes goes down unexpectedly.
Here's what I see:
Error in unserialize(node$con) :
Failed to retrieve the value of ClusterFuture from cluster node #1 (on ‘35.190.151.35’). The reason reported was ‘error reading from connection’
Calls: future_lapply ... FutureRegistry -> collectValues -> value -> value.ClusterFuture
Execution halted
Is there a good way to catch these errors for individual nodes, so that I can still access results from the nodes which are still executing? IE, can we pass an on.error function to call to values(fs)?
For now I have wrapped these in a call to withCallingHandlers() to catch & ignore this error. I haven't tested it in a real-life situation, but assuming it works this may be something to include in your vignette Common Issues with Solutions.
The code currently looks like something the following:
withCallingHandlers({
remote_jobs <- future_lapply(seq_len(num_data_sims),
execute_simtest,
future.seed = 0xBEEF,
future.scheduling = 2
)
}, FutureError = function(e) NULL
)
- 主要言語
- R
- スター
- 219
- フォーク
- 20
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
futureverse/future.apply のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
futureverse/future.apply#129 · コメント 2 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 40/100
futureverse/future.apply#128 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
futureverse/future.apply#112 · コメント 3 件 ·
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
futureverse/future.apply#108 · コメント 3 件 ·
-
feature request
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
futureverse/future.apply#101 · コメント 4 件 ·
futureverse/future.apply の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
archaeothommy/ASTR#62 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
ImpactMojo/ImpactMojo#1286 ·
メンテナーはふだん 1 日以内に返信