faffde15ccbf5fa38459222fe86f19a2d8f2074a,test/labeling/model/test_label_model.py,LabelModelTest,test_optimizer,#LabelModelTest#,249
Before Change
def test_optimizer(self):
L = np.array([[1, 0, 1], [1, 2, 1]])
label_model = self._set_up_model(L)
label_model.train_model(L, n_epochs=1, optimizer="rmsprop")
label_model.train_model(L, n_epochs=1, optimizer="adam")
with self.assertRaisesRegex(ValueError, "Did not recognize optimizer"):
After Change
def test_optimizer(self):
L = csr_matrix(np.array([[1, 0, 1], [1, 2, 1]]))
label_model = LabelModel(k=2, verbose=False)
label_model.train_model(L, n_epochs=1, optimizer="rmsprop")
label_model.train_model(L, n_epochs=1, optimizer="adam")
with self.assertRaisesRegex(ValueError, "Did not recognize optimizer"):
label_model.train_model(L, n_epochs=1, optimizer="bad_opt")
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 2
Instances
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_optimizer
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_save_and_load
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_model_loss
Project Name: snorkel-team/snorkel
Commit Name: faffde15ccbf5fa38459222fe86f19a2d8f2074a
Time: 2019-08-13
Author: henry.ehrenberg@outlook.com
File Name: test/labeling/model/test_label_model.py
Class Name: LabelModelTest
Method Name: test_lr_scheduler