Background/asynchronous sampling (feature request & design discussion)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まずさまざまな run メソッドを見つけ、processx プロセスがどのように開始され、ポーリングされるかを確認します。最初にリンクされている processx と ps の議論を読んでください。バックグラウンドチェーン、永続化されたプロセス状態、ファイルベースの出力ポーリングがフォアグラウンドの R セッションのクラッシュをまたいで機能して初めて、設計は完成です。
索引モデルが issue の本文から書いたものです。
説明
I propose modification of the various run methods to enable doing so in the background rather than occupying the foreground R session. This is useful for scenarios where one wants to do other things without launching a new session, as well as to make runs robust to crashes of the foreground R session.
To achieve this, I propose separating out the initiation and polling of the processx processes.
To enable continued running amidst crashes of the foreground R session, I propose starting the processes with cleanup=FALSE and saving the PID in an RDS file so that ps can be used to resume management of the process. This also requires that files be used for stdout and stderr (rather than the processx default of using pollable pipes back to the R session) so that monitoring progress can resume by simply checking these files. This latter in turn calls for a change in the cmdstanr approach to polling from using the build-in processx polling to polling based on checking/parsing the stdout/stderr files (using mod time or filesize to inform whether to bother looking for newlines).
While not necessary for the above, I propose storing these files in a folder called stan_scratch (whose default-but-configurable location is the current working dir). (n.b. said folder is involved in the proposed implementations of these FRs as well: During-sampling diagnostics, Recompile only on changes to output of stanc3 auto-formatter )
Similarly, I propose starting a separate process for each chain (in parallel if parallel chains are requested). (I'm pretty sure that's what cmdstanr does already, but wanted to be explicit here)
- 主要言語
- R
- スター
- 164
- フォーク
- 69
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 48
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
stan-dev/cmdstanr のほかの issue
-
internal-code
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
stan-dev/cmdstanr#506 · コメント 7 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Model methods fail on a reloaded fit when the data was passed in memory対応中かも @jgabry が 1 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
メンテナーはふだん 1 日以内に返信
-
internal-code
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
stan-dev/cmdstanr#1314 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
feature
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
stan-dev/cmdstanr#1175 · コメント 1 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
stan-dev/cmdstanr の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
mlr-org/mlr3cmprsk#42 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 67/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
tidymodels/orbital#192 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
mitchelloharawild/ggtime#39 ·