You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Serialization of an EBM model fails with numpy==v2.0.0 due to np.NINF being deprecated.
What I Did
onnx_model = ebm2onnx.to_onnx(model=model, dtype=ebm2onnx.get_dtype_from_pandas(features))
File [/usr/local/lib/python3.12/site-packages/ebm2onnx/convert.py:113](http://localhost:8888/usr/local/lib/python3.12/site-packages/ebm2onnx/convert.py#line=112), in to_onnx(model, dtype, name, predict_proba, explain, target_opset, prediction_name, probabilities_name, explain_name)
110 feature_group=model.term_features_[feature_index]
112 if feature_type == 'continuous':
--> 113 bins = [np.NINF, np.NINF] + list(model.bins_[feature_group[0]][0])
114 additive_terms = model.term_scores_[feature_index]
116 feature_dtype = infer_features_dtype(dtype, feature_name)
File [/usr/local/lib/python3.12/site-packages/numpy/__init__.py:397](http://localhost:8888/usr/local/lib/python3.12/site-packages/numpy/__init__.py#line=396), in __getattr__(attr)
394 raise AttributeError(__former_attrs__[attr])
396 if attr in __expired_attributes__:
--> 397 raise AttributeError(
398 f"`np.{attr}` was removed in the NumPy 2.0 release. "
399 f"{__expired_attributes__[attr]}"
400 )
402 if attr == "chararray":
403 warnings.warn(
404 "`np.chararray` is deprecated and will be removed from "
405 "the main namespace in the future. Use an array with a string "
406 "or bytes dtype instead.", DeprecationWarning, stacklevel=2)
AttributeError: `np.NINF` was removed in the NumPy 2.0 release. Use `-np.inf` instead.
I will make a PR for this easy fix.
The text was updated successfully, but these errors were encountered:
Description
Serialization of an EBM model fails with
numpy==v2.0.0
due to np.NINF being deprecated.What I Did
I will make a PR for this easy fix.
The text was updated successfully, but these errors were encountered: