b'[11:51:44] /workspace/include/xgboost/././feature_map.h:83: unknown feature type, use i for indicator and q for quantity\n\nStack trace returned 10 entries:\n[bt] (0) /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so(dmlc::StackTrace()+0x47) [0x7f144c6da2f7]\n[bt] (1) /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x18) [0x7f144c6da9a8]\n[bt] (2) /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so(xgboost::FeatureMap::PushBack(int, char const*, char const*)+0x274) [0x7f144c7286f4]\n[bt] (3) /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/xgboost/./lib/libxgboost.so(XGBoosterDumpModelEx+0x296) [0x7f144c71c576]\n[bt] (4) /root/.pyenv/versions/3.6.5/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call_unix64+0x4c) [0x7f168d1f7b8a]\n[bt] (5) /root/.pyenv/versions/3.6.5/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(ffi_call+0x165) [0x7f168d1f6cd5]\n[bt] (6) /root/.pyenv/versions/3.6.5/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(_ctypes_callproc+0x283) [0x7f168d1ef043]\n[bt] (7) /root/.pyenv/versions/3.6.5/lib/python3.6/lib-dynload/_ctypes.cpython-36m-x86_64-linux-gnu.so(+0x970f) [0x7f168d1e670f]\n[bt] (8) /root/.pyenv/versions/3.6.5/bin/python3.6 -m ipykernel_launcher -f /data/user_data/chunfengyin/.local/share/jupyter/runtime/kernel-45d8bddc-6994-4b5d-b942-a667da46c8f7.json(_PyObject_FastCallDict+0xa2) [0x451f52]\n[bt] (9) /root/.pyenv/versions/3.6.5/bin/python3.6 -m ipykernel_launcher -f /data/user_data/chunfengyin/.local/share/jupyter/runtime/kernel-45d8bddc-6994-4b5d-b942-a667da46c8f7.json() [0x540b45]\n\n'
这个是在获取feature importance的时候报错,
通过排查发现是因为特征名称包含空格,将空格替换掉即可解决。