Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/transformers/configuration_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ class PreTrainedConfig(PushToHubMixin, RotaryEmbeddingConfigMixin):
label2id: dict[str, int] | dict[str, str] | None = None
problem_type: Literal["regression", "single_label_classification", "multi_label_classification"] | None = None

Comment on lines 231 to 235

Copilot AI Mar 24, 2026

Copy link

Choose a reason for hiding this comment

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

Removing tokenizer_class from PreTrainedConfig will break existing tests/utilities that treat it as a common config kwarg/field (e.g. tests/utils/test_configuration_utils.py::test_config_common_kwargs_is_complete expects tokenizer_class to be present in PreTrainedConfig().__dict__). Please update the corresponding test expectations (and any shared config_common_kwargs/common-config logic) to reflect the new base config surface, or keep a backward-compatible tokenizer_class field if it’s still considered part of the common config contract.

Copilot uses AI. Check for mistakes.
# Tokenizer kwargs
tokenizer_class: str | PreTrainedTokenizerBase | None = None

def __post_init__(self, **kwargs):
# BC for the `torch_dtype` argument instead of the simpler `dtype`
# Do not warn, as it would otherwise always be triggered since most configs on the hub have `torch_dtype`
Expand Down
Loading