Skip to content

Commit 6eac8a0

Browse files
authored
Remove timeout= (#720)
1 parent f97ba24 commit 6eac8a0

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

tests/model_selection/test_hyperband.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
],
4040
)
4141
def test_basic(array_type, library, max_iter):
42-
@gen_cluster(client=True, timeout=5000)
42+
@gen_cluster(client=True)
4343
def _test_basic(c, s, a, b):
4444
rng = da.random.RandomState(42)
4545

@@ -123,7 +123,7 @@ def _test_basic(c, s, a, b):
123123

124124
@pytest.mark.parametrize("max_iter,aggressiveness", [(27, 3), (30, 4)])
125125
def test_hyperband_mirrors_paper_and_metadata(max_iter, aggressiveness):
126-
@gen_cluster(client=True, timeout=5000)
126+
@gen_cluster(client=True)
127127
def _test_mirrors_paper(c, s, a, b):
128128
X, y = make_classification(n_samples=10, n_features=4, chunks=10)
129129
model = ConstantFunction()
@@ -159,7 +159,7 @@ def _test_mirrors_paper(c, s, a, b):
159159
_test_mirrors_paper()
160160

161161

162-
@gen_cluster(client=True, timeout=5000)
162+
@gen_cluster(client=True)
163163
def test_hyperband_patience(c, s, a, b):
164164
# Test to make sure that specifying patience=True results in less
165165
# computation
@@ -212,7 +212,7 @@ def test_hyperband_patience(c, s, a, b):
212212
yield alg.fit(X, y)
213213

214214

215-
@gen_cluster(client=True, timeout=5000)
215+
@gen_cluster(client=True)
216216
def test_cv_results_order_preserved(c, s, a, b):
217217
X, y = make_classification(n_samples=10, n_features=4, chunks=10)
218218
model = ConstantFunction()
@@ -228,7 +228,7 @@ def test_cv_results_order_preserved(c, s, a, b):
228228
assert np.allclose(row["test_score"], model_info["score"])
229229

230230

231-
@gen_cluster(client=True, timeout=5000)
231+
@gen_cluster(client=True)
232232
def test_successive_halving_params(c, s, a, b):
233233
# Makes sure when SHAs are fit with values from the "SuccessiveHalvingSearchCV
234234
# params" key, the number of models/calls stay the same as Hyperband.
@@ -252,7 +252,7 @@ def test_successive_halving_params(c, s, a, b):
252252
assert true_meta["partial_fit_calls"] == sum(pf_calls)
253253

254254

255-
@gen_cluster(client=True, timeout=5000)
255+
@gen_cluster(client=True)
256256
def test_correct_params(c, s, a, b):
257257
# Makes sure that Hyperband has the correct parameters.
258258

@@ -335,7 +335,7 @@ def test_params_passed():
335335

336336
# decay_rate warnings are tested in test_incremental_warns.py
337337
@pytest.mark.filterwarnings("ignore:decay_rate")
338-
@gen_cluster(client=True, timeout=5000)
338+
@gen_cluster(client=True)
339339
def test_same_random_state_same_params(c, s, a, b):
340340
# This makes sure parameters are sampled correctly when random state is
341341
# specified.
@@ -400,7 +400,7 @@ def test_random_state_no_seed_different_params():
400400
assert h1._SHA_seed == h2._SHA_seed
401401

402402

403-
@gen_cluster(client=True, timeout=5000)
403+
@gen_cluster(client=True)
404404
def test_min_max_iter(c, s, a, b):
405405
# This test makes sure Hyperband works with max_iter=1.
406406
# Tests for max_iter < 1 are in test_incremental.py.
@@ -413,7 +413,7 @@ def test_min_max_iter(c, s, a, b):
413413
assert h.best_score_ > 0
414414

415415

416-
@gen_cluster(client=True, timeout=5000)
416+
@gen_cluster(client=True)
417417
def test_history(c, s, a, b):
418418
# This test is required to make sure Hyperband wraps SHA successfully
419419
# Mostly, it's a test to make sure ordered by time
@@ -440,7 +440,7 @@ def test_history(c, s, a, b):
440440
assert (np.diff(calls) >= 1).all() or len(calls) == 1
441441

442442

443-
@gen_cluster(client=True, timeout=5000)
443+
@gen_cluster(client=True)
444444
def test_logs_dont_repeat(c, s, a, b):
445445
# This test is necessary to make sure the dask_ml.model_selection logger
446446
# isn't piped to stdout repeatedly.

tests/model_selection/test_incremental.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def test_partial_fit_doesnt_mutate_inputs():
162162
assert new_meta2 != new_meta
163163

164164

165-
@gen_cluster(client=True, timeout=1000)
165+
@gen_cluster(client=True)
166166
async def test_explicit(c, s, a, b):
167167
X, y = make_classification(n_samples=1000, n_features=10, chunks=(200, 10))
168168
model = SGDClassifier(tol=1e-3, penalty="elasticnet")
@@ -226,7 +226,7 @@ def additional_calls(scores):
226226
await asyncio.sleep(0.1)
227227

228228

229-
@gen_cluster(client=True, timeout=1000)
229+
@gen_cluster(client=True)
230230
async def test_search_basic(c, s, a, b):
231231
for decay_rate, input_type, memory in itertools.product(
232232
{0, 1}, ["array", "dataframe"], ["distributed"]
@@ -334,7 +334,7 @@ async def _test_search_basic(decay_rate, input_type, memory, c, s, a, b):
334334
return True
335335

336336

337-
@gen_cluster(client=True, timeout=1000)
337+
@gen_cluster(client=True)
338338
def test_search_plateau_patience(c, s, a, b):
339339
X, y = make_classification(n_samples=100, n_features=5, chunks=(10, 5))
340340

@@ -367,7 +367,7 @@ def score(self, *args, **kwargs):
367367
search.score(X_test, y_test)
368368

369369

370-
@gen_cluster(client=True, timeout=1000)
370+
@gen_cluster(client=True)
371371
def test_search_plateau_tol(c, s, a, b):
372372
model = LinearFunction(slope=1)
373373
params = {"foo": np.linspace(0, 1)}

0 commit comments

Comments
 (0)