Exemple #1
0
    def from_config(cls, global_config):
        all_metrics = cls(global_config)
        for metric_config in all_metrics.metric_config:
            subcls = find_subclass_by_name(MLMetric, metric_config.metric_name)
            metric_obj = subcls.from_config(global_config, metric_config)

            metric_list = None
            if subcls in all_subclasses(StepMetric):
                metric_list = all_metrics.step_metrics
            if subcls in all_subclasses(EndingMetric):
                metric_list = all_metrics.ending_metrics
            metric_list.append(metric_obj)

        return all_metrics
Exemple #2
0
 def from_config(cls, global_config):
     subcls = find_subclass_by_name(cls, global_config.graph.graph_name)
     return subcls.from_config(global_config)
Exemple #3
0
 def from_config(cls, global_config):
     io_config = global_config.io
     subcls = find_subclass_by_name(cls, io_config.io_name)
     return subcls.from_config(global_config)
Exemple #4
0
 def from_config(cls, global_config, metric_config):
     subcls = find_subclass_by_name(cls, metric_config.metric_name)
     return subcls.from_config(global_config, metric_config)
Exemple #5
0
 def from_config(cls, global_config):
     trainer_config = global_config.trainer
     subcls = find_subclass_by_name(cls, trainer_config.trainer_name)
     return subcls.from_config(global_config)
Exemple #6
0
 def from_config(cls, graph_config):
     subcls = find_subclass_by_name(cls, graph_config.model_name)
     return subcls.from_config(graph_config)
Exemple #7
0
 def from_config(cls, global_config):
     predictor_config = global_config.predictor
     subcls = find_subclass_by_name(cls, predictor_config.predictor_name)
     return subcls.from_config(global_config)