ETA on adding sklearn

I was just about to undergo adding custom teach for sklearn but I saw that it was on your roadmap, and you have new releases often … so can’t hurt to ask!

Can confirm it won’t be in 1.4, sadly.

The plan is to support other libraries by adding wrappers in Thinc, that take e.g. a scikit-learn model, and gives it the Thinc interface. The key part of the interface is:


class Model:
    def begin_update(self, batch_of_data, drop=0.0):
        '''Run the model over a batch of data, returning
        a callback to update the weights.'''
        def finish_update(batch_of_d_output, sgd=None):
            return batch_of_d_input

    def to_bytes(self):
        '''Serialize the current weights to a binary string'''
        return byte_string

    def to_disk(self, path):
        '''Serialize the current weights to disk.'''
       pass

I think these should be fairly easy to implement for scikit-learn, but I don’t use the library very much myself, so it might depend on which models you’re using?