Hi,
I am trying to load the model that I dump in json file but it doesn't work. Is the package now only support loading .txt file? Is there a way to work around with this issue? I notice that if I save the file in .txt instead of dump it in json the model load without problem. I am using Python 3.6
LightGBMError Traceback (most recent call last)
in ()
1 # Load saved model
2
----> 3 bst = lgb.Booster(model_file='clvpr1.json')
~/anaconda3/lib/python3.6/site-packages/lightgbm/basic.py in init(self, params, train_set, model_file, silent)
1296 c_str(model_file),
1297 ctypes.byref(out_num_iterations),
-> 1298 ctypes.byref(self.handle)))
1299 out_num_class = ctypes.c_int(0)
1300 _safe_call(_LIB.LGBM_BoosterGetNumClasses(
~/anaconda3/lib/python3.6/site-packages/lightgbm/basic.py in _safe_call(ret)
46 """
47 if ret != 0:
---> 48 raise LightGBMError(_LIB.LGBM_GetLastError())
49
50
LightGBMError: b'unknown submodel type in model file clvpr1.json'
@econkc the model cannot be loaded from json format. you should load from native text format.