8946a24d7c1a21a80ccaf86418c354cf87e84bfa,src/fonduer/supervision/labeler.py,LabelerUDF,apply,#LabelerUDF#Any#Any#Any#Any#Any#,205

Before Change


        :param update: Whether to incrementally add/update new values.
        :param lfs: The list of functions to use to generate labels.
        
        logger.debug("Document: {}".format(doc))

        if lfs is None:
            raise ValueError("Must provide lfs kwarg.")

After Change


            raise ValueError("Please provide a list of labeling functions.")

        if len(lfs) != len(self.candidate_classes):
            raise ValueError("Please provide LFs for each candidate class.")

        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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: HazyResearch/fonduer
Commit Name: 8946a24d7c1a21a80ccaf86418c354cf87e84bfa
Time: 2018-09-04
Author: lwhsiao@stanford.edu
File Name: src/fonduer/supervision/labeler.py
Class Name: LabelerUDF
Method Name: apply


Project Name: mlflow/mlflow
Commit Name: a7272b7309b6d53e70afe7c19dc3ca383962261a
Time: 2019-03-13
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_param


Project Name: mlflow/mlflow
Commit Name: a7272b7309b6d53e70afe7c19dc3ca383962261a
Time: 2019-03-13
Author: 39497902+dbczumar@users.noreply.github.com
File Name: mlflow/store/sqlalchemy_store.py
Class Name: SqlAlchemyStore
Method Name: log_metric