<commit_before># cython: profile=True
# cython: cdivision=True
# cython: infer_types=True

from .extra.eg cimport Example
from . cimport prng


cdef class Model:
    def __call__(self, Example eg):
        raise NotImplementedError

    def train_example(self, Example eg):
        raise NotImplementedError

    def predict_example(self, Example eg):
        raise NotImplementedError

    def dump(self, loc):
        raise NotImplementedError

    def load(self, loc):
        raise NotImplementedError

    def end_training(self):
        pass

    @property
    def nr_feat(self):
        raise NotImplementedError

    cpdef int update_weight(self, feat_t feat_id, class_t clas, weight_t upd) except -1:
        pass<commit_msg>Setup prng in base.pyx, so dropout works<commit_after># cython: profile=True
# cython: cdivision=True
# cython: infer_types=True

from .extra.eg cimport Example
from . cimport prng

prng.normal_setup()

cdef class Model:
    def __call__(self, Example eg):
        raise NotImplementedError

    def train_example(self, Example eg):
        raise NotImplementedError

    def predict_example(self, Example eg):
        raise NotImplementedError

    def dump(self, loc):
        raise NotImplementedError

    def load(self, loc):
        raise NotImplementedError

    def end_training(self):
        pass

    @property
    def nr_feat(self):
        raise NotImplementedError

    cpdef int update_weight(self, feat_t feat_id, class_t clas, weight_t upd) except -1:
        pass
{'fraction_non_alphanumeric': 0.06930693069306931, 'fraction_numerical': 0.0013201320132013201, 'mean_word_length': 3.075268817204301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3985654', 'n_tokens_mistral': 466, 'n_tokens_neox': 449, 'n_words': 136}