IVORY.CORE
IVORY.CORE.BASE
This module provides base classes for Ivory.
Base
— Base class for an entity class such asClient
,Experiment
, andRun
.</>Creator
— Creator class to createRun
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.</>
IVORY.CORE.CLIENT
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')
create_client
(
directory
,name
,tracker
,tuner
)
(Client) — Creates an Ivory Client instance.</>
IVORY.CORE.DATA
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:
datasets:
data:
class: your.Data # a subclass of ivory.core.data.Data
dataset:
fold: 0
But if you need, you can define your Dataset
and/or Datasets
.
datasets:
class: your.Datasets # a subclass of ivory.core.data.Datasets
data:
class: your.Data # a subclass of ivory.core.data.Data
dataset:
def: your.Dataset # a subclass of ivory.core.data.Dataset
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
IVORY.CORE.RUN
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:
os.path.dirname(client.source_name)
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')
.