This module provides base classes for Ivory.

  • Base Base class for an entity class such as Client, Experiment, and Run.</>
  • Creator Creator class to create Run instances.</>
  • Callback Callback class for the Ivory callback system.</>
  • CallbackCaller Callback caller class.</>
  • Experiment Experimet class is one of the main classes of Ivory library.</>

This module provides the Ivory Client class that is one of the main classes of Ivory library.

To create an Client instance:

import ivory

client = ivory.create_client()

Here, the current directory becomes the working directory in which experiment YAML files exist. If you want to refer other directory, use:

client = ivory.create_client('path/to/working_directory')

Ivory uses four classes for data presentation: Data, Dataset, Datasets, and DataLoaders.

Basically, you only need to define a class that is a subclass of Data and use original Dataset and Datasets. An example parameter YAML file is:

    class: your.Data  # a subclass of
  fold: 0

But if you need, you can define your Dataset and/or Datasets.

  class: your.Datasets  # a subclass of
    class: your.Data  # a subclass of
    def: your.Dataset  # a subclass of
  fold: 0

The DataLoaders is used internally by ivory.torch.trainer.Trainer or ivory.nnabla.trainer.Trainer classes to yield a minibatch in training loop.


Use a 'def' key for dataset instead of 'class'. See Tutorial

  • Data Base class to provide data to a Dataset instance.</>
  • Dataset Dataset class represents a set of data for a mode and fold.</>
  • Datasets Dataset class represents a collection of Dataset for a fold.</>
  • DataLoaders DataLoaders class represents a collection of DataLoader.</>


This module provides the Run class that is one of the main classes of Ivory library. In addition, Task and Study classes are defined, which manages multiple runs for cross validation, hyperparameter tuning, and so on.

To create an Run instance:

import ivory

client = ivory.create_run('example')

The argument example is an experiment name in which the created run is included. Ivory assumes that example.yml or example.yaml file exists under the client's working directory.

You can comfirm the client's working directory by:


One you got a Run instance. call Run.start() to start training. For test, call Run.start('test') instead. Also, you can perform traing and test by one step with Run.start('both').

  • Run Run class is one of the main classes of Ivory library.</>
  • Task Task class creates a parent run that generates multiple runs.</>
  • Study Study class create a parent run to manage hyperparameter tuning.</>