[BREAKING] MAINT: remove deprecations scheduled for v0.15.0#1951
Open
romanlutz wants to merge 1 commit into
Open
[BREAKING] MAINT: remove deprecations scheduled for v0.15.0#1951romanlutz wants to merge 1 commit into
romanlutz wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
MessagePieceoriginator,scorer_identifier,scores,targeted_harm_categories(the kwarg warnings tracked by_DEPRECATED_KWARGSare gone too)OriginatoraliasAttackResult/AttackResultEntryattack_identifierproperty and the before-validator that promotedattack_identifier=toatomic_attack_identifierAttackResultEntry.attack_identifiercolumn (andPromptMemoryEntry.targeted_harm_categoriescolumn) dropped via Alembic migrationf1a2b3c4d5e6Memory
MemoryInterface.export_conversations,SQLiteMemory.export_conversations,SQLiteMemory.export_all_tables,MemoryExporter(module deleted)get_attack_resultskwargsattack_classandtargeted_harm_categories, plus the per-backend_get_attack_result_harm_category_conditionhelpersTargets / converters / scorers
HuggingFaceEndpointTarget(class deleted)AzureMLChatTarget(message_normalizer=...)OpenAIImageTarget:styleparam, DALL-E sizes (256x256,512x512,1792x1024,1024x1792), DALL-E qualities (standard,hd), URL fallback in_get_image_bytes_asyncuse_entra_authon both Azure Speech converters and onAudioTranscriptHelper/AudioTrueFalseScorer/AudioFloatScaleScorerAzureSpeechAudioToTextConverter.recognize_audiox_pos/y_posonAddTextImageConverterandAddImageTextConverterModels / scenarios
ScenarioStrategy.normalize_strategiesContentHarms/ContentHarmsStrategyaliases (module deleted)ChatMessage.to_json/from_json,EmbeddingResponse.to_json,ScorerMetrics.from_jsonDownstream rewires
SelectorScopeandcompute_technique_statsno longer accepttargeted_harm_categories. The adaptive-scenario harm-category filter loses its backing query; per discussion this is accepted feature loss until it is reimplemented over thelabelsfilter onAttackResult.conversation_managerqueries memory for prepended-conversation scores instead of reading the removedMessagePiece.scoresfield. Lookup is byconversation_idso it resolves the duplicated pieces written byadd_prepended_conversation_to_memory_async.get_prompt_scoresqueriesScoreEntrydirectly byprompt_request_response_idinstead of relying on the relationship-loadedpiece.scoresattribute.Things worth a careful look
batch_alter_table(for SQLite portability). Existing rows lose any data still pinned toattack_identifierortargeted_harm_categories; the load path no longer falls back to those columns, so legacy rows that only hadattack_identifierwill hydrate withatomic_attack_identifier=None.conversation_managerextraction of prepended-conversation scores now requires the user to have actually persisted those scores viaadd_scores_to_memory(the in-memory "attach topiece.scores" pattern is gone). Tests were updated accordingly.Tests and Documentation
make unit-testruns cleanly: 9311 passed, 120 skipped.pre-commit run --all-filesis green (ruff, ty, Alembic migration check).