File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
mlresearch/active_learning/tests Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -98,12 +98,15 @@ def test_augmentation_active_learning():
9898 )
9999 al_model .fit (iris .data , iris .target )
100100
101+ # Get steps in classifier - Required for compatibility purposes
102+ if hasattr (al_model .classifier_ , "best_estimator_" ):
103+ steps = al_model .classifier_ .best_estimator_ .steps
104+ else :
105+ steps = al_model .classifier_ .steps
106+
101107 assert al_model .max_iter_ == 2
102108 assert al_model .random_state == RANDOM_STATE
103- assert (
104- dict (al_model .classifier_ .best_estimator_ .steps )["generator" ].random_state
105- == RANDOM_STATE
106- )
109+ assert dict (steps )["generator" ].random_state == RANDOM_STATE
107110
108111
109112@pytest .mark .parametrize ("name" , ACTIVE_LEARNERS .keys ())
You can’t perform that action at this time.
0 commit comments