Preprocessors are primitives that can be used to transform input data into features.
A preprocessor can be fitted during Training, and applied at runtime in both Training and Serving on data batches in the same way. AIR comes with a collection of built-in preprocessors, and you can also define your own with simple templates.
Preprocessors operate on :ref:`Ray Datasets <datasets>`, which makes them scalable and compatible with a variety of datasources and dataframe libraries.
..literalinclude:: doc_code/air_key_concepts.py
:language:python
:start-after:__air_preprocessors_start__
:end-before:__air_preprocessors_end__
Trainers
--------
Trainers are wrapper classes around third-party training frameworks like XGBoost and Pytorch. They are built to help integrate with core Ray actors (for distribution), Ray Tune, and Ray Datasets.
See the documentation on :ref:`Trainers <air-trainer-ref>`.
Trainer objects will produce a :ref:`Result <air-results-ref>` object after calling ``.fit()``. These objects will contain training metrics as long as checkpoints to retrieve the best model.