Liao, Jie
a4875c66b8
test: add test for per-attack image directories and improve error handling
...
- Add test_generate_test_cases.py to verify each attack uses its own image directory
- Improve error messages in unified_registry for failed imports with more context
- Add null checks in generate_test_cases.py for attack initialization failures
- Reduce excessive max_tokens in judge_utils from 130000 to 10000 for efficiency
- Add missing ThreadPoolExecutor import in qr/attack.py
- Fix missing newline in pyproject.toml
2026-03-02 12:41:12 +08:00
Liao, Jie
c17ed45e34
refactor: simplify logging statements and fix deadlock in batch error handling
...
- Consolidate multi-line logging statements into single lines for consistency
- Add critical note about lock acquisition in _save_batch docstring
- Fix potential deadlock: remove lock acquisition in error handler as caller already holds lock
- Remove trailing whitespace in process_with_strategy
2026-02-27 21:30:09 +08:00
Liao, Jie
04a1cbe8d1
refactor: consolidate duplicate code and fix deadlock bug
...
- Extract duplicate attack/defense config merging into _merge_component_configs()
- Extract duplicate lazy loading logic into _get_component()
- Move content policy detection to BaseModel base class
- Fix BatchSaveManager deadlock by splitting flush logic
- Add TypeError to ValueError conversion for consistent config errors
- Move _determine_load_model() to BaseComponent (explicit field only)
2026-01-23 12:55:34 +08:00
Liao, Jie
84a4d1708e
Enhance project configuration and structure: Added build-system requirements in pyproject.toml, updated README for installation instructions, and refactored attack classes to utilize a new create_test_case method. Introduced a plugins.yaml for component registration and removed the legacy registry initialization file.
2025-12-18 23:36:12 +08:00
leo0481
b71096946c
update code
2025-12-09 22:30:51 +08:00