@@ -1741,15 +1741,15 @@ def score(self, X: SUPPORTED_FEAT_TYPES, y: SUPPORTED_TARGET_TYPES) -> float:
17411741        check_is_fitted (self )
17421742
17431743        prediction  =  self .predict (X )
1744-         y  =  self .InputValidator .target_validator .transform (y )
1744+         y  =  self .input_validator .target_validator .transform (y )
17451745
17461746        # Encode the prediction using the input validator 
17471747        # We train autosklearn with a encoded version of y, 
17481748        # which is decoded by predict(). 
17491749        # Above call to validate() encodes the y given for score() 
17501750        # Below call encodes the prediction, so we compare in the 
17511751        # same representation domain 
1752-         prediction  =  self .InputValidator .target_validator .transform (prediction )
1752+         prediction  =  self .input_validator .target_validator .transform (prediction )
17531753
17541754        return  compute_single_metric (
17551755            solution = y ,
@@ -2267,16 +2267,15 @@ def predict(
22672267        n_jobs : int  =  1 ,
22682268    ) ->  np .ndarray :
22692269        check_is_fitted (self )
2270-         assert  self .InputValidator  is  not   None 
2271- 
22722270        probabilities  =  self .predict_proba (X , batch_size = batch_size , n_jobs = n_jobs )
2271+         validator  =  self .input_validator 
22732272
2274-         if  self . InputValidator .target_validator .is_single_column_target ():
2273+         if  validator .target_validator .is_single_column_target ():
22752274            predicted_indexes  =  np .argmax (probabilities , axis = 1 )
22762275        else :
22772276            predicted_indexes  =  (probabilities  >  0.5 ).astype (int )
22782277
2279-         return  self . InputValidator .target_validator .inverse_transform (predicted_indexes )
2278+         return  validator .target_validator .inverse_transform (predicted_indexes )
22802279
22812280    def  predict_proba (
22822281        self ,
0 commit comments