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
andget_eval_dataloader
methods and inject the data integration logics if thetrain_dataset
andeval_dataset
are Ray Data Iterables.PublicAPI (beta): This API is in beta and may change before becoming stable.