Skip to content

Fix bugs related to lightning 2.6.0 and transformer 5.0.0#28

Merged
chcwww merged 6 commits intontumlgroup:masterfrom
chcwww:fix_wf
Feb 15, 2026
Merged

Fix bugs related to lightning 2.6.0 and transformer 5.0.0#28
chcwww merged 6 commits intontumlgroup:masterfrom
chcwww:fix_wf

Conversation

@chcwww
Copy link
Contributor

@chcwww chcwww commented Feb 13, 2026

What does this PR do?

This PR aims to fix two bugs introduced by the lightning 2.6.0 and transformer 5.0.0.

  1. In the release of lightning 2.6.0 (link), they exposed weights_only argument and let torch handle default value, which was set to True in torch 2.6.
    However, before this update, lightning used weights_only=False as the default for torch.load().
    Therefore, after the update, we have to explicitly add weights_only=False to avoid registration problems during serialization.

  2. In the release of transformer 5.0.0 (link), they no longer handle torchscript in the __init__() of class PretrainedConfig (which they did in previous versions: link).
    Therefore, this flag is no longer removed during the initialization of the config class (link), and ends up being passed to class BertModel directly as unused_kwargs.
    However, torchscript is not a valid argument for class BertModel.
    To sum up, we decided to remove torchscript=True.

Test CLI & API (bash tests/autotest.sh)

Test APIs used by main.py.

  • Test Pass
    • (Copy and paste the last outputted line here.)
  • Not Applicable (i.e., the PR does not include API changes.)

Check API Document

If any new APIs are added, please check if the description of the APIs is added to API document.

  • API document is updated (linear, nn)
  • Not Applicable (i.e., the PR does not include API changes.)

Test quickstart & API (bash tests/docs/test_changed_document.sh)

If any APIs in quickstarts or tutorials are modified, please run this test to check if the current examples can run correctly after the modified APIs are released.

@chcwww chcwww requested review from a team and cjlin1 as code owners February 13, 2026 11:58
Copy link
Contributor

@Eleven1Liu Eleven1Liu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chcwww chcwww merged commit 9b9b8a3 into ntumlgroup:master Feb 15, 2026
1 check passed
@Eleven1Liu Eleven1Liu added release PyPI release tag is in this PR bug Something isn't working model/nn and removed release PyPI release tag is in this PR labels Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working model/nn

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants