MCPcopy Create free account
hub / github.com/catboost/catboost / load_model

Method load_model

catboost/python-package/catboost/core.py:3745–3763  ·  view source on GitHub ↗

Load model from a file, stream or blob. Parameters ---------- fname : string Input file name.

(self, fname=None, format='cbm', stream=None, blob=None)

Source from the content-addressed store, hash-verified

3743 self._save_model(fname, format, export_parameters, pool)
3744
3745 def load_model(self, fname=None, format='cbm', stream=None, blob=None):
3746 """
3747 Load model from a file, stream or blob.
3748
3749 Parameters
3750 ----------
3751 fname : string
3752 Input file name.
3753 """
3754 if (fname is None) + (stream is None) + (blob is None) != 2:
3755 raise CatBoostError("Only one of fname/stream/blob arguments should be specified")
3756
3757 if fname is not None:
3758 self._load_model(fname, format)
3759 elif stream is not None:
3760 self._load_from_stream(stream)
3761 elif blob is not None:
3762 self._load_from_string(blob)
3763 return self
3764
3765 def get_param(self, key):
3766 """

Callers 15

check_load_from_streamFunction · 0.95
check_load_from_stringFunction · 0.95
test_onnx_importFunction · 0.95
test_save_modelFunction · 0.95
test_multi_reload_modelFunction · 0.95
test_metadataFunction · 0.95
model_etcMethod · 0.95

Calls 4

_load_modelMethod · 0.80
_load_from_streamMethod · 0.80
_load_from_stringMethod · 0.80
CatBoostErrorClass · 0.50

Tested by 15

check_load_from_streamFunction · 0.76
check_load_from_stringFunction · 0.76
test_onnx_importFunction · 0.76
test_save_modelFunction · 0.76
test_multi_reload_modelFunction · 0.76
test_metadataFunction · 0.76
model_etcMethod · 0.76