File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -563,10 +563,10 @@ def _validate_dataset_and_config_consistency(self):
563
563
" Please cast the columns in your dataset to conform to these dtypes."
564
564
)
565
565
566
- if self ._columns_not_in_dataset_df (dataset_df , column_names ):
566
+ if self ._columns_not_specified (dataset_df , column_names ):
567
567
dataset_and_config_consistency_failed_validations .append (
568
- "There are columns specified in the `columnNames` dataset config "
569
- " which are not in the dataset ."
568
+ "Not all columns in the dataset are specified in `columnNames`. "
569
+ " Please specify all dataset columns in `columnNames` ."
570
570
)
571
571
572
572
if label_column_name :
@@ -729,6 +729,15 @@ def _columns_not_in_dataset_df(
729
729
return True
730
730
return False
731
731
732
+ @staticmethod
733
+ def _columns_not_specified (
734
+ dataset_df : pd .DataFrame , columns_list : List [str ]
735
+ ) -> bool :
736
+ """Checks whether the columns are specified."""
737
+ if set (columns_list ) != set (dataset_df .columns ):
738
+ return True
739
+ return False
740
+
732
741
@staticmethod
733
742
def _exceeds_character_limit (
734
743
dataset_df : pd .DataFrame , text_column_name : str
You can’t perform that action at this time.
0 commit comments