BUG: SelfAskGeneral scorers leave their output keys out of the identifier
Maintainer thường phản hồi trong vòng 2 ngày
@Hrushikesh-ramilla đang làm issue này rồi.
Từ ngày 3/11/2026.
- #3847 của @Hrushikesh-ramilla — đang mở
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Bắt đầu từ _build_identifier trong pyrit/score/self_ask_general_true_false_scorer.py (khoảng dòng 136) và phương thức tương ứng trong pyrit/score/self_ask_general_float_scale_scorer.py (khoảng dòng 137), sau đó kiểm tra xem trong năm đối số *_output_key đã có những đối số nào được ghi lại. Thêm các khóa còn thiếu vào cả hai identifier, rồi chạy script tái hiện trong issue để xác nhận các output key khác nhau hiện tạo ra các hash unique_name khác nhau. Hoàn thành khi identifier của hai scorer khác nhau với từng khóa và các test scorer hiện có vẫn chạy thành công.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The five *_output_key arguments of SelfAskGeneralTrueFalseScorer and SelfAskGeneralFloatScaleScorer decide which field of the judge's JSON becomes the score, the rationale and the rest. _build_identifier records none of them (self_ask_general_true_false_scorer.py:136, self_ask_general_float_scale_scorer.py:137), so two scorers that read different fields share one hash. Split out of #3477, which only closes the converter side.
Steps/Code to Reproduce
Run on main at 5fb4fb977.
import asyncio
from pyrit.prompt_target import OpenAIChatTarget
from pyrit.score import NumericRange, SelfAskGeneralFloatScaleScorer, SelfAskGeneralTrueFalseScorer
from pyrit.setup import IN_MEMORY, initialize_pyrit_async
async def main() -> None:
await initialize_pyrit_async(memory_db_type=IN_MEMORY, silent=True)
target = OpenAIChatTarget(endpoint="https://example.invalid/v1", api_key="unused", model_name="model-a")
for key in ("score_value", "verdict"):
kwargs = {"chat_target": target, "system_prompt_format_string": "Score this.", "score_value_output_key": key}
print(key, SelfAskGeneralTrueFalseScorer(**kwargs).get_identifier().unique_name)
print(key, SelfAskGeneralFloatScaleScorer(scale=NumericRange(minimum_value=0, maximum_value=100), **kwargs).get_identifier().unique_name)
asyncio.run(main())
Expected Results
Different output keys, different identifiers.
Actual Results
score_value SelfAskGeneralTrueFalseScorer::ddd340c4
score_value SelfAskGeneralFloatScaleScorer::61870892
verdict SelfAskGeneralTrueFalseScorer::ddd340c4
verdict SelfAskGeneralFloatScaleScorer::61870892
Versions
- OS: Windows 11
- Python version: 3.12.0
- PyRIT version: source checkout of
mainat5fb4fb977
System:
python: 3.12.0 (tags/v3.12.0:0fb18b0, Oct 2 2023, 13:03:39) [MSC v.1935 64 bit (AMD64)]
executable: C:\dev\pyr-main\Scripts\python.exe
machine: Windows-11-10.0.26300-SP0
Python dependencies:
pyrit: 1.2.0.dev0
Cython: None
numpy: 2.4.6
openai: 2.54.0
packaging: 26.3
pip: 23.2.1
scipy: 1.17.1
setuptools: 84.2.1
sqlite3: None
torch: None
transformers: 5.20.2
The scorer side of the registry-wide test can pick this up once #3312 lands.
- Ngôn ngữ chính
- Python
- Star
- 4.7k
- Fork
- 1k
- Merge trung bình
- 2 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 450
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/PyRIT
-
Scenario objective previews can split supplementary Unicode during truncationCó thể đã có người làm @Aadithya-kl đã nhận hôm nay. Đang mởBug: triage help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
microsoft/PyRIT#3870 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
URLDataTypeSerializer treats mixed-case HTTP(S) schemes as local pathsCó thể đã có người làm @akhil9tiet đã nhận hôm nay. Đang mởBug: triage help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/PyRIT#3861 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Parameter required status is lost after wire round-tripCó thể đã có người làm @its-amann đã nhận hôm nay. Đang mởBug: triage help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/PyRIT#3854 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
BUG: LLMGenericTextConverter identifier changes between processes for set-valued template parametersĐang mởBug: triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
GUI rejects valid empty-string SearchReplaceConverter settings, preventing deletion convertersCó thể đã có người làm @Darshika140 đã nhận 1 ngày trước. Đang mởhelp wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
microsoft/PyRIT#3749 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 2 ngày
Tất cả issue của microsoft/PyRIT
Issue tương tự
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 78/100
QuantConnect/Documentation#2838 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
awslabs/route53-dynamic-dns-with-lambda#67 · 1 bình luận ·
-
`SubAgents` returns a child run's `DeferredToolRequests` to the parent as a successful tool resultĐang mởbug pkg:harness
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
pydantic/pydantic-ai#12405 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
good first issue help wanted
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
good first issue help wanted
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100