Skip to content

test: cover deprecated Hooked model loaders - #1581

Closed
tomatotomata wants to merge 2 commits into
TransformerLensOrg:dev-4.xfrom
tomatotomata:codex/deprecation-warning-regressions
Closed

test: cover deprecated Hooked model loaders#1581
tomatotomata wants to merge 2 commits into
TransformerLensOrg:dev-4.xfrom
tomatotomata:codex/deprecation-warning-regressions

Conversation

@tomatotomata

Copy link
Copy Markdown

What changed

Added one regression test for each deprecated Hooked*.from_pretrained path on dev-4.x, asserting the warning names the legacy class and points to TransformerBridge.boot_transformers(...).

Added a narrowly scoped pytest warning filter for those known internal compatibility warnings. The tests use pytest.warns, so they continue to observe the warning instead of hiding regressions.

Validation

  • pytest tests/unit/test_deprecation_warnings.py -q: 3 passed.
  • black --check tests/unit/test_deprecation_warnings.py: passed.
  • mypy . --no-incremental: passed with no issues in 417 source files.
  • Unit-test collection succeeds with 5,205 tests after the sparse checkout was completed.
  • The full tests/unit -m "not slow" run exceeded four minutes locally, so the repository CI matrix should provide the full-suite result.

Closes #1564

@jlarson4

jlarson4 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

@tomatotomata Is this ready for review?

@jlarson4

jlarson4 commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

Closing, as we have another PR that is covering this issue. Thanks for working on this @tomatotomata!

@jlarson4 jlarson4 closed this Aug 3, 2026
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.

[Proposal] Regression tests for Hooked* deprecation warnings + scoped filterwarnings policy

2 participants