Compatability with interpret v0.3.0
maoding opened this issue · comments
- ebm2onnx version: v1.3.0
- Python version: any
- Operating System: any
Description
Hello ebm2onnx team,
I recently discovered that ebm2onnx
cannot cope with the recent changes of interpret
v.0.3.0
.
Further deatils can be also found at interpretml/interpret#388.
The problems are more or less related to the changes of interpret
to be more scikit-learn
conform. This has effects on the feature_names
, feautre_types
and feature_groups_
attributes of the model.
See e.g. https://github.com/interpretml/ebm2onnx/blob/master/ebm2onnx/convert.py#L86.
What I Did
import ebm2onnx
from interpret.glassbox import ExplainableBoostingRegressor
from sklearn.datasets import load_diabetes
diabetes = load_diabetes(as_frame=True)
df = diabetes.frame
X = df[diabetes.feature_names]
y = df["target"]
ebm = ExplainableBoostingRegressor()
ebm = ebm.fit(X, y)
ebm2onnx.to_onnx(ebm, ebm2onnx.get_dtype_from_pandas(X))
Results in:
Traceback (most recent call last):
File "dummy.py", line 15, in <module>
ebm2onnx.to_onnx(ebm ,ebm2onnx.get_dtype_from_pandas(X))
File "/opt/miniconda/lib/python3.8/site-packages/ebm2onnx/convert.py", line 86, in to_onnx
inputs = [None for _ in model.feature_names]
yes, the changes are available in the feature/develop branch, and ready for release.
We will merge/publish very soon.
emb2onnx v2.0.0 has just been released.