It would be helpful to include a progress bar within the train_predictor function to monitor training progress. This would improve user experience, especially during long training sessions.
Proposed solution:
Integrate tqdm into the main training loop.
Allow customization of the message or total number of steps.
Optionally, add a parameter to enable/disable the progress bar.