[CI] Refactor tests to reduce CI time. (#8312)
This commit is contained in:
@@ -6,6 +6,8 @@ sys.path.append("tests/python")
|
||||
import testing as tm
|
||||
|
||||
|
||||
pytestmark = pytest.mark.timeout(10)
|
||||
|
||||
parameter_strategy = strategies.fixed_dictionaries({
|
||||
'booster': strategies.just('gblinear'),
|
||||
'eta': strategies.floats(0.01, 0.25),
|
||||
@@ -30,7 +32,7 @@ def train_result(param, dmat, num_rounds):
|
||||
class TestGPULinear:
|
||||
@given(parameter_strategy, strategies.integers(10, 50),
|
||||
tm.dataset_strategy)
|
||||
@settings(deadline=None, print_blob=True)
|
||||
@settings(deadline=None, max_examples=20, print_blob=True)
|
||||
def test_gpu_coordinate(self, param, num_rounds, dataset):
|
||||
assume(len(dataset.y) > 0)
|
||||
param['updater'] = 'gpu_coord_descent'
|
||||
@@ -49,7 +51,7 @@ class TestGPULinear:
|
||||
strategies.floats(1e-5, 0.8),
|
||||
strategies.floats(1e-5, 0.8)
|
||||
)
|
||||
@settings(deadline=None, print_blob=True)
|
||||
@settings(deadline=None, max_examples=20, print_blob=True)
|
||||
def test_gpu_coordinate_regularised(self, param, num_rounds, dataset, alpha, lambd):
|
||||
assume(len(dataset.y) > 0)
|
||||
param['updater'] = 'gpu_coord_descent'
|
||||
|
||||
Reference in New Issue
Block a user