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):
563563 " Please cast the columns in your dataset to conform to these dtypes."
564564 )
565565
566- if self ._columns_not_in_dataset_df (dataset_df , column_names ):
566+ if self ._columns_not_specified (dataset_df , column_names ):
567567 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` ."
570570 )
571571
572572 if label_column_name :
@@ -729,6 +729,15 @@ def _columns_not_in_dataset_df(
729729 return True
730730 return False
731731
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+
732741 @staticmethod
733742 def _exceeds_character_limit (
734743 dataset_df : pd .DataFrame , text_column_name : str
You can’t perform that action at this time.
0 commit comments