da4fb02764495b143551661a02f0da973982b1b2,calamari_ocr/ocr/trainer.py,CalamariTrainer,train,#CalamariTrainer#Any#,37

Before Change


            raise Exception("Validation dataset is empty. Provide valid validation data for early stopping.")

        if self._params.preload_training:
            data = self.scenario.data = self.scenario.create_data().to_raw_dataset(progress_bar=self._params.progress_bar)

        // compute the codec
        codec = data.params().codec

After Change


            raise Exception("Training dataset is empty.")

        if data.params().val:
            val_pipeline = data.get_pipeline(PipelineMode.Evaluation, data.params().val)
            if len(val_pipeline) == 0:
                raise Exception("Validation dataset is empty. Provide valid validation data for early stopping.")
        else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: Calamari-OCR/calamari
Commit Name: da4fb02764495b143551661a02f0da973982b1b2
Time: 2021-01-19
Author: wick.chr@gmail.com
File Name: calamari_ocr/ocr/trainer.py
Class Name: CalamariTrainer
Method Name: train


Project Name: pfnet-research/chainer-chemistry
Commit Name: 87171a14ba382519269b1d915729867d4f4f38b1
Time: 2018-04-20
Author: corochannz@gmail.com
File Name: tests/models_tests/test_rsgcn.py
Class Name:
Method Name: test_backward_cpu


Project Name: pfnet-research/chainer-chemistry
Commit Name: 87171a14ba382519269b1d915729867d4f4f38b1
Time: 2018-04-20
Author: corochannz@gmail.com
File Name: tests/models_tests/test_rsgcn.py
Class Name:
Method Name: test_backward_gpu