src.main.main_train

Classes

MainTrain()

class src.main.main_train.MainTrain
Author:

Alberto M. Esmoris Pena

Class handling the entry point for training tasks.

static main(spec)

Entry point logic for training tasks.

Parameters:

spec – Key-word specification

static extract_input_path(spec)

See MainMine and main_mine.MainMine.extract_input_path().

static extract_output_path(spec)

Extract the output path from the key-word specification

Parameters:

spec – The key-word specification.

Returns:

Output path as string.

Return type:

str

static extract_model_class(spec)

Extract the model’s class from the key-word specification.

Parameters:

spec – The key-word specification.

Returns:

Model’s class.

static extract_pretrained_model(spec, expected_class=None, new_nn_path=None)

Extract the path to the pretrained model and load it.

Parameters:
  • spec – The key-word specification.

  • expected_class – The expected model class. It can be None, but then no model class check will be computed.

  • new_nn_path (str or None) – When given (i.e., not None) it will replace the nn_path that was serialized with the Architecture and instead use this new path.

Returns:

The pretrained model or None if there is no pretrained model specification.

Return type:

src.model.model.Model or None