[Feature] Catch signals for SLURM jobs?

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
活発
技術スタック
python
領域
hpc

調査の方向性

SLURM のジョブ実行パスと、scancel 周辺の Python による SIGTERM 処理から始めてください。この issue ではファイルもテストも特定されていません。キャンセルを TemporaryDirectory のクリーンアップを可能にする例外に変換すべきかを判断し、その後、実装する前に期待される動作を定義してテストしてください。

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

説明

enhancement

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

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

pyiron/executorlib のほかの issue

pyiron/executorlib の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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