A float-scale aggregate drops rationale-less constituents from its rationale
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
pyrit/score/float_scale/float_scale_score_aggregator.py から始め、フィルタリングされた rationale ブランチを _undetermined_result および true_false_score_aggregator._build_rationale と比較します。format_score_for_rationale と FloatScaleThresholdScorer の docstring を確認し、その後、rationale のない構成要素のカバレッジを追加します。複数の構成要素を持つ float-scale rationale ですべての構成要素が一貫して表現されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
When a float-scale aggregate combines more than one constituent, the constituents without a rationale disappear from the rationale entirely.
In pyrit/score/float_scale/float_scale_score_aggregator.py:
else:
description = aggregate_description
# Only include scores with non-empty rationales
rationale_parts = [format_score_for_rationale(s) for s in scores if s.score_rationale]
rationale = "\n".join(rationale_parts) if rationale_parts else ""
Two things in the same package say the opposite. format_score_for_rationale — the formatter being called — is built to render a line for a rationale-less score (f" - {class_type} {value}: {score.score_rationale or ''}"), and its docstring describes the value and the rationale as what a line carries. The other two rationale builders do not filter: the undetermined branch of this same file (_undetermined_result) and true_false_score_aggregator._build_rationale both pass every constituent through.
The scorer that makes this visible is one this repository already documents: FloatScaleThresholdScorer's own docstring notes that AzureContentFilterScorer "routinely does not" supply a rationale. A multi-chunk or multi-category Azure filter aggregate therefore persists score_rationale == "" — the score is right, but nothing records what was aggregated or that there was more than one constituent, while the same run's true/false aggregates list theirs.
Proposal: drop the filter, so the float-scale rationale matches its two siblings. If the filter is deliberate, the alternative is to keep it and say so in the output (for example a trailing "N constituent(s) had no rationale"), so an empty rationale is distinguishable from a single-component one.
Happy to send the one-line change plus tests either way — I did not want to just delete a line that was written on purpose without asking.
- 主要言語
- Python
- スター
- 4.5k
- フォーク
- 896
- 平均マージ
- 3日 1時間
- マージ済み PR(30日)
- 208
環境構築
このプロジェクトの環境構築ファイルはまだ確認していません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 91/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
Bug: triage GUI help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
microsoft/PyRIT#2868 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pydantic/pydantic-ai#8843 ·
メンテナーはふだん 1 日以内に返信
-
breaking change enhancement server
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
sktime/sktime#11310 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
メンテナーはふだん 1 日以内に返信