Fix bugs related to lightning 2.6.0 and transformer 5.0.0#28
Merged
chcwww merged 6 commits intontumlgroup:masterfrom Feb 15, 2026
Merged
Fix bugs related to lightning 2.6.0 and transformer 5.0.0#28chcwww merged 6 commits intontumlgroup:masterfrom
lightning 2.6.0 and transformer 5.0.0#28chcwww merged 6 commits intontumlgroup:masterfrom
Conversation
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.
What does this PR do?
This PR aims to fix two bugs introduced by the
lightning2.6.0 andtransformer5.0.0.In the release of
lightning2.6.0 (link), they exposedweights_onlyargument and lettorchhandle default value, which was set toTrueintorch2.6.However, before this update,
lightningusedweights_only=Falseas the default fortorch.load().Therefore, after the update, we have to explicitly add
weights_only=Falseto avoid registration problems during serialization.In the release of
transformer5.0.0 (link), they no longer handletorchscriptin the__init__()ofclass 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 BertModeldirectly asunused_kwargs.However,
torchscriptis not a valid argument forclass BertModel.To sum up, we decided to remove
torchscript=True.Test CLI & API (
bash tests/autotest.sh)Test APIs used by main.py.
Check API Document
If any new APIs are added, please check if the description of the APIs is added to API document.
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.