dicee.executer

Classes

Execute

A class for Training, Retraining and Evaluation a model.

ContinuousExecute

A subclass of Execute Class for retraining

Module Contents

class dicee.executer.Execute(args, continuous_training=False)[source]

A class for Training, Retraining and Evaluation a model.

  1. Loading & Preprocessing & Serializing input data.

  2. Training & Validation & Testing

  3. Storing all necessary info

args
is_continual_training = False
trainer = None
trained_model = None
knowledge_graph = None
report
evaluator = None
start_time = None
setup_executor() None[source]
save_trained_model() None[source]

Save a knowledge graph embedding model

  1. Send model to eval mode and cpu.

  2. Store the memory footprint of the model.

  3. Save the model into disk.

  4. Update the stats of KG again ?

Parameter

rtype:

None

end(form_of_labelling: str) dict[source]

End training

  1. Store trained model.

  2. Report runtimes.

  3. Eval model if required.

Parameter

rtype:

A dict containing information about the training and/or evaluation

write_report() None[source]

Report training related information in a report.json file

start() dict[source]

Start training

# (1) Loading the Data # (2) Create an evaluator object. # (3) Create a trainer object. # (4) Start the training

Parameter

rtype:

A dict containing information about the training and/or evaluation

class dicee.executer.ContinuousExecute(args)[source]

Bases: Execute

A subclass of Execute Class for retraining

  1. Loading & Preprocessing & Serializing input data.

  2. Training & Validation & Testing

  3. Storing all necessary info

During the continual learning we can only modify * num_epochs * parameter. Trained model stored in the same folder as the seed model for the training. Trained model is noted with the current time.

continual_start() dict[source]

Start Continual Training

  1. Initialize training.

  2. Start continual training.

  3. Save trained model.

Parameter

rtype:

A dict containing information about the training and/or evaluation