|
@@ -163,7 +163,7 @@ class FeatureSpec:
|
|
|
assert len(contained_features) == 1
|
|
assert len(contained_features) == 1
|
|
|
|
|
|
|
|
# check label dtype
|
|
# check label dtype
|
|
|
- assert np.dtype(self.feature_spec[first_feature][DTYPE_SELECTOR]) == np.bool
|
|
|
|
|
|
|
+ assert np.dtype(self.feature_spec[first_feature][DTYPE_SELECTOR]) == bool
|
|
|
|
|
|
|
|
else:
|
|
else:
|
|
|
assert False, "Feature of unknown type"
|
|
assert False, "Feature of unknown type"
|
|
@@ -237,7 +237,7 @@ class FeatureSpec:
|
|
|
zip(categorical_feature_names, cat_feature_types, categorical_feature_cardinalities)}
|
|
zip(categorical_feature_names, cat_feature_types, categorical_feature_cardinalities)}
|
|
|
for f_name in numerical_feature_names:
|
|
for f_name in numerical_feature_names:
|
|
|
feature_dict[f_name] = {DTYPE_SELECTOR: str(np.dtype(np.float16))}
|
|
feature_dict[f_name] = {DTYPE_SELECTOR: str(np.dtype(np.float16))}
|
|
|
- feature_dict[label_feature_name] = {DTYPE_SELECTOR: str(np.dtype(np.bool))}
|
|
|
|
|
|
|
+ feature_dict[label_feature_name] = {DTYPE_SELECTOR: str(np.dtype(bool))}
|
|
|
|
|
|
|
|
channel_spec = {CATEGORICAL_CHANNEL: categorical_feature_names,
|
|
channel_spec = {CATEGORICAL_CHANNEL: categorical_feature_names,
|
|
|
NUMERICAL_CHANNEL: numerical_feature_names,
|
|
NUMERICAL_CHANNEL: numerical_feature_names,
|
|
@@ -297,4 +297,4 @@ def get_categorical_feature_type(size: int):
|
|
|
if size < np.iinfo(numpy_type).max:
|
|
if size < np.iinfo(numpy_type).max:
|
|
|
return numpy_type
|
|
return numpy_type
|
|
|
|
|
|
|
|
- raise RuntimeError(f"Categorical feature of size {size} is too big for defined types")
|
|
|
|
|
|
|
+ raise RuntimeError(f"Categorical feature of size {size} is too big for defined types")
|