Skip to content

Proposed Learner Design

Peter Wolf edited this page Sep 24, 2020 · 5 revisions

Proposal for a Learner Interface

A Learner is a utility for training ML models. It combines model, training and validation data, logic. Learners are composed of a sequence of Stages. Each Stage is preceded and followed by optional Callbacks. Both Stages and Callbacks may monitor and modify the State of the Learner, however, there is only one of each Stage, but possibly many Callbacks.

Terminology

  • State: value of all variables involved in training a model at a certain point in the training process
  • Stage: logic that transforms one state into another. For example, calculating the gradient of loss is a Stage, and updating the model is a different Stage. Stages represent different parts of the training process, therefore the interface to each Stage is different.
  • Callback: logic that monitors state, and may also transforms one state into another. Callbacks are registered to precede or follow Stages

Goals of Interface

  • Allow capture state of the art best practices as Stages and Callbacks
  • Allow plug-in combinations of Stages and Callbacks by outside developers
  • Enable easy debugging of combinations of Stages and Callbacks
    • Allow logging of changes of state by Stages and Callbacks
    • Prevent access to invalid state
    • Prevent invalid modification of state
  • Allow Stages to run in parallel if desired
    • Allow Stages and Callbacks that implement parallel and distributed training algorithms
Clone this wiki locally