BUG: ColloquialWordswapConverter identifier ignores custom substitution values
メンテナーはふだん 2 日以内に返信
評価
調査の方向性
Read ColloquialWordswapConverter's identifier construction and compare it with LeetspeakConverter, which the issue identifies as handling full custom mappings. Check how the converter's identifier is tested; done means configurations with identical keys but different substitution values have different identifiers and both can register. A linked open pull request indicates this work is already underway.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
ColloquialWordswapConverter identifies custom_substitutions only by their keys (substitution_keys). Two converters whose custom dictionaries have the same words but different substitutions produce different output but share one hash.
Because the default registry name comes from that hash, registering a second configuration without a custom name raises a duplicate-name error, and memory and analytics cannot tell the configurations apart. LeetspeakConverter already handles the same case by adding a custom_substitutions_hash of the full mapping. This is the same kind of problem as #3242 and #3244.
Steps/Code to Reproduce
import asyncio
from pyrit.converter import ColloquialWordswapConverter
from pyrit.registry import ConverterRegistry
papa = ColloquialWordswapConverter(deterministic=True, custom_substitutions={"father": ["papa"]})
bapa = ColloquialWordswapConverter(deterministic=True, custom_substitutions={"father": ["bapa"]})
print(papa.get_identifier().unique_name, bapa.get_identifier().unique_name)
print(asyncio.run(papa.convert_async(prompt="my father")).output_text)
print(asyncio.run(bapa.convert_async(prompt="my father")).output_text)
registry = ConverterRegistry()
registry.instances.register(papa)
registry.instances.register(bapa)
Expected Results
The two converters have different identifiers, and both register.
Actual Results
ColloquialWordswapConverter::ab18d07b ColloquialWordswapConverter::ab18d07b
my papa
my bapa
ValueError: Instance 'ColloquialWordswapConverter::ab18d07b' already exists
Screenshots
N/A
Versions
- OS: Windows 11
- Python version: 3.11.9
- PyRIT version: installed from main (5b594e00) in editable mode
- 主要言語
- Python
- スター
- 4.6k
- フォーク
- 962
- 平均マージ
- 2日 16時間
- マージ済み PR(30日)
- 354
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/PyRIT のほかの issue
-
BUG: label queries only return the final conversation of an attack対応中かも @u7k4rs6 が 5 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
microsoft/PyRIT#3095 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
microsoft/PyRIT#3325 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
Detection coverage gaps: 47 missed payload classes across 9 output scorers対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 53/100
メンテナーはふだん 2 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 46/100
メンテナーはふだん 2 日以内に返信
-
BUG: Tone, Tense, Translation, Noise, ScientificTranslation and Variation converter identifiers ignore a custom prompt_template対応中かも @ShivamSharma43 が 1 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 20/100
メンテナーはふだん 2 日以内に返信
microsoft/PyRIT の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 66/100
AlexsLemonade/scpca-docs#518 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
rocketride-org/rocketride-server#2705 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
Metabuilder-Labs/tokenjam#786 ·
メンテナーはふだん 1 日以内に返信
-
prototype(verifier_token): map disallowed warning to contraindicated before composite precedence check対応中かも @drk-ram が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
agentrust-io/trace-spec#582 ·
メンテナーはふだん 1 日以内に返信
-
area:cli priority:low refactor size:small
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
RonaldHensbergen/composable-data-stack#906 ·
メンテナーはふだん 1 日以内に返信