@@ -863,7 +863,7 @@ def _create_project(self, **kwargs) -> Project:
863
863
auto_audit_number_of_labels = kwargs .get ("auto_audit_number_of_labels" )
864
864
if auto_audit_percentage is not None or auto_audit_number_of_labels is not None :
865
865
raise ValueError (
866
- "quality_mode must be set instead of auto_audit_percentage or auto_audit_number_of_labels."
866
+ "quality_modes must be set instead of auto_audit_percentage or auto_audit_number_of_labels."
867
867
)
868
868
869
869
name = kwargs .get ("name" )
@@ -895,6 +895,11 @@ def _create_project(self, **kwargs) -> Project:
895
895
896
896
quality_modes = kwargs .get ("quality_modes" )
897
897
quality_mode = kwargs .get ("quality_mode" )
898
+ if quality_mode :
899
+ logger .warning (
900
+ "Passing quality_mode is deprecated and will soon no longer be supported. Use quality_modes instead."
901
+ )
902
+
898
903
if quality_modes and quality_mode :
899
904
raise ValueError (
900
905
"Cannot use both quality_modes and quality_mode at the same time. Use one or the other." )
@@ -905,7 +910,7 @@ def _create_project(self, **kwargs) -> Project:
905
910
data = kwargs
906
911
data .pop ("quality_modes" , None )
907
912
data .pop ("quality_mode" , None )
908
- if quality_modes is None or quality_modes == [QualityMode .Benchmark ] or quality_mode is QualityMode .Benchmark :
913
+ if quality_modes is None or len ( quality_modes ) == 0 or quality_modes == [QualityMode .Benchmark ] or quality_mode is QualityMode .Benchmark :
909
914
data [
910
915
"auto_audit_number_of_labels" ] = BENCHMARK_AUTO_AUDIT_NUMBER_OF_LABELS
911
916
data ["auto_audit_percentage" ] = BENCHMARK_AUTO_AUDIT_PERCENTAGE
0 commit comments