How to use the mindsdb.libs.data_types.mindsdb_logger.log.error function in MindsDB

To help you get started, we’ve selected a few MindsDB examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mindsdb / mindsdb / mindsdb / libs / ml_models / pytorch / libs / base_model.py View on Github external
def forward(self, input):
        """
        This is what is called when the model is forwarded
        :param input:
        :return:
        """
        log.error('You must define a forward method for this model')
        pass
github mindsdb / mindsdb / mindsdb / libs / data_sources / file_ds.py View on Github external
i += 1
                first_few_lines.append(line)
                if i > 0:
                    break

            accepted_delimiters = [',','\t']
            dialect = csv.Sniffer().sniff(''.join(first_few_lines[0]), delimiters=accepted_delimiters)
            data.seek(0)
            # if csv dialect identified then return csv
            if dialect:
                return data, 'csv', dialect
            else:
                return data, None, dialect
        except:
            data.seek(0)
            log.error('Could not detect format for this file')
            log.error(traceback.format_exc())
            # No file type identified
            return data, None, dialect
github mindsdb / mindsdb / mindsdb / libs / ml_models / pytorch / libs / base_model.py View on Github external
def setup(self, sample_batch, **kwargs):
        """
        this is what is called when the model object is instantiated
        :param sample_batch:
        :param use_cuda:
        :return:
        """
        log.error('You must define a setup method for this model')
        pass
github mindsdb / mindsdb / mindsdb / libs / ml_models / pytorch / libs / base_model.py View on Github external
def forward(self, input):
        """
        This is what is called when the model is forwarded
        :param input:
        :return:
        """
        log.error('You must define a forward method for this model')
        pass
github mindsdb / mindsdb / mindsdb / libs / data_sources / file_ds.py View on Github external
first_few_lines.append(line)
                if i > 0:
                    break

            accepted_delimiters = [',','\t']
            dialect = csv.Sniffer().sniff(''.join(first_few_lines[0]), delimiters=accepted_delimiters)
            data.seek(0)
            # if csv dialect identified then return csv
            if dialect:
                return data, 'csv', dialect
            else:
                return data, None, dialect
        except:
            data.seek(0)
            log.error('Could not detect format for this file')
            log.error(traceback.format_exc())
            # No file type identified
            return data, None, dialect