refactor: remove deprecations past their removal window for v0.11.1 - #645
Merged
Conversation
Per the deprecation policy in utils/deprecation.py (raise for one release at the deprecated version, then remove in the next release), remove everything whose window closed at v0.11.0 or earlier: - Delete RBLNAutoConfig.load and RBLNModelConfig.load (deprecated since v0.11.0; from_pretrained is the replacement and both were pure delegating aliases). No remaining callers in src/tests/examples/docs. - Drop @deprecate_kwarg(max_seq_lens -> max_seq_len, v0.11.0) from Qwen2-VL / Qwen2.5-VL / Qwen3-VL vision configs. - Drop @deprecate_kwarg(pad_token_id, v0.10.0) from seq2seq config and @deprecate_kwarg(num_mel_bins, v0.10.0) from AST config (both overdue). Old kwargs now fail with the standard "Unexpected arguments" ValueError from RBLNModelConfig.__init__. Deprecations targeting v0.12.0 (model_input_shapes, tensor_parallel_size, _torch_dtype) are kept. Co-Authored-By: Claude Fable 5 <noreply@anthropic.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.
Summary
Per the deprecation policy in
src/optimum/rbln/utils/deprecation.py(raise an error for one release at the deprecated version, then remove in the following release), this removes everything whose window closed at v0.11.0 or earlier, ahead of the v0.11.1 release.Removed (past due)
RBLNAutoConfig.load,RBLNModelConfig.loaddeprecate_method→from_pretrainedmax_seq_lens→max_seq_len(Qwen2-VL / Qwen2.5-VL / Qwen3-VL vision configs)deprecate_kwargpad_token_id(RBLNModelForSeq2SeqLMConfig)deprecate_kwargnum_mel_bins(RBLNASTForAudioClassificationConfig)deprecate_kwargThe
loadmethods were pure delegating aliases offrom_pretrained, so the whole method (not just the decorator) is deleted. A repo-wide search (src / tests / examples / docs, including comments and docstrings) found no remaining callers or references; the only hits were the deleted methods' own docstring examples. Theloadexample indeprecation.py's docstring is a generic usage illustration of the decorator and is kept.Old kwargs now fail with the standard
ValueError: Unexpected argumentsfromRBLNModelConfig.__init__, so misuse still surfaces clearly.Kept (window not yet closed — v0.12.0)
model_input_shapes(configuration_generic.py)tensor_parallel_size→num_devices,_torch_dtype→dtype(configuration_utils.py)Verification
ruff format --checkandruff check --select Ipass on all edited files.python -m py_compilepasses.pytest tests/test_config.py tests/test_base.pycould not collect in my local environment due to a pre-existingrebel._Cversion mismatch unrelated to this change; the existing deprecation tests only cover the v0.12.0 deprecations, which are untouched. Please rely on CI for the test run.🤖 Generated with Claude Code