[typing] better return typehints for from_pretrained (#39184)

* config

* processor

* feature-extractor

* jukebox

* fixup

* update other methods in config

* remove "PretrainedConfig" annotations
This commit is contained in:
Pavel Iakubovskii
2025-07-03 15:22:47 +01:00
committed by GitHub
parent a25fc3592e
commit e15b06d8dc
11 changed files with 36 additions and 27 deletions

View File

@@ -2616,7 +2616,7 @@ class PreTrainedModel(nn.Module, ModuleUtilsMixin, PushToHubMixin, PeftAdapterMi
return config
@classmethod
def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False) -> PretrainedConfig:
def _check_and_enable_sdpa(cls, config, hard_check_only: bool = False):
"""
Checks the availability of SDPA for a given model.