Change training data in Trainer with callback
Can we change the train_dataset during training using a custom Trainer callback?Thanks,
2022-11-28T18:30:36Z
I don’t think that’s possible no. To customize your own training loop, we really recommend using Accelerate.
2022-11-29T02:57:03Z
Use a function for the dataset to insert data without a callback.NOTE: I did not check but can be possible.Also can combine multiple datasets.
2022-11-29T22:39:00Z
Thanks for the replies!Actually, I came up with a hack to stop the training based on a criteria using a custom callback. Then, I computed what I needed to change the training data and I overwrote it in the trainer after. Finally, I expanded the training epochs in the arguments to continue the training afterwards.