{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "# Configuration basics" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Ablator embraces a versatile configuration system that configures every facet of training machine learning models, covering not only the model architecture but also the training environment.\n", "\n", "Think of this configuration system as a blueprint for crafting experiments. By leveraging this system, Ablator orchestrates the creation and setup of experiments, seamlessly integrating the necessary configurations. \n", "\n", "Furthermore, Ablator offers the flexibility to dynamically construct a hierarchical configuration through composition. You have the choice to override settings either via `yaml` configuration files and command-line inputs, or to directly use Python objects and classes. Explore [these illustrative examples](./GettingStarted-more-demos.ipynb) or delve into [this section](#alternatives-to-constructing-configuration-objects) of this tutorial to gain insights into implementing these two approaches.\n", "\n", "In this tutorial, we will explain all configuration-related concepts in Ablator. We will also demonstrate all necessary steps to configure an experiment in Ablator." ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## Configuration categories\n", "\n", "In ablator, configurations are organized in different categories, these include:\n", "\n", "- [Model configuration](#model-configuration).\n", "\n", "- [Training configuration](#training-configuration).\n", "\n", "- [Optimizer and Scheduler configuration](#optimizer-and-scheduler-configurations).\n", "\n", "- [Running configurations](#running-configurations) (either for training a single prototype model or training multiple models in parallel).\n", "\n", "These configuration classes will be used together to configure an experiment." ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Model Configuration" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "This configuration class is used to define [hyperparameters](https://en.wikipedia.org/wiki/Hyperparameter_(machine_learning)) specific to the model of interest. Later, you can use this configuration to construct the model.\n", "\n", "There are 2 steps that are required after defining a model config class for your model:\n", "\n", "- Pass the model config to the main model's constructor so you can construct the model using the attributes that's defined in the config.\n", "\n", "- Create a custom [running configuration class](#running-configurations) and update `model_config` class type to the newly created model config class.\n", "\n", "