def _apply_st(self, doc_loader, **kwargs):
        """Run the UDF single-threaded, optionally with progress bar"""
        udf = self.udf_class(**self.udf_init_kwargs)

        # Run single-thread
        for doc in doc_loader:
            if self.pb is not None:
                self.pb.update(1)

            udf.session.add_all(y for y in udf.apply(doc, **kwargs))

        # Commit session and close progress bar if applicable
        udf.session.commit()
def _apply_st ( self , doc_loader , ** kwargs ) : udf = self . udf_class ( ** self . udf_init_kwargs ) for doc in doc_loader : if self . pb is not None : self . pb . update ( 1 ) udf . session . add_all ( y for y in udf . apply ( doc , ** kwargs ) ) udf . session . commit ( )
Run the UDF single-threaded, optionally with progress bar