I am trying to export CatBoost model object to json directly, without saving to a file.
Following this Tutorial,
import json
...
cls.save_model(
"model.json",
format="json",
categorical features.
)
model = json.load(open("model.json", "r"))
At this stage we got json
(not CatBoostClassifier
) in model
object after these steps.
Is there any way to get exact json by some method call maybe?