Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 3d20d09

Browse files
committed
tests fix
1 parent 25355ee commit 3d20d09

1 file changed

Lines changed: 1 addition & 37 deletions

File tree

tests/mljar_test.py

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -83,25 +83,7 @@ def test_basic_usage(self):
8383
# get MSE
8484
score = self.mse(pred, self.y)
8585
self.assertTrue(score < 0.1)
86-
'''
87-
def test_usage_with_defaults(self):
88-
# it takes too long on travis: TEST DISABLED
89-
#Test usage with defaults.
9086

91-
model = Mljar(project = self.proj_title, experiment = self.expt_title)
92-
self.assertTrue(model is not None)
93-
# fit models and wait till all models are trained
94-
model.fit(X = self.X, y = self.y, wait_till_all_done = False)
95-
# wait some time
96-
time.sleep(120) # wait a little longer - there are a lot of models
97-
# run prediction
98-
pred = model.predict(self.X)
99-
# get MSE
100-
score = self.mse(pred, self.y)
101-
self.assertTrue(score < 0.95)
102-
# check default validation
103-
self.assertEqual(model.selected_algorithm.validation_scheme, "5-fold CV, Shuffle, Stratify")
104-
'''
10587
def test_usage_with_train_split(self):
10688

10789
#Test usage with train split.
@@ -143,7 +125,6 @@ def test_usage_with_validation_dataset(self):
143125
time.sleep(80)
144126
# run prediction
145127
pred = model.predict(self.X)
146-
print('1) PRED', pred)
147128
# get MSE
148129
score = self.mse(pred, self.y)
149130
self.assertTrue(score < 0.5)
@@ -270,23 +251,6 @@ def test_retrive_models(self):
270251
self.assertTrue(score_3 < 0.1)
271252
# scores should be the same
272253
self.assertTrue(np.abs(score-score_3) < 1e-3)
273-
274-
'''
275-
# comment out because it took too long on travis-ci to run
276-
def test_basic_usage_with_defaults(self):
277-
278-
#Test the most common usage with defults settings.
279-
280-
model = Mljar(project = self.proj_title, experiment = self.expt_title)
281-
self.assertNotEqual(model, None)
282-
# fit models and wait till all models are trained
283-
model.fit(X = self.X, y = self.y)
284-
# run prediction
285-
pred = model.predict(self.X)
286-
# get MSE
287-
score = self.mse(pred, self.y)
288-
self.assertTrue(score < 0.1)
289-
'''
290-
254+
291255
if __name__ == "__main__":
292256
unittest.main()

0 commit comments

Comments
 (0)