dicee.executer ============== .. py:module:: dicee.executer Classes ------- .. autoapisummary:: dicee.executer.Execute dicee.executer.ContinuousExecute Module Contents --------------- .. py:class:: Execute(args, continuous_training=False) A class for Training, Retraining and Evaluation a model. (1) Loading & Preprocessing & Serializing input data. (2) Training & Validation & Testing (3) Storing all necessary info .. py:attribute:: args .. py:attribute:: is_continual_training :value: False .. py:attribute:: trainer :value: None .. py:attribute:: trained_model :value: None .. py:attribute:: knowledge_graph :value: None .. py:attribute:: report .. py:attribute:: evaluator :value: None .. py:attribute:: start_time :value: None .. py:method:: setup_executor() -> None .. py:method:: save_trained_model() -> None 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 .. py:method:: end(form_of_labelling: str) -> dict 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 .. py:method:: write_report() -> None Report training related information in a report.json file .. py:method:: start() -> dict 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 .. py:class:: ContinuousExecute(args) Bases: :py:obj:`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. .. py:method:: continual_start() -> dict 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