Skip to content

[BREAKING] MAINT: remove deprecations scheduled for v0.15.0#1951

Open
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz/remove-v0-14-0-deprecations
Open

[BREAKING] MAINT: remove deprecations scheduled for v0.15.0#1951
romanlutz wants to merge 1 commit into
microsoft:mainfrom
romanlutz:romanlutz/remove-v0-14-0-deprecations

Conversation

@romanlutz
Copy link
Copy Markdown
Contributor

Description

Now that v0.14.0 has shipped, this PR removes every API marked removed_in="0.15.0". The deprecation warnings have been live for a full release cycle, so users have had the heads-up they need.

What goes away

MessagePiece

  • Fields: originator, scorer_identifier, scores, targeted_harm_categories (the kwarg warnings tracked by _DEPRECATED_KWARGS are gone too)
  • Module-level Originator alias

AttackResult / AttackResultEntry

  • attack_identifier property and the before-validator that promoted attack_identifier= to atomic_attack_identifier
  • AttackResultEntry.attack_identifier column (and PromptMemoryEntry.targeted_harm_categories column) dropped via Alembic migration f1a2b3c4d5e6

Memory

  • MemoryInterface.export_conversations, SQLiteMemory.export_conversations, SQLiteMemory.export_all_tables, MemoryExporter (module deleted)
  • get_attack_results kwargs attack_class and targeted_harm_categories, plus the per-backend _get_attack_result_harm_category_condition helpers

Targets / converters / scorers

  • HuggingFaceEndpointTarget (class deleted)
  • AzureMLChatTarget(message_normalizer=...)
  • OpenAIImageTarget: style param, DALL-E sizes (256x256, 512x512, 1792x1024, 1024x1792), DALL-E qualities (standard, hd), URL fallback in _get_image_bytes_async
  • use_entra_auth on both Azure Speech converters and on AudioTranscriptHelper / AudioTrueFalseScorer / AudioFloatScaleScorer
  • AzureSpeechAudioToTextConverter.recognize_audio
  • Positional arg support + x_pos/y_pos on AddTextImageConverter and AddImageTextConverter

Models / scenarios

  • ScenarioStrategy.normalize_strategies
  • ContentHarms / ContentHarmsStrategy aliases (module deleted)
  • ChatMessage.to_json/from_json, EmbeddingResponse.to_json, ScorerMetrics.from_json

Downstream rewires

  • SelectorScope and compute_technique_stats no longer accept targeted_harm_categories. The adaptive-scenario harm-category filter loses its backing query; per discussion this is accepted feature loss until it is reimplemented over the labels filter on AttackResult.
  • conversation_manager queries memory for prepended-conversation scores instead of reading the removed MessagePiece.scores field. Lookup is by conversation_id so it resolves the duplicated pieces written by add_prepended_conversation_to_memory_async.
  • get_prompt_scores queries ScoreEntry directly by prompt_request_response_id instead of relying on the relationship-loaded piece.scores attribute.

Things worth a careful look

  • The Alembic migration drops two columns inside a batch_alter_table (for SQLite portability). Existing rows lose any data still pinned to attack_identifier or targeted_harm_categories; the load path no longer falls back to those columns, so legacy rows that only had attack_identifier will hydrate with atomic_attack_identifier=None.
  • conversation_manager extraction of prepended-conversation scores now requires the user to have actually persisted those scores via add_scores_to_memory (the in-memory "attach to piece.scores" pattern is gone). Tests were updated accordingly.

Tests and Documentation

  • make unit-test runs cleanly: 9311 passed, 120 skipped.
  • pre-commit run --all-files is green (ruff, ty, Alembic migration check).
  • Tests targeting the removed deprecation paths are deleted; tests that still need the underlying functionality (e.g. analytics, conversation-manager score extraction) were rewritten against the new flows.
  • No documentation pages reference the removed APIs after the cleanup; no JupyText runs were required.

Now that v0.14.0 has shipped, drop every API marked removed_in="0.15.0":

* MessagePiece fields originator, scorer_identifier, scores, and
  targeted_harm_categories (plus their Pydantic kwarg warnings)
* AttackResult.attack_identifier property + promotion validator
* AttackResultEntry.attack_identifier column and
  PromptMemoryEntry.targeted_harm_categories column (with Alembic
  migration f1a2b3c4d5e6)
* MemoryInterface.export_conversations, SQLiteMemory.export_conversations,
  SQLiteMemory.export_all_tables, MemoryExporter shim + module
* MemoryInterface.get_attack_results kwargs attack_class and
  targeted_harm_categories, and the per-backend harm-category condition
  helpers (callers should use the labels filter going forward)
* ScenarioStrategy.normalize_strategies, ContentHarms/ContentHarmsStrategy
  aliases, AzureSpeechAudioToTextConverter.recognize_audio,
  HuggingFaceEndpointTarget (deleted entirely)
* AzureMLChatTarget(message_normalizer=...),
  OpenAIImageTarget style param + DALL-E sizes/qualities + URL fallback,
  use_entra_auth on AzureSpeech*Converter and Audio*Scorer helpers,
  positional / x_pos / y_pos kwargs on AddTextImageConverter and
  AddImageTextConverter
* ChatMessage.to_json/from_json, EmbeddingResponse.to_json,
  ScorerMetrics.from_json deprecated aliases

Downstream rewires: SelectorScope and compute_technique_stats no longer
accept targeted_harm_categories (per the user-approved feature loss);
conversation_manager queries memory for prepended-conversation scores
instead of relying on the removed MessagePiece.scores field; get_prompt_scores
resolves scores against ScoreEntry directly. Tests for deprecated paths are
deleted; callers using those paths are migrated.

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