@@ -992,7 +992,7 @@ def compute_percentile(self):
992992 thresholds_dict [tensor ] = (thresholds_dict [tensor ][0 ], max_value )
993993 thresholds_dict [tensor ] = (* thresholds_dict [tensor ], * hist [:2 ])
994994 # Plot histogram for debug only
995- if os .environ .get ("QUANTIZATION_DEBUG" , 0 ) in (1 , "1" ):
995+ if os .environ .get ("QUANTIZATION_DEBUG" , "0" ) in (1 , "1" ):
996996 apply_plot (hist , hist_edges )
997997
998998 return thresholds_dict
@@ -1013,7 +1013,7 @@ def compute_entropy(self):
10131013 thresholds_dict [tensor ] = (* optimal_threshold , * histogram [:2 ])
10141014
10151015 # Plot histogram for debug only
1016- if os .environ .get ("QUANTIZATION_DEBUG" , 0 ) in (1 , "1" ):
1016+ if os .environ .get ("QUANTIZATION_DEBUG" , "0" ) in (1 , "1" ):
10171017 apply_plot (histogram [0 ], histogram [1 ])
10181018
10191019 return thresholds_dict
@@ -1075,7 +1075,7 @@ def compute_distribution(self):
10751075 )
10761076
10771077 # Plot histogram for debug only
1078- if os .environ .get ("QUANTIZATION_DEBUG" , 0 ) in (1 , "1" ):
1078+ if os .environ .get ("QUANTIZATION_DEBUG" , "0" ) in (1 , "1" ):
10791079 apply_plot (hist , hist_edges )
10801080
10811081 return thresholds_dict
0 commit comments