ray.train.huggingface.transformers.prepare_trainer#

ray.train.huggingface.transformers.prepare_trainer(trainer: transformers.Trainer) transformers.Trainer[source]#

Prepare your HuggingFace Transformer Trainer for Ray Train.

This utility function enable the trainer integrates with Ray Data Integration. Internally, it overrides the get_train_dataloader and get_eval_dataloader methods and inject the data integration logics if the train_dataset and eval_dataset are Ray Data Iterables.

PublicAPI (beta): This API is in beta and may change before becoming stable.