Trainer Tutorials

This tutorial will guide you through understanding and customizing the training pipeline in RoboOrchardLab, using the provided ResNet50 on ImageNet example as our foundation. We’ll start with the basics of running the script and gradually delve into customizing each component.

Here are the key highlights:

  • Configuration-Driven (Pydantic + Argparse): Uses Pydantic (SettingConfig, DatasetConfig, TrainerConfig) for typed, validated, and hierarchical configurations. This is excellent for clarity, reducing errors, and IDE support.

  • Hugging Face Accelerator Integration: Uses Accelerator for abstracting device management (CPU/GPU/TPU), distributed training (DDP, FSDP, etc.), and mixed precision.

  • Modular Training Pipeline: A clear abstraction for the main training loop, encapsulating the core logic. A hook system allows injecting custom logic at various points in the training loop without modifying the pipeline core.

Configuration & Your First Basic Training Run

Configuration & Your First Basic Training Run

Leveraging Built-in Hooks for Common Training Tasks

Leveraging Built-in Hooks for Common Training Tasks

(Advanced) Creating Custom Hooks for Tailored Logic

(Advanced) Creating Custom Hooks for Tailored Logic

Gallery generated by Sphinx-Gallery