Skip to content

Commit

Permalink
skip tests for cuda version
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyu1994 committed Feb 5, 2024
1 parent cf60467 commit bf2f649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/python_package_test/test_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def test_missing_value_handle_none():
assert evals_result['valid_0']['auc'][-1] == pytest.approx(ret)


@pytest.mark.parametrize('use_quantized_grad', [True, False])
@pytest.mark.parametrize('use_quantized_grad', [pytest.param(True, marks=pytest.mark.skipif(getenv('TASK', '') == 'cuda', reason='Skip because quantized training with categorical features is not supported for cuda version')), False])
def test_categorical_handle(use_quantized_grad):
x = [0, 1, 2, 3, 4, 5, 6, 7]
y = [0, 1, 0, 1, 0, 1, 0, 1]
Expand Down Expand Up @@ -351,7 +351,7 @@ def test_categorical_handle(use_quantized_grad):
assert evals_result['valid_0']['auc'][-1] == pytest.approx(ret)


@pytest.mark.parametrize('use_quantized_grad', [True, False])
@pytest.mark.parametrize('use_quantized_grad', [pytest.param(True, marks=pytest.mark.skipif(getenv('TASK', '') == 'cuda', reason='Skip because quantized training with categorical features is not supported for cuda version')), False])
def test_categorical_handle_na(use_quantized_grad):
x = [0, np.nan, 0, np.nan, 0, np.nan]
y = [0, 1, 0, 1, 0, 1]
Expand Down Expand Up @@ -393,7 +393,7 @@ def test_categorical_handle_na(use_quantized_grad):
assert evals_result['valid_0']['auc'][-1] == pytest.approx(ret)


@pytest.mark.parametrize('use_quantized_grad', [True, False])
@pytest.mark.parametrize('use_quantized_grad', [pytest.param(True, marks=pytest.mark.skipif(getenv('TASK', '') == 'cuda', reason='Skip because quantized training with categorical features is not supported for cuda version')), False])
def test_categorical_non_zero_inputs(use_quantized_grad):
x = [1, 1, 1, 1, 1, 1, 2, 2]
y = [1, 1, 1, 1, 1, 1, 0, 0]
Expand Down

0 comments on commit bf2f649

Please sign in to comment.