Skip to content

Remove deprecated move_model parameter from ActivationCache.to#1344

Merged
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
RecreationalMath:remove-deprecated-move
May 29, 2026
Merged

Remove deprecated move_model parameter from ActivationCache.to#1344
jlarson4 merged 1 commit into
TransformerLensOrg:devfrom
RecreationalMath:remove-deprecated-move

Conversation

@RecreationalMath
Copy link
Copy Markdown
Contributor

@RecreationalMath RecreationalMath commented May 29, 2026

Description

Removed the long-deprecated move_model parameter from ActivationCache.to, along with the spurious DeprecationWarning that fired on every call. The guard if move_model is not None: always evaluated true because the parameter defaulted to False, not None, so the normal cache.to("cpu") idiom always printed a noisy warning.

Net effect: cache.to(device) no longer emits any DeprecationWarning and no longer accepts the removed kwarg. This brings the code in line with the v3.0 release notes, which already announced the removal.

No new tests added as this is a pure removal of dead, deprecated code.

Fixes #1342

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have not rewritten tests relating to key interfaces which would affect backward compatibility

@jlarson4 jlarson4 merged commit 84e90e1 into TransformerLensOrg:dev May 29, 2026
24 checks passed
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