@@ -484,30 +484,43 @@ def data_tests(self):
484484 data_tests = {}
485485 xp = self .prepro .transform (self .reduced_data_sample )
486486 xp_nan = self .prepro .transform_missing (self .reduced_data_sample )
487-
488- data_tests ["is_greater_than" ] = column_a_greater_than_b (
489- self .reduced_data_sample ,
490- self .column_types ,
491- t = 0.95 ,
492- )
487+ try :
488+ data_tests ["is_greater_than" ] = column_a_greater_than_b (
489+ self .reduced_data_sample ,
490+ self .column_types ,
491+ t = 0.95 ,
492+ )
493+ except :
494+ print ("Could not complete is_greater_than tests." )
495+ data_tests ["is_greater_than" ] = None
493496
494497 print ("Finding bi-variate tests..." )
495- bivariate_tests = get_label_correlation (
496- xp ,
497- self .prepro .cat_cols ,
498- p_tr = 0.66 ,
499- delta_tr = 0.05 ,
500- )
501- data_tests ["bivariate_tests" ] = bivariate_tests
498+ try :
499+ bivariate_tests = get_label_correlation (
500+ xp ,
501+ self .prepro .cat_cols ,
502+ p_tr = 0.66 ,
503+ delta_tr = 0.05 ,
504+ )
505+ data_tests ["bivariate_tests" ] = bivariate_tests
506+
507+ except :
508+ print ("Could not complete bivariate tests." )
509+ data_tests ["bivariate_tests" ] = None
510+
502511 print ("Finding missing-values tests..." )
512+ try :
513+ missing_values_tests = get_label_correlation (
514+ xp_nan ,
515+ self .prepro .nan_cols ,
516+ p_tr = 0.66 ,
517+ delta_tr = 0.05 ,
518+ )
519+ data_tests ["missing_values_tests" ] = missing_values_tests
520+ except :
521+ print ("Could not complete missing_values_tests tests." )
522+ data_tests ["missing_values_tests" ] = None
503523
504- missing_values_tests = get_label_correlation (
505- xp_nan ,
506- self .prepro .nan_cols ,
507- p_tr = 0.66 ,
508- delta_tr = 0.05 ,
509- )
510- data_tests ["missing_values_tests" ] = missing_values_tests
511524 """
512525 cat_columns = self.reduced_data_sample.columns[
513526 self.reduced_data_sample.dtypes == "object"
@@ -546,11 +559,14 @@ def data_tests(self):
546559 print ("Finding linear combinations..." )
547560
548561 self .reduced_data_sample = self .reduced_data_sample .drop (to_drop , axis = 1 )
549- linear_combinations , num_cols = find_deterministic_columns_regression (
550- self .reduced_data_sample ,
551- )
552- data_tests ["linear_combinations" ] = linear_combinations
553-
562+ try :
563+ linear_combinations , num_cols = find_deterministic_columns_regression (
564+ self .reduced_data_sample ,
565+ )
566+ data_tests ["linear_combinations" ] = linear_combinations
567+ except :
568+ print ("Could not complete linear_combinations tests." )
569+ data_tests ["linear_combinations" ] = None
554570 return data_tests
555571
556572 def slice_data (self ):
0 commit comments