CLI Reference

Although the whole cxflow 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 cxflow command should become available. The command comes with four basic sub-commands explained below.

usage: cxflow (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

cxflow train

Start cxflow training from the config_file.

usage: cxflow train [-h] config_file

Positional Arguments

config_file path to the config file

cxflow resume

Resume cxflow training from the config_path.

usage: cxflow 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

cxflow predict

Run prediction with the given config_path.

usage: cxflow predict [-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

cxflow dataset

Invoke arbitrary dataset method.

usage: cxflow dataset [-h] method config_file

Positional Arguments

method name of the method to be invoked
config_file path to the config file

cxflow ls

List training log dirs in the given path.

usage: cxflow 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

cxflow prune

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

usage: cxflow 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