xgboost
xgboost copied to clipboard
SHAP value with refreshed tree.
Change https://github.com/dmlc/xgboost/blob/d03794ce7a6d5772bd5c3b7d74b7a92557f2e984/demo/guide-python/update_process.py to using CPU, one should be able to reproduce an error:
File "./demo/guide-python/update_process.py", line 94, in <module>
main()
File "./demo/guide-python/update_process.py", line 68, in main
refreshed_SHAP = refreshed.predict(Xy, pred_contribs=True)
File "/home/jiaming/Workspace/XGBoost/xgboost/python-package/xgboost/core.py", line 2085, in predict
_check_call(
File "/home/jiaming/Workspace/XGBoost/xgboost/python-package/xgboost/core.py", line 250, in _check_call
raise XGBoostError(py_str(_LIB.XGBGetLastError()))
xgboost.core.XGBoostError: [16:27:43] /home/jiaming/Workspace/XGBoost/xgboost/src/tree/tree_model.cc:1322: Check failed: unique_path[i].pweight == 0 (-nan vs. 0) : Unique path 3 must have zero weight
Stack trace:
This bug is still there (current stable) and update_process.py fails with the same error on a gpu-less computer.
Does anyone know a workaround?