Keras callbacks

When training a Transformers model with Keras, there are some library-specific callbacks available to automate common tasks:

PushToHubCallback

class transformers.keras_callbacks.PushToHubCallback(output_dir: Union[str, pathlib.Path], save_strategy: Union[str, transformers.trainer_utils.IntervalStrategy] = 'epoch', save_steps: Optional[int] = None, tokenizer: Optional[transformers.tokenization_utils_base.PreTrainedTokenizerBase] = None, hub_model_id: Optional[str] = None, hub_token: Optional[str] = None)[source]