Пример #1
0
    def get_mlops_stat(self, model_id):

        data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.BARGRAPH,
                               mode=StatsMode.Instant,
                               data=data,
                               model_id=model_id)
        return mlops_stat
Пример #2
0
    def get_mlops_stat(self, model_id):

        if self._data is None:
            raise MLOpsException("There is no data in html object")

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.HTML,
                               mode=StatsMode.Instant,
                               json_data_dump=self._data,
                               model_id=model_id)
        return mlops_stat
Пример #3
0
    def get_mlops_stat(self, model_id):
        graph_type = StatGraphType.LINEGRAPH
        formatted_value = ValueFormatter(self._name, self._value, graph_type).value()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.KPI,
                               graph_type=graph_type,
                               mode=StatsMode.TimeSeries,
                               data=formatted_value,
                               timestamp_ns=self._timestamp_ns,
                               model_id=model_id)
        return mlops_stat
Пример #4
0
    def get_mlops_stat(self, model_id):

        if self._data is None:
            raise MLOpsException("There is no data in opaque stat")

        data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.OPAQUE,
                               mode=StatsMode.Instant,
                               data=data,
                               model_id=model_id)
        return mlops_stat
Пример #5
0
    def get_mlops_stat(self, model_id):

        if len(self._feature_value) == 0:
            raise MLOpsException("There is no data in histogram graph")

        data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_table=self._name,
                               stat_type=self._stat_type,
                               graph_type=StatGraphType.BARGRAPH,
                               mode=StatsMode.Instant,
                               data=data,
                               model_id=model_id)
        return mlops_stat
Пример #6
0
    def get_mlops_stat(self, model_id):

        if self._x_series is None:
            raise MLOpsException("No x_series was provided")
        if len(self._y_series) == 0:
            raise MLOpsException("At leat one y_series should be provided")

        tbl_data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.GENERAL_GRAPH,
                               mode=StatsMode.Instant,
                               data=tbl_data,
                               model_id=model_id)
        return mlops_stat
Пример #7
0
    def get_mlops_stat(self, model_id):

        if len(self._tbl_rows) == 0:
            raise MLOpsException("No rows data found in table object")

        tbl_data = self._to_semi_json(escape=False)
        semi_json = self._to_semi_json()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.MATRIX,
                               mode=StatsMode.Instant,
                               data=tbl_data,
                               string_data=semi_json,
                               json_data_dump=tbl_data,
                               model_id=model_id)
        return mlops_stat
Пример #8
0
    def get_mlops_stat(self, model_id):

        if len(self._data) == 0:
            raise MLOpsException("There is no data in heat graph")

        if len(self._feature_names) == 0:
            raise MLOpsException("No columns names were provided")

        if len(self._data) != len(self._feature_names):
            raise MLOpsException(
                "Number of data point does not match number of columns")

        data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_table=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.HEATMAP,
                               mode=StatsMode.TimeSeries,
                               data=data,
                               model_id=model_id)
        return mlops_stat
    def get_mlops_stat(self, model_id):

        if len(self._data) == 0:
            raise MLOpsException("There is no data in histogram score")

        if len(self._feature_names) == 0:
            raise MLOpsException("No columns names were provided")

        if len(self._data) != len(self._feature_names):
            raise MLOpsException(
                "Number of data point does not match number of columns")

        data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_table=self._name,
                               stat_type=InfoType_pb2.HealthCompare,
                               graph_type=StatGraphType.MULTILINEGRAPH,
                               mode=StatsMode.TimeSeries,
                               data=data,
                               model_id=model_id)
        return mlops_stat
Пример #10
0
    def get_mlops_stat(self, model_id):

        if len(self._data) == 0:
            raise MLOpsException("There is no data in multi line graph")

        if len(self._label_list) == 0:
            raise MLOpsException(
                "MultiLineGraph labels number does not match number of data points"
            )

        if len(self._data) != len(self._label_list):
            raise MLOpsException(
                "number of data point does not match number of labels")

        multiline_data = self._to_dict()

        mlops_stat = MLOpsStat(name=self._name,
                               stat_type=InfoType_pb2.General,
                               graph_type=StatGraphType.MULTILINEGRAPH,
                               mode=StatsMode.TimeSeries,
                               data=multiline_data,
                               model_id=model_id)
        return mlops_stat