Skip to content

Commit

Permalink
Updated test_config, skipping DIF if no gpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Jad-yehya committed Jun 28, 2024
1 parent 5ec9975 commit eb89225
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import pytest # noqa: F401

from benchopt.utils.sys_info import get_cuda_version


def check_test_solver_install(solver_class):
"""Hook called in `test_solver_install`.
Expand All @@ -10,4 +12,6 @@ def check_test_solver_install(solver_class):
particular architecture, call pytest.xfail when
detecting the situation.
"""
pass
if solver_class.name.lower() == "dif":
if get_cuda_version() is None:
pytest.xfail("Deep IsolationForest needs a working GPU hardware.")

0 comments on commit eb89225

Please sign in to comment.