[Feature] Catch signals for SLURM jobs?
まだ誰も着手していません。
評価
調査の方向性
SLURM のジョブ実行パスと、scancel 周辺の Python による SIGTERM 処理から始めてください。この issue ではファイルもテストも特定されていません。キャンセルを TemporaryDirectory のクリーンアップを可能にする例外に変換すべきかを判断し、その後、実装する前に期待される動作を定義してテストしてください。
索引モデルが issue の本文から書いたものです。
説明
This is just a thought triggered by an observation.
We noticed that when a SLURM job is scanceled that is currently inside a tempfile.TemporaryDirectory context manager, the context is not unwound (leaving behind a temporary directory that could potentially be large and which could potentially accumulate on nodes over time).
Apparently, this is expected behavior as the __exit__ block only runs during normal Python exception unwinding.
Now, I believe as an executorlib user one can work around this by catching the SIGTERM signal directly in the corresponding Python code and raising an exception instead, allowing the code to unwind. Or perhaps executorlib could do this for us, such that cancelling a slurm job is seen by the Python code as an exception being raised rather than a SIGTERM.
I'm not sure whether it is a good idea for executorlib to do this sort of transformation, just wanted to mention the idea
@gitdowski
- 主要言語
- Python
- スター
- 77
- フォーク
- 7
- 平均マージ
- 10時間 32分
- マージ済み PR(30日)
- 12
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
pyiron/executorlib のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyiron/executorlib#1054 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyiron/executorlib#1032 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
pyiron/executorlib#1005 ·
-
documentation
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
pyiron/executorlib#999 · コメント 1 件 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
pyiron/executorlib#942 ·
pyiron/executorlib の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100