Skip to content

Upgrade transformers to >=4.36.0 to address dependabot alert#4

Merged
romanlutz merged 1 commit into
mainfrom
romanlutz/transformers_upgrade
Jan 14, 2024
Merged

Upgrade transformers to >=4.36.0 to address dependabot alert#4
romanlutz merged 1 commit into
mainfrom
romanlutz/transformers_upgrade

Conversation

@romanlutz

Copy link
Copy Markdown
Contributor

@dlmgary dlmgary self-assigned this Jan 11, 2024
@github-actions

Copy link
Copy Markdown

Test Results

69 tests   69 ✅  13s ⏱️
 1 suites   0 💤
 1 files     0 ❌

Results for commit fb453fb.

@dlmgary
dlmgary self-requested a review January 11, 2024 13:40
@dlmgary dlmgary removed their assignment Jan 11, 2024
@romanlutz
romanlutz merged commit c91b090 into main Jan 14, 2024
@romanlutz
romanlutz deleted the romanlutz/transformers_upgrade branch January 14, 2024 15:24
adrian-gavrila pushed a commit to adrian-gavrila/PyRIT that referenced this pull request Apr 24, 2026
Bundled response to the remaining reviewer comments on the Attack History
filter-Combobox migration.

microsoft#2/microsoft#3  memory: switch `attack_class` and `targeted_harm_categories`
       deprecations in `MemoryInterface.get_attack_results` to the
       project-standard `print_deprecation_message(removed_in="0.15.0")`
       helper; drop the now-unused `import warnings`. No direct successor
       exists for `targeted_harm_categories`; point users at
       `labels={"harm_category": [...]}` (labels supports OR-within-key).

microsoft#4     memory/backend: make attack-class matching case-insensitive to
       match converter-class matching. Removed the explicit
       `case_sensitive=True` override (default is False in every backend);
       flipped the regression test to assert lower/upper/mixed casing all
       match. Service + route docs updated.

microsoft#5     frontend: refactor `AttackHistory.fetchAttacks` request-params
       builder from a stack of seven conditional object spreads into a
       precomputed, explicitly-guarded `params` object for readability.

microsoft#6     frontend: rename `attackClasses` field, `attackClassOptions` prop,
       `attack-class-filter` testid (and all mirrors) to `attackType*` so
       they track the server-side `attack_types` query param.

microsoft#7     backend: rewrite FastAPI `Query` descriptions for `attack_types`,
       `converter_types`, and `label` to spell out "May be specified
       multiple times" semantics with concrete `?key=v1&key=v2` examples.

microsoft#8     backend: widen `attack_types` / `converter_types` annotations from
       `Optional[list[str]]` to `Optional[Sequence[str]]` (matches the
       already-`Sequence`-typed inner label values).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
romanlutz pushed a commit to rlundeen2/PyRIT that referenced this pull request Jul 8, 2026
… lifecycle

Address review findings microsoft#4-microsoft#6 on the adversarial conversation manager:

- microsoft#6 Schema-driven parsing (single source of truth): `_parse_adversarial_reply`
  derives its required/permitted keys from the resolved response schema (`required`,
  `properties`, `additionalProperties`) -- the same schema the manager forwards to
  constrain the target -- instead of a hard-coded copy of the adversarial_chat keys,
  so the parser cannot silently drift from adversarial_chat.yaml. Behavior is identical
  for the shared adversarial_chat schema; `next_message` is always required since the
  attack loop consumes it (enforced at parse time and, for the property, at construction).
- microsoft#5 Naming: rename the manager's `adversarial_first_prompt_template` param/attr/
  property to `first_message`, matching `AttackAdversarialConfig.first_message`.
- microsoft#4 Lifecycle: build the AdversarialConversationManager once per execution in
  RedTeamingAttack (`_build_adversarial_manager`, constructed before the turn loop
  and threaded into `_generate_next_prompt_async`) instead of rebuilding each turn.
- Drop the never-read `_adversarial_response_json_schema` field (keep the
  construction-time "declared on both" validation) and the dead `_DEFAULT_SEED_PROMPT`
  constant; refresh the stale `adversarial_prompt_template` comment.
- Thread the resolved schema through the simulated_conversation parse call.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants