Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Graceful error handling in future_lapply

オープン
#32 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
r

調査の方向性

レポートで説明されている future_lapply の呼び出しと values(fs) のパスから開始し、クラスターノードへの接続に失敗したときに FutureError がどのように処理されるかを追跡します。Done は、完了したノードの結果を保持しつつ、個々のノードが失敗した場合の明確な動作として定義する必要があります。その動作は、要求されたエラーハンドリングインターフェースを通じて文書化するか、公開する必要があります。

索引モデルが issue の本文から書いたものです。

説明

feature request

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 はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

futureverse/future.apply のほかの issue

futureverse/future.apply の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。