@@ -203,36 +203,44 @@ def test_create_data_drift_pipeline(self):
203203 )
204204
205205 def test_create_concept_drift_pipeline_drift_not_detected (self ):
206- concept_drift_report = run_concept_drift_pipeline (
207- reference_concept_drift , current_concept_drift , "y_testing_multi"
206+ concept_drift_report = vars (
207+ run_concept_drift_pipeline (
208+ reference_concept_drift , current_concept_drift , "y_testing_multi"
209+ )
208210 )
209211 assert list (concept_drift_report .keys ()) == [
210- "timestamp" ,
211212 "concept_drift_summary" ,
212213 "column_correlation" ,
213214 ]
214215 assert (
215- round (concept_drift_report ["concept_drift_summary" ]["drift_score" ], 3 )
216+ round (vars ( concept_drift_report ["concept_drift_summary" ]) ["drift_score" ], 3 )
216217 == 0.082
217218 )
218- assert concept_drift_report ["concept_drift_summary" ]["drift_detected" ] == False
219+ assert (
220+ vars (concept_drift_report ["concept_drift_summary" ])["drift_detected" ]
221+ == False
222+ )
219223
220224 def test_create_concept_drift_pipeline_drift_detected (self ):
221- concept_drift_report = run_concept_drift_pipeline (
222- reference_concept_drift_detected ,
223- current_concept_drift_detected ,
224- "discount_price__currency" ,
225+ concept_drift_report = vars (
226+ run_concept_drift_pipeline (
227+ reference_concept_drift_detected ,
228+ current_concept_drift_detected ,
229+ "discount_price__currency" ,
230+ )
225231 )
226232 assert list (concept_drift_report .keys ()) == [
227- "timestamp" ,
228233 "concept_drift_summary" ,
229234 "column_correlation" ,
230235 ]
231236 assert (
232- round (concept_drift_report ["concept_drift_summary" ]["drift_score" ], 3 )
237+ round (vars ( concept_drift_report ["concept_drift_summary" ]) ["drift_score" ], 3 )
233238 == 0.008
234239 )
235- assert concept_drift_report ["concept_drift_summary" ]["drift_detected" ] == True
240+ assert (
241+ vars (concept_drift_report ["concept_drift_summary" ])["drift_detected" ]
242+ == True
243+ )
236244
237245 def test_create_binary_classification_training_model_pipeline (self ):
238246 model , eval = create_binary_classification_training_model_pipeline (
0 commit comments