Example #1
0
 def evaluate_inference(self, config_path: Optional[str] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path, reader_type='val')
         evaluator = PostInferenceEvaluator(config=config)
         evaluator.evaluate()
     except Exception as ex:
         print('Failed to proceed model evaluation. {}'.format(ex))
Example #2
0
 def visualise_data_augmentation(self,
                                 descriptive_name: str,
                                 config_path: Optional[str] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path)
         self._execute_graph_operation_pipeline(
             executor_type=GraphExecutorType.TEST_DATA_TRANSFORMATION,
             descriptive_name=descriptive_name,
             config=config)
     except Exception as ex:
         print(f'Failed to proceed data augmentation visualisation. {ex}')
Example #3
0
 def overfit_training(self,
                      descriptive_name: str,
                      config_path: Optional[str] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path)
         self._execute_graph_operation_pipeline(
             executor_type=GraphExecutorType.OVERFIT_TRAIN,
             descriptive_name=descriptive_name,
             config=config)
     except Exception as ex:
         print(f'Failed to proceed overfitting training. {ex}')
Example #4
0
 def evaluate_model(self,
                    descriptive_name: Union[str, None] = None,
                    config_path: Union[str, None] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path, reader_type='val')
         if descriptive_name is None:
             descriptive_name = 'model_evaluation'
         self._execute_graph_operation_pipeline(
             GraphExecutorType.EVALUATION, descriptive_name, config)
     except Exception as ex:
         print('Failed to proceed model evaluation. {}'.format(ex))
Example #5
0
 def visualise_graph(self,
                     descriptive_name: Union[str, None] = None,
                     config_path: Union[str, None] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path, reader_type='val')
         if descriptive_name is None:
             descriptive_name = 'graph_visualisation'
         self._execute_graph_operation_pipeline(
             GraphExecutorType.GRAPH_VISUALISATION, descriptive_name,
             config)
     except Exception as ex:
         print('Failed to visualise graph. {}'.format(ex))
Example #6
0
 def measure_inference_speed(self,
                             descriptive_name: Union[str, None] = None,
                             config_path: Union[str, None] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path, reader_type='val')
         if descriptive_name is None:
             descriptive_name = 'model_inference_speed_measurement'
         self._execute_graph_operation_pipeline(
             GraphExecutorType.INFERENCE_SPEED_TEST, descriptive_name,
             config)
     except Exception as ex:
         print('Failed to proceed speed evaluation. {}'.format(ex))
Example #7
0
 def get_predictions_from_model(
         self,
         descriptive_name: Union[str, None] = None,
         config_path: Union[str, None] = None) -> None:
     try:
         config = GraphExecutorConfigReader(config_path, reader_type='val')
         if descriptive_name is None:
             descriptive_name = 'model_predictions'
         self._execute_graph_operation_pipeline(GraphExecutorType.INFERENCE,
                                                descriptive_name, config)
     except Exception as ex:
         print(
             'Failed to proceed taking inference from model. {}'.format(ex))