1414import pytest
1515from sklearn .model_selection import train_test_split
1616
17+ from deeptab import set_seed
1718from deeptab .models import (
1819 ENODELSS ,
1920 MLPLSS ,
@@ -434,6 +435,8 @@ def test_tabtransformer_fit_predict(cls, task, classification_data_with_cat, reg
434435
435436@pytest .mark .parametrize ("cls" , EXPERIMENTAL_CLASSIFIERS )
436437def test_experimental_classifier_fit_predict_evaluate (cls , classification_data ):
438+ # Experimental models are numerically less stable; seed for deterministic CI.
439+ set_seed (RANDOM_STATE )
437440 X_train , X_test , y_train , y_test = classification_data
438441 model = cls ()
439442 model .fit (X_train , y_train , ** FIT_KWARGS )
@@ -460,6 +463,8 @@ def test_experimental_classifier_fit_predict_evaluate(cls, classification_data):
460463
461464@pytest .mark .parametrize ("cls" , EXPERIMENTAL_REGRESSORS )
462465def test_experimental_regressor_fit_predict_evaluate (cls , regression_data ):
466+ # Experimental models are numerically less stable; seed for deterministic CI.
467+ set_seed (RANDOM_STATE )
463468 X_train , X_test , y_train , y_test = regression_data
464469 model = cls ()
465470 model .fit (X_train , y_train , ** FIT_KWARGS )
@@ -476,6 +481,8 @@ def test_experimental_regressor_fit_predict_evaluate(cls, regression_data):
476481
477482@pytest .mark .parametrize ("cls" , EXPERIMENTAL_LSS_MODELS )
478483def test_experimental_lss_fit_predict_evaluate (cls , regression_data ):
484+ # Experimental models are numerically less stable; seed for deterministic CI.
485+ set_seed (RANDOM_STATE )
479486 X_train , X_test , y_train , y_test = regression_data
480487 model = cls ()
481488 model .fit (X_train , y_train , family = "normal" , ** FIT_KWARGS )
0 commit comments