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

[Code scan] Pressure task reports success_rate with the wrong denominator

オープン 初心者向け
#434 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
74/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
python
領域
performance

調査の方向性

lambench/tasks/calculator/pressure/pressure.py の57-84行目から始め、成功したサンプル、失敗した試行、最終メトリクスがどのようにカウントされるかを追跡します。混在したサンプルと、すべて失敗するサンプルを使って pressure タスクを実行し、その後、成功の計算に試行総数を使用し、成功がないケースでは成功率が 0.0 の制御されたメトリクスを返すように計算を更新します。

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

説明

This issue was found by a Codex global repository scan of tracked non-test files at commit 8c93925cb10b401b2b83c738bd9263fd74474468.

Relevant code

https://github.com/deepmodeling/LAMBench/blob/8c93925cb10b401b2b83c738bd9263fd74474468/lambench/tasks/calculator/pressure/pressure.py#L57-L84

Impact

num_samples is incremented only after a successful calculation, while num_fails is incremented for failed attempts. The final formula is (num_samples - num_fails) / num_samples, which can underreport success and can crash when every sample fails.

For example, with one successful sample and one failed sample, the current formula reports (1 - 1) / 1 = 0.0 instead of the expected 1 / 2 = 0.5.

Suggested fix

Track total attempts separately from successful samples. Compute success_rate = num_successes / total_attempts, and return controlled NaN or None metrics plus 0.0 success when there are no successful samples.

主要言語
Python
スター
20
フォーク
11
平均マージ
1分
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

deepmodeling/LAMBench のほかの issue

deepmodeling/LAMBench の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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