Skip to content

refactor(config): remove RBLNConfig.load() past its 0.11.0 removal deadline - #644

Closed
rebel-jongho wants to merge 1 commit into
devfrom
refactor/remove-deprecated-config-load
Closed

refactor(config): remove RBLNConfig.load() past its 0.11.0 removal deadline#644
rebel-jongho wants to merge 1 commit into
devfrom
refactor/remove-deprecated-config-load

Conversation

@rebel-jongho

@rebel-jongho rebel-jongho commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Pull Request Description

Type of Change

  • Code refactoring

Changes Overview

Deletes the two deprecated load() classmethods from src/optimum/rbln/configuration_utils.py, decorator included.

  • RBLNAutoConfig.load() and RBLNModelConfig.load() were thin wrappers forwarding their arguments verbatim to from_pretrained(), so callers only need to change the method name.
  • The deprecate_method import goes with them, since nothing in that module uses it anymore. The helper itself stays in utils/deprecation.py next to deprecate_kwarg and remains covered by tests/test_base.py::test_deprecate_method_raises_at_or_past_cutoff.

No test changes are needed: test_load_config_object was already switched to from_pretrained() in 48217ce.

Motivation and Context

Both methods carried @deprecate_method(version="0.11.0", new_method="from_pretrained"), and every 0.11.x build is now past that cutoff, so calling either one raises ValueError instead of warning. Two things put us there:

  1. v0.11.0.post1 became reachable from dev with the back-merge in other: revert misplaced post1 commit and back-merge main into dev #618, which pushed the hatch-vcs derived version to 0.11.0.post2.devN.
  2. other(deprecation): apply cutoff to pre-, post-, and dev-releases #614 normalized the cutoff to compare PEP 440 base versions, so alpha and dev builds (0.11.1aN.devM) are past it as well.

The deprecation policy table at the top of utils/deprecation.py prescribes exactly this sequence: raise for one version, then drop the decorator. This PR performs that removal step.

No callers remain. auto_factory.py moved to from_pretrained() in 235075e, test_load_config_object in 48217ce, and a repository-wide search turns up no other references beyond the unrelated load_from_dict.

Verification

ruff check and ruff format pass on the changed file. The change is a pure deletion of two unreachable wrappers plus the import that served them, so behaviour is unchanged for every code path that still works today.

Out of Scope

The three max_seq_lensmax_seq_len deprecate_kwarg entries on the Qwen2-VL / Qwen2.5-VL / Qwen3-VL vision configs share the same 0.11.0 cutoff and are equally past it, but no test or internal caller exercises them, so they are left for a follow-up.

Related Issues

SR-365

@rebel-jongho
rebel-jongho force-pushed the refactor/remove-deprecated-config-load branch from f2ef9b1 to aea2034 Compare July 27, 2026 04:53
…adline

`RBLNAutoConfig.load()` and `RBLNModelConfig.load()` were thin wrappers that
forwarded their arguments to `from_pretrained()`, marked for removal in 0.11.0
via `@deprecate_method`. Every 0.11.x build now raises on call: the current
release is v0.11.0.post1, and since #614 the cutoff compares PEP 440 base
versions, so alpha and dev builds are past it too. The deprecation policy in
`utils/deprecation.py` calls for dropping them at this point.

The now-unused `deprecate_method` import is dropped as well; the helper itself
stays in `utils/deprecation.py` alongside `deprecate_kwarg` and is still
covered by tests/test_base.py.

Callers were already migrated: auto_factory.py in 235075e and
test_load_config_object in 48217ce.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@rebel-jongho
rebel-jongho marked this pull request as ready for review July 27, 2026 04:54
@rebel-jongho rebel-jongho mentioned this pull request Jul 27, 2026
9 tasks
rebel-seinpark added a commit that referenced this pull request Jul 27, 2026
Every 0.11.x build is past the 0.11.0 removal deadline, so the old
`max_seq_lens` name already raises. Remove the decorator (and its now-unused
import) from RBLNQwen3_5VisionModelConfig; `max_seq_len` is unaffected.
This is the qwen3_5 slice of the follow-up deferred in #644.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rebel-thkim

Copy link
Copy Markdown
Contributor

already merged in #645

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