CLI Reference

Although the whole emloop API can be accessed programmatically, the intended way of using it is through the command line instruments. The design goal is to focus on defining the actual models, datasets etc. instead of the burdensome code, which just puts all the components together.

With proper installation, the emloop command should become available. The command comes with four basic sub-commands explained below.

usage: emloop (train | resume | predict | dataset) [-v] [-o] ...

All the sub-commands share the following arguments:

--output, -o output directory, defaults to ./log
--verbose, -v increase verbosity level to DEBUG

emloop train

Start emloop training from the config_file.

usage: emloop train [-h] config_file

Positional Arguments

config_file

path to the config file

emloop resume

Resume emloop training from the config_path.

usage: emloop resume [-h] config_path [restore_from]

Positional Arguments

config_path

path to the config file or the directory in which it is stored

restore_from

information passed to the model constructor (backend-specific); usually a directory in which the trained model is stored

emloop eval

Evaluate the given model on the specified data stream.

usage: emloop eval [-h] [--config [CONFIG]] stream_name model_path

Positional Arguments

stream_name

stream name to be evaluated

model_path

model path to be evaluated

Named Arguments

--config, -c

optional config path to be used

emloop dataset

Invoke arbitrary dataset method.

usage: emloop dataset [-h] method config_file

Positional Arguments

method

name of the method to be invoked

config_file

path to the config file

emloop ls

List training log dirs in the given path.

usage: emloop ls [-h] [-l] [-a] [-r] [-v] [dir]

Positional Arguments

dir

path to the log directory to be listed

Default: “./log”

Named Arguments

-l, --long

use long listing format

Default: False

-a, --all

include trainings with no epochs done

Default: False

-r, --recursive

list all the dirs recursively, stop at training dirs

Default: False

-v, --verbose

print more verbose output, applicable only when a single train dir is listed

Default: False

emloop prune

Prune training log dirs in the given path without finished epochs.

usage: emloop prune [-h] [-e EPOCHS] [-s] [dir]

Positional Arguments

dir

path to the log directory to be pruned

Default: “./log”

Named Arguments

-e, --epochs

keep only training log dirs having at least this many completed epochs, default 1

Default: 1

-s, --subdirs

delete all subdirectories in training directories

Default: False