self.lfs = lfs
if docs:
// Call apply on the specified docs for all splits
split = ALL_SPLITS
super(Labeler, self).apply(
docs, split=split, train=train, lfs=self.lfs, clear=clear, **kwargs
)
// Needed to sync the bulk operations
self.session.commit()
else:
// Only grab the docs containing candidates from the given split.
split_docs = get_docs_from_split(
self.session, self.candidate_classes, split
)
super(Labeler, self).apply(
split_docs,
split=split,
train=train,
lfs=self.lfs,
clear=clear,
**kwargs
)
// Needed to sync the bulk operations
self.session.commit()
def get_lfs(self):
Return a list of lists of labeling functions for this Labeler.
return self.lfs