cc50b0085728cda00df44909a971384e7c585f3f,tests/framework/test_model.py,ModelTest,_test_fitting,#ModelTest#Any#Any#,118

Before Change


        for log in logs:
            keys = ["epoch", "lr", "loss", "some_metric_1", "some_metric_2", "val_loss", "val_some_metric_1", "val_some_metric_2"]
            self.assertCountEqual(log.keys(), keys)
            self.assertEqual(log["some_metric_1"], 1.)
            self.assertEqual(log["some_metric_2"], 2.)
            self.assertEqual(log["val_some_metric_1"], 1.)
            self.assertEqual(log["val_some_metric_2"], 2.)

After Change


        for log in logs:
            keys = ["epoch", "lr", "loss"] + self.metrics_names + ["val_loss"] + ["val_" + metric_name for metric_name in self.metrics_names]
            self.assertCountEqual(log.keys(), keys)
            for metric_name, metric_value in zip(self.metrics_names, self.metrics_values):
                with self.subTest(metric_name=metric_name):
                    self.assertEqual(log[metric_name], metric_value)
                    self.assertEqual(log["val_" + metric_name], metric_value)

        method_calls = self.mock_callback.method_calls
        self.assertEqual(method_calls.index(call.on_train_begin([])), 2)
        self.assertIn(call.set_model(self.model), method_calls[:2])
        self.assertIn(call.set_params(params), method_calls[:2])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: GRAAL-Research/pytoune
Commit Name: cc50b0085728cda00df44909a971384e7c585f3f
Time: 2018-01-13
Author: fredy_14@live.fr
File Name: tests/framework/test_model.py
Class Name: ModelTest
Method Name: _test_fitting


Project Name: jazzband/django-debug-toolbar
Commit Name: d428ae4aa8bd7ab7a2dc945f3e58987ba1c2cbcb
Time: 2020-09-21
Author: antoine.fontaine@gmail.com
File Name: tests/panels/test_history.py
Class Name: HistoryPanelTestCase
Method Name: test_post_json


Project Name: aleju/imgaug
Commit Name: bdf2142281710cba0154bc5d63b3e8c55486509d
Time: 2019-08-30
Author: kontakt@ajung.name
File Name: test/augmentables/test_polys.py
Class Name: Test_ConcavePolygonRecoverer
Method Name: test__remove_consecutive_duplicate_points