I figures out that this is because compute_class_weight is being imported again in utils.