2525from tritonclient .grpc import model_config_pb2 as model_config # noqa
2626
2727import merlin .systems .dag .ops .fil as fil_op
28- from merlin .core .compat import HAS_GPU
2928from merlin .dag import ColumnSelector , Graph
3029from merlin .schema import Schema
3130from merlin .systems .dag .runtimes .triton .ops .fil import FILTriton
3231
33- need_gpu = pytest .mark .skipif (not HAS_GPU , reason = "No GPU available" )
34-
3532
3633def export_op (export_dir , triton_op ) -> model_config .ModelConfig :
3734 triton_op .export (export_dir , None , None )
@@ -150,7 +147,6 @@ def test_binary_classifier_default_cpu(get_model_fn, get_model_params, tmpdir):
150147 ["get_model_fn" , "get_model_params" ],
151148 [(xgboost_train , {"objective" : "binary:logistic" }), (xgboost_classifier , {})],
152149)
153- @need_gpu
154150def test_binary_classifier_default_gpu (get_model_fn , get_model_params , tmpdir ):
155151 X , y = get_classification_data (classes = 2 )
156152 model = get_model_fn (X , y , ** get_model_params )
@@ -165,7 +161,6 @@ def test_binary_classifier_default_gpu(get_model_fn, get_model_params, tmpdir):
165161 ["get_model_fn" , "get_model_params" ],
166162 [(xgboost_train , {"objective" : "binary:logistic" }), (xgboost_classifier , {})],
167163)
168- @need_gpu
169164def test_binary_classifier_with_proba_gpu (get_model_fn , get_model_params , tmpdir ):
170165 X , y = get_classification_data (classes = 2 )
171166 model = get_model_fn (X , y , ** get_model_params )
@@ -198,7 +193,6 @@ def test_binary_classifier_with_proba_cpu(get_model_fn, get_model_params, tmpdir
198193 ["get_model_fn" , "get_model_params" ],
199194 [(xgboost_train , {"objective" : "multi:softmax" , "num_class" : 8 }), (xgboost_classifier , {})],
200195)
201- @need_gpu
202196def test_multi_classifier_gpu (get_model_fn , get_model_params , tmpdir ):
203197 X , y = get_classification_data (classes = 8 )
204198 model = get_model_fn (X , y , ** get_model_params )
@@ -231,7 +225,6 @@ def test_multi_classifier_cpu(get_model_fn, get_model_params, tmpdir):
231225 ["get_model_fn" , "get_model_params" ],
232226 [(xgboost_train , {"objective" : "reg:squarederror" }), (xgboost_regressor , {})],
233227)
234- @need_gpu
235228def test_regressor_gpu (get_model_fn , get_model_params , tmpdir ):
236229 X , y = get_regression_data ()
237230 model = get_model_fn (X , y , ** get_model_params )
@@ -266,7 +259,6 @@ def test_regressor_cpu(get_model_fn, get_model_params, tmpdir):
266259 (xgboost_regressor , "xgboost.json" ),
267260 ],
268261)
269- @need_gpu
270262def test_model_file_gpu (get_model_fn , expected_model_filename , tmpdir ):
271263 X , y = get_regression_data ()
272264 model = get_model_fn (X , y )
@@ -292,7 +284,6 @@ def test_model_file_cpu(get_model_fn, expected_model_filename, tmpdir):
292284 assert model_path .is_file ()
293285
294286
295- @need_gpu
296287def test_fil_op_exports_own_config (tmpdir ):
297288 X , y = get_regression_data ()
298289 model = xgboost_train (X , y , objective = "reg:squarederror" )
@@ -309,7 +300,6 @@ def test_fil_op_exports_own_config(tmpdir):
309300 assert config .output [0 ].dims == [1 ]
310301
311302
312- @need_gpu
313303def test_fil_op_compute_schema ():
314304 X , y = get_regression_data ()
315305 model = xgboost_train (X , y , objective = "reg:squarederror" )
@@ -323,7 +313,6 @@ def test_fil_op_compute_schema():
323313 assert out_schema .column_names == ["output__0" ]
324314
325315
326- @need_gpu
327316def test_fil_schema_validation ():
328317 X , y = get_regression_data ()
329318 model = xgboost_train (X , y , objective = "reg:squarederror" )
0 commit comments