Skip to content

Commit 4208c18

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Allow bool as a column dtype
1 parent 90777bb commit 4208c18

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openlayer/validators/dataset_validators.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,13 @@ def _validate_dataset_and_config_consistency(self):
169169

170170
def _validate_dataset_dtypes(self):
171171
"""Checks whether the dataset contains unsupported dtypes."""
172-
supported_dtypes = {"float32", "float64", "int32", "int64", "object"}
172+
supported_dtypes = {"bool", "float32", "float64", "int32", "int64", "object"}
173173
dataset_df_dtypes = {dtype.name for dtype in self.dataset_df.dtypes}
174174
unsupported_dtypes = dataset_df_dtypes - supported_dtypes
175175
if unsupported_dtypes:
176176
self.failed_validations.append(
177177
"The dataset contains unsupported dtypes. The supported dtypes are "
178-
"'float32', 'float64', 'int32', 'int64', 'object'. "
178+
"'bool', 'float32', 'float64', 'int32', 'int64', 'object'. "
179179
f"The dataset contains the following unsupported dtypes: {unsupported_dtypes}"
180180
" Please cast the columns in your dataset to conform to these dtypes."
181181
)

0 commit comments

Comments
 (0)