MCPcopy Index your code
hub / github.com/SooLab/CGFormer / __init__

Method __init__

bert/tokenization_utils_base.py:1029–1046  ·  view source on GitHub ↗
(self, **kwargs)

Source from the content-addressed store, hash-verified

1027 padding_side: str = "right"
1028
1029 def __init__(self, **kwargs):
1030 # inputs and kwargs for saving and re-loading (see ``from_pretrained`` and ``save_pretrained``)
1031 self.init_inputs = ()
1032 self.init_kwargs = kwargs
1033
1034 # For backward compatibility we fallback to set model_max_length from max_len if provided
1035 model_max_length = kwargs.pop("model_max_length", kwargs.pop("max_len", None))
1036 self.model_max_length = model_max_length if model_max_length is not None else VERY_LARGE_INTEGER
1037
1038 # Padding side is right by default and overridden in subclasses. If specified in the kwargs, it is changed.
1039 self.padding_side = kwargs.pop("padding_side", self.padding_side)
1040 assert self.padding_side in [
1041 "right",
1042 "left",
1043 ], f"Padding side should be selected between 'right' and 'left', current value: {self.padding_side}"
1044 self.model_input_names = kwargs.pop("model_input_names", self.model_input_names)
1045
1046 super().__init__(**kwargs)
1047
1048 @property
1049 def max_len(self) -> int:

Callers

nothing calls this directly

Calls 1

__init__Method · 0.45

Tested by

no test coverage detected