317da380d4f10c8bba55ee3dc5110079fad86ea7,pytext/metric_reporters/intent_slot_detection_metric_reporter.py,IntentSlotMetricReporter,batch_context,#IntentSlotMetricReporter#Any#Any#,207

Before Change



    def batch_context(self, raw_batch, batch):
        return {
            DatasetFieldName.UTTERANCE_FIELD: [row["text"] for row in raw_batch],
            DatasetFieldName.SEQ_LENS: batch["tokens"][1],
            DatasetFieldName.TOKEN_RANGE: batch["tokens"][2],
            DatasetFieldName.RAW_WORD_LABEL: [
                ",".join([str(x) for x in row[self.slot_column_name]])
                for row in raw_batch
            ],
            BatchContext.INDEX: [
                row[RawExampleFieldName.ROW_INDEX] for row in raw_batch
            ],

After Change


        context[DatasetFieldName.SEQ_LENS] = batch[self.token_tensorizer_name][
            1
        ].tolist()
        context[DatasetFieldName.TOKEN_RANGE] = batch[self.token_tensorizer_name][
            2
        ].tolist()
        context[DatasetFieldName.RAW_WORD_LABEL] = [
            self.get_raw_slot_str(raw_data_row) for raw_data_row in raw_batch
        ]
        return context
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: facebookresearch/pytext
Commit Name: 317da380d4f10c8bba55ee3dc5110079fad86ea7
Time: 2019-08-18
Author: zsc@fb.com
File Name: pytext/metric_reporters/intent_slot_detection_metric_reporter.py
Class Name: IntentSlotMetricReporter
Method Name: batch_context


Project Name: facebookresearch/pytext
Commit Name: 317da380d4f10c8bba55ee3dc5110079fad86ea7
Time: 2019-08-18
Author: zsc@fb.com
File Name: pytext/metric_reporters/intent_slot_detection_metric_reporter.py
Class Name: IntentSlotMetricReporter
Method Name: batch_context


Project Name: dataiku/dataiku-contrib
Commit Name: 658a47ed8504abcd2ffec19d4043a6b99cf82c7c
Time: 2019-08-27
Author: dphan@MacBook-Pro-de-Dataiku-3.local
File Name: sentence-embedding/custom-recipes/sentence-embedding-compute/recipe.py
Class Name:
Method Name:


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: c8021a75ee19bdcb8c1d1be7989302691871b9bb
Time: 2018-10-01
Author: jcastaldo08@gmail.com
File Name: category_encoders/helmert.py
Class Name: HelmertEncoder
Method Name: helmert_coding