---
title: engine.trainer API Reference
description: Learn how to use BaseTrainer in Ultralytics YOLO for efficient model training. Comprehensive guide for configurations, datasets, and optimization.
keywords: Ultralytics, YOLO, BaseTrainer, model training, configuration, datasets, optimization, machine learning
---

# Reference for `ultralytics/engine/trainer.py`

!!! success "Improvements"

    This page is sourced from [https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py](https://github.com/ultralytics/ultralytics/blob/main/ultralytics/engine/trainer.py). Have an improvement or example to add? Open a [Pull Request](https://docs.ultralytics.com/help/contributing) — thank you! 🙏

<br>

## ::: ultralytics.engine.trainer.BaseTrainer

<br><br><hr><br>

## ::: ultralytics.engine.trainer.MultiTrainer

<br><br>
