From 3a7a27e32faaccaae611d9f620302dd53e12dca2 Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Fri, 31 May 2024 15:29:55 +0100 Subject: [PATCH 1/3] first tests to xgboost runtime added --- servers/xgboostserver/README.md | 1 + .../test/test_metadata_and_input.py | 39 +++++++++ .../test/test_model_and_predict.py | 50 ++++++++++++ servers/xgboostserver/test/xgboost_iris.ipynb | 24 +++++- .../xgboostserver/XGBoostServer2.py | 75 ++++++++++++++++++ servers/xgboostserver/xgboostserver/model.bst | Bin 0 -> 25646 bytes 6 files changed, 185 insertions(+), 4 deletions(-) create mode 100644 servers/xgboostserver/README.md create mode 100644 servers/xgboostserver/test/test_metadata_and_input.py create mode 100644 servers/xgboostserver/test/test_model_and_predict.py create mode 100644 servers/xgboostserver/xgboostserver/XGBoostServer2.py create mode 100644 servers/xgboostserver/xgboostserver/model.bst diff --git a/servers/xgboostserver/README.md b/servers/xgboostserver/README.md new file mode 100644 index 0000000000..d299df83e6 --- /dev/null +++ b/servers/xgboostserver/README.md @@ -0,0 +1 @@ +# XGBoost Runtime \ No newline at end of file diff --git a/servers/xgboostserver/test/test_metadata_and_input.py b/servers/xgboostserver/test/test_metadata_and_input.py new file mode 100644 index 0000000000..7970798141 --- /dev/null +++ b/servers/xgboostserver/test/test_metadata_and_input.py @@ -0,0 +1,39 @@ +import os +import tempfile +import numpy as np +import pytest +import xgboost as xgb +from XGBoostServer import XGBoostServer + +@pytest.fixture +def model_uri(): + with tempfile.TemporaryDirectory() as temp_dir: + X = np.random.rand(100, 5) + y = np.random.randint(2, size=100) + dtrain = xgb.DMatrix(X, label=y) + params = {'objective': 'binary:logistic', 'eval_metric': 'error'} + booster = xgb.train(params, dtrain, num_boost_round=10) + model_path = os.path.join(temp_dir, "model.json") + booster.save_model(model_path) + yield temp_dir + +def test_init_metadata(model_uri): + metadata = {"key": "value"} + metadata_path = os.path.join(model_uri, "metadata.yaml") + with open(metadata_path, "w") as f: + yaml.dump(metadata, f) + + server = XGBoostServer(model_uri) + + loaded_metadata = server.init_metadata() + + # Assert that the loaded metadata matches the original metadata + assert loaded_metadata == metadata + +def test_predict_invalid_input(model_uri): + # Create an instance of XGBoostServer with the model URI + server = XGBoostServer(model_uri) + server.load() + X_test = np.random.rand(10, 3) # Incorrect number of features + with pytest.raises(ValueError): + server.predict(X_test, names=[]) \ No newline at end of file diff --git a/servers/xgboostserver/test/test_model_and_predict.py b/servers/xgboostserver/test/test_model_and_predict.py new file mode 100644 index 0000000000..0dc0446b0d --- /dev/null +++ b/servers/xgboostserver/test/test_model_and_predict.py @@ -0,0 +1,50 @@ +import os +import tempfile +import numpy as np +from unittest import mock +import xgboost as xgb +from XGBoostServer import XGBoostServer + +def test_load_json_model(): + + with tempfile.TemporaryDirectory() as temp_dir: + X = np.random.rand(100, 5) + y = np.random.randint(2, size=100) + dtrain = xgb.DMatrix(X, label=y) + params = {'objective': 'binary:logistic', 'eval_metric': 'error'} + booster = xgb.train(params, dtrain, num_boost_round=10) + model_path = os.path.join(temp_dir, "model.json") + booster.save_model(model_path) + + server = XGBoostServer(temp_dir) + server.load() + + assert server.ready + assert isinstance(server._booster, xgb.Booster) + +def test_predict(): + # Create a temporary directory for the model file + with tempfile.TemporaryDirectory() as temp_dir: + # Train a dummy XGBoost model and save it in .json format + X = np.random.rand(100, 5) + y = np.random.randint(2, size=100) + dtrain = xgb.DMatrix(X, label=y) + params = {'objective': 'binary:logistic', 'eval_metric': 'error'} + booster = xgb.train(params, dtrain, num_boost_round=10) + model_path = os.path.join(temp_dir, "model.json") + booster.save_model(model_path) + + # Create an instance of XGBoostServer with the model URI + server = XGBoostServer(temp_dir) + + server.load() + + # Prepare test data + X_test = np.random.rand(10, 5) + + with mock.patch("seldon_core.Storage.download", return_value=temp_dir): + predictions = server.predict(X_test, names=[]) + + # Assert the expected shape and type of predictions + assert isinstance(predictions, np.ndarray) + assert predictions.shape == (10,) \ No newline at end of file diff --git a/servers/xgboostserver/test/xgboost_iris.ipynb b/servers/xgboostserver/test/xgboost_iris.ipynb index cd4bf9d771..6eb292dc22 100644 --- a/servers/xgboostserver/test/xgboost_iris.ipynb +++ b/servers/xgboostserver/test/xgboost_iris.ipynb @@ -9,9 +9,25 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 1, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[07:31:00] WARNING: ../src/learner.cc:573: \n", + "Parameters: { \"silent\" } might not be used.\n", + "\n", + " This may not be accurate due to some parameters are only used in language bindings but\n", + " passed down to XGBoost core. Or some parameters are not used but slip through this\n", + " verification. Please open an issue if you find above cases.\n", + "\n", + "\n", + "[07:31:00] WARNING: ../src/learner.cc:1095: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softmax' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior.\n" + ] + } + ], "source": [ "import os\n", "\n", @@ -319,7 +335,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -333,7 +349,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.6" + "version": "3.10.14" }, "varInspector": { "cols": { diff --git a/servers/xgboostserver/xgboostserver/XGBoostServer2.py b/servers/xgboostserver/xgboostserver/XGBoostServer2.py new file mode 100644 index 0000000000..933f99e094 --- /dev/null +++ b/servers/xgboostserver/xgboostserver/XGBoostServer2.py @@ -0,0 +1,75 @@ +import numpy as np +import seldon_core +from seldon_core.user_model import SeldonComponent +from typing import Dict, List, Union, Iterable +import os +import yaml +import logging +import xgboost as xgb +import json +from packaging import version + +logger = logging.getLogger(__name__) + +BOOSTER_FILE = "model.json" +BOOSTER_FILE_DEPRECATED = "model.bst" + + +class XGBoostServer(SeldonComponent): + def __init__(self, model_uri: str): + super().__init__() + self.model_uri = model_uri + self.ready = False + + def load(self): + model_file = os.path.join( + seldon_core.Storage.download(self.model_uri), BOOSTER_FILE + ) + if not os.path.exists(model_file): + # Fallback to deprecated .bst format + model_file = os.path.join( + seldon_core.Storage.download(self.model_uri), BOOSTER_FILE_DEPRECATED + ) + if os.path.exists(model_file): + logger.warning( + "Using deprecated .bst format for XGBoost model. " + "Please update to the .json format in the future." + ) + else: + raise FileNotFoundError(f"Model file not found: {BOOSTER_FILE} or {BOOSTER_FILE_DEPRECATED}") + + if version.parse(xgb.__version__) < version.parse("1.7.0"): + # Load model using deprecated method for older XGBoost versions + self._booster = xgb.Booster(model_file=model_file) + else: + # Load model using the new .json format for XGBoost >= 1.7.0 + self._booster = xgb.Booster() + self._booster.load_model(model_file) + + self.ready = True + + def predict( + self, X: np.ndarray, names: Iterable[str], meta: Dict = None + ) -> Union[np.ndarray, List, str, bytes]: + if not self.ready: + self.load() + dmatrix = xgb.DMatrix(X) + result: np.ndarray = self._booster.predict(dmatrix) + return result + + def init_metadata(self): + file_path = os.path.join(self.model_uri, "metadata.yaml") + + try: + with open(file_path, "r") as f: + metadata = yaml.safe_load(f.read()) + # Validate and sanitize the loaded metadata if needed + return metadata + except FileNotFoundError: + logger.debug(f"Metadata file {file_path} does not exist") + return {} + except yaml.YAMLError: + logger.error( + f"Metadata file {file_path} present but does not contain valid YAML" + ) + return {} \ No newline at end of file diff --git a/servers/xgboostserver/xgboostserver/model.bst b/servers/xgboostserver/xgboostserver/model.bst new file mode 100644 index 0000000000000000000000000000000000000000..232bd4bc9fc47f0f38d746a078c74e571cbe4d17 GIT binary patch literal 25646 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 IYSE(q0Y!s~B>(^b literal 0 HcmV?d00001 From 2a03a6515dbf9ca44f5de689bd56ed59127c4a93 Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 26 Sep 2024 12:27:14 +1000 Subject: [PATCH 2/3] xgboost added warning for deprecated format and increased python version --- servers/xgboostserver/Makefile | 2 +- servers/xgboostserver/test/xgboost_iris.ipynb | 66 ++++++++++------ .../xgboostserver/XGBoostServer.py | 37 +++++++-- .../xgboostserver/XGBoostServer2.py | 75 ------------------- .../xgboostserver/xgboostserver/model.json | 1 + .../xgboostserver/requirements.txt | 4 +- .../s2i/python/build_scripts/build_all.sh | 6 +- wrappers/s2i/python/build_scripts/push_all.sh | 6 +- 8 files changed, 84 insertions(+), 113 deletions(-) delete mode 100644 servers/xgboostserver/xgboostserver/XGBoostServer2.py create mode 100644 servers/xgboostserver/xgboostserver/model.json mode change 100755 => 100644 wrappers/s2i/python/build_scripts/build_all.sh mode change 100755 => 100644 wrappers/s2i/python/build_scripts/push_all.sh diff --git a/servers/xgboostserver/Makefile b/servers/xgboostserver/Makefile index 7bfbac9263..65ff66e117 100644 --- a/servers/xgboostserver/Makefile +++ b/servers/xgboostserver/Makefile @@ -11,7 +11,7 @@ docker-build: s2i build \ -E environment \ ./xgboostserver \ - ${DOCKER_REGISTRY}/seldon-core-s2i-python38:${VERSION} \ + seldonio/seldon-core-s2i-python3:${VERSION} \ ${IMAGE_NAME}:${VERSION} docker-push: diff --git a/servers/xgboostserver/test/xgboost_iris.ipynb b/servers/xgboostserver/test/xgboost_iris.ipynb index 6eb292dc22..ae7e32cb61 100644 --- a/servers/xgboostserver/test/xgboost_iris.ipynb +++ b/servers/xgboostserver/test/xgboost_iris.ipynb @@ -9,37 +9,55 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 4, + "metadata": {}, + "outputs": [], + "source": [ + "import os\n", + "import xgboost as xgb\n", + "from sklearn.datasets import load_iris" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [], + "source": [ + "model_dir = \".\"\n", + "BOOSTER_FILE = \"model.json\"\n", + "BOOSTER_FILE_DEPRECATED = \"model.bst\"" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "iris = load_iris()\n", + "y = iris[\"target\"]\n", + "X = iris[\"data\"]" + ] + }, + { + "cell_type": "code", + "execution_count": 8, "metadata": {}, "outputs": [ { - "name": "stdout", + "name": "stderr", "output_type": "stream", "text": [ - "[07:31:00] WARNING: ../src/learner.cc:573: \n", - "Parameters: { \"silent\" } might not be used.\n", - "\n", - " This may not be accurate due to some parameters are only used in language bindings but\n", - " passed down to XGBoost core. Or some parameters are not used but slip through this\n", - " verification. Please open an issue if you find above cases.\n", - "\n", + "/home/ramonpzg/micromamba/envs/mlserver-quick/lib/python3.11/site-packages/xgboost/core.py:158: UserWarning: [18:32:52] WARNING: /workspace/src/learner.cc:740: \n", + "Parameters: { \"silent\" } are not used.\n", "\n", - "[07:31:00] WARNING: ../src/learner.cc:1095: Starting in XGBoost 1.3.0, the default evaluation metric used with the objective 'multi:softmax' was changed from 'merror' to 'mlogloss'. Explicitly set eval_metric if you'd like to restore the old behavior.\n" + " warnings.warn(smsg, UserWarning)\n" ] } ], "source": [ - "import os\n", - "\n", - "import xgboost as xgb\n", - "from sklearn.datasets import load_iris\n", - "\n", - "model_dir = \".\"\n", - "BST_FILE = \"model.bst\"\n", "\n", - "iris = load_iris()\n", - "y = iris[\"target\"]\n", - "X = iris[\"data\"]\n", "dtrain = xgb.DMatrix(X, label=y)\n", "param = {\n", " \"max_depth\": 6,\n", @@ -50,8 +68,10 @@ " \"objective\": \"multi:softmax\",\n", "}\n", "xgb_model = xgb.train(params=param, dtrain=dtrain)\n", - "model_file = os.path.join((model_dir), BST_FILE)\n", - "xgb_model.save_model(model_file)" + "model_file_json = os.path.join((model_dir), BOOSTER_FILE)\n", + "model_file_bst= os.path.join((model_dir), BOOSTER_FILE_DEPRECATED)\n", + "xgb_model.save_model(model_file_json)\n", + "xgb_model.save_model(model_file_bst)" ] }, { @@ -349,7 +369,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.14" + "version": "3.11.9" }, "varInspector": { "cols": { diff --git a/servers/xgboostserver/xgboostserver/XGBoostServer.py b/servers/xgboostserver/xgboostserver/XGBoostServer.py index 8d8ac7fa1f..933f99e094 100644 --- a/servers/xgboostserver/xgboostserver/XGBoostServer.py +++ b/servers/xgboostserver/xgboostserver/XGBoostServer.py @@ -6,10 +6,13 @@ import yaml import logging import xgboost as xgb +import json +from packaging import version logger = logging.getLogger(__name__) -BOOSTER_FILE = "model.bst" +BOOSTER_FILE = "model.json" +BOOSTER_FILE_DEPRECATED = "model.bst" class XGBoostServer(SeldonComponent): @@ -22,7 +25,27 @@ def load(self): model_file = os.path.join( seldon_core.Storage.download(self.model_uri), BOOSTER_FILE ) - self._booster = xgb.Booster(model_file=model_file) + if not os.path.exists(model_file): + # Fallback to deprecated .bst format + model_file = os.path.join( + seldon_core.Storage.download(self.model_uri), BOOSTER_FILE_DEPRECATED + ) + if os.path.exists(model_file): + logger.warning( + "Using deprecated .bst format for XGBoost model. " + "Please update to the .json format in the future." + ) + else: + raise FileNotFoundError(f"Model file not found: {BOOSTER_FILE} or {BOOSTER_FILE_DEPRECATED}") + + if version.parse(xgb.__version__) < version.parse("1.7.0"): + # Load model using deprecated method for older XGBoost versions + self._booster = xgb.Booster(model_file=model_file) + else: + # Load model using the new .json format for XGBoost >= 1.7.0 + self._booster = xgb.Booster() + self._booster.load_model(model_file) + self.ready = True def predict( @@ -39,12 +62,14 @@ def init_metadata(self): try: with open(file_path, "r") as f: - return yaml.safe_load(f.read()) + metadata = yaml.safe_load(f.read()) + # Validate and sanitize the loaded metadata if needed + return metadata except FileNotFoundError: - logger.debug(f"metadata file {file_path} does not exist") + logger.debug(f"Metadata file {file_path} does not exist") return {} except yaml.YAMLError: logger.error( - f"metadata file {file_path} present but does not contain valid yaml" + f"Metadata file {file_path} present but does not contain valid YAML" ) - return {} + return {} \ No newline at end of file diff --git a/servers/xgboostserver/xgboostserver/XGBoostServer2.py b/servers/xgboostserver/xgboostserver/XGBoostServer2.py deleted file mode 100644 index 933f99e094..0000000000 --- a/servers/xgboostserver/xgboostserver/XGBoostServer2.py +++ /dev/null @@ -1,75 +0,0 @@ -import numpy as np -import seldon_core -from seldon_core.user_model import SeldonComponent -from typing import Dict, List, Union, Iterable -import os -import yaml -import logging -import xgboost as xgb -import json -from packaging import version - -logger = logging.getLogger(__name__) - -BOOSTER_FILE = "model.json" -BOOSTER_FILE_DEPRECATED = "model.bst" - - -class XGBoostServer(SeldonComponent): - def __init__(self, model_uri: str): - super().__init__() - self.model_uri = model_uri - self.ready = False - - def load(self): - model_file = os.path.join( - seldon_core.Storage.download(self.model_uri), BOOSTER_FILE - ) - if not os.path.exists(model_file): - # Fallback to deprecated .bst format - model_file = os.path.join( - seldon_core.Storage.download(self.model_uri), BOOSTER_FILE_DEPRECATED - ) - if os.path.exists(model_file): - logger.warning( - "Using deprecated .bst format for XGBoost model. " - "Please update to the .json format in the future." - ) - else: - raise FileNotFoundError(f"Model file not found: {BOOSTER_FILE} or {BOOSTER_FILE_DEPRECATED}") - - if version.parse(xgb.__version__) < version.parse("1.7.0"): - # Load model using deprecated method for older XGBoost versions - self._booster = xgb.Booster(model_file=model_file) - else: - # Load model using the new .json format for XGBoost >= 1.7.0 - self._booster = xgb.Booster() - self._booster.load_model(model_file) - - self.ready = True - - def predict( - self, X: np.ndarray, names: Iterable[str], meta: Dict = None - ) -> Union[np.ndarray, List, str, bytes]: - if not self.ready: - self.load() - dmatrix = xgb.DMatrix(X) - result: np.ndarray = self._booster.predict(dmatrix) - return result - - def init_metadata(self): - file_path = os.path.join(self.model_uri, "metadata.yaml") - - try: - with open(file_path, "r") as f: - metadata = yaml.safe_load(f.read()) - # Validate and sanitize the loaded metadata if needed - return metadata - except FileNotFoundError: - logger.debug(f"Metadata file {file_path} does not exist") - return {} - except yaml.YAMLError: - logger.error( - f"Metadata file {file_path} present but does not contain valid YAML" - ) - return {} \ No newline at end of file diff --git a/servers/xgboostserver/xgboostserver/model.json b/servers/xgboostserver/xgboostserver/model.json new file mode 100644 index 0000000000..92bbe2b0c2 --- /dev/null +++ b/servers/xgboostserver/xgboostserver/model.json @@ -0,0 +1 @@ +{"learner":{"attributes":{},"feature_names":[],"feature_types":[],"gradient_booster":{"model":{"gbtree_model_param":{"num_parallel_tree":"1","num_trees":"100"},"iteration_indptr":[0,10,20,30,40,50,60,70,80,90,100],"tree_info":[0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9],"trees":[{"base_weights":[1.25E0,4.5000002E-1,-5.2631583E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":0,"left_children":[1,-1,-1],"loss_changes":[1.6401314E2,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,4.5000002E-1,-5.2631583E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[2.6999998E1,9E0,1.8E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[1.25E0,-5E-2,2.1052632E0,4.0671644E0,-3.8793105E-1,4.3775937E-1,6.7307696E-2,1.9230768E-2,-4.878049E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":1,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[4.2960518E1,0E0,9.451438E1,8.348404E0,6.3159084E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-5E-2,1.8E0,5E0,5E0,4.3775937E-1,6.7307696E-2,1.9230768E-2,-4.878049E-2],"split_indices":[2,0,3,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[2.6999998E1,9E0,1.8E1,9.719999E0,8.28E0,8.639999E0,1.0799999E0,1.0799999E0,7.2E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[1.25E0,-3.2024795E-1,4.273859E-1,-5.2486192E-2,1.460177E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0],"id":2,"left_children":[1,3,-1,-1,-1],"loss_changes":[1.3431853E2,7.819235E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1],"right_children":[2,4,-1,-1,-1],"split_conditions":[1.7E0,4.9E0,4.273859E-1,-5.2486192E-2,1.460177E-1],"split_indices":[3,2,0,0,0],"split_type":[0,0,0,0,0],"sum_hessian":[2.6999998E1,1.8359999E1,8.639999E0,1.7099998E1,1.26E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"5","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":3,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":4,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":5,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":6,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":7,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":8,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.357143E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":9,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3571433E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.6999998E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[1.0530329E0,2.9928362E-1,-5.21405E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":10,"left_children":[1,-1,-1],"loss_changes":[9.675807E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,2.9928362E-1,-5.21405E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.0170427E1,1.3113234E1,1.7057194E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[1.0580544E0,-4.940408E-2,1.6666938E0,2.8028016E0,-3.789836E-1,2.943885E-1,6.25111E-2,1.901586E-2,-4.8189368E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":11,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[3.0192371E1,0E0,5.349557E1,2.6528091E0,6.150526E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-4.940408E-2,1.8E0,5E0,5E0,2.943885E-1,6.25111E-2,1.901586E-2,-4.8189368E-2],"split_indices":[2,0,3,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.0089243E1,8.5286255E0,2.1560617E1,1.3624095E1,7.9365225E0,1.2464719E1,1.1593757E0,1.0854807E0,6.851042E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[1.0635515E0,-4.624213E-1,2.7789037E0,-5.158223E-2,-2.8775844E-3,1.0260737E-1,2.953345E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0],"id":12,"left_children":[1,3,5,-1,-1,-1,-1],"loss_changes":[8.240886E1,3.8481712E-1,1.4745712E0,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2],"right_children":[2,4,6,-1,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,1.8E0,-5.158223E-2,-2.8775844E-3,1.0260737E-1,2.953345E-1],"split_indices":[2,3,3,0,0,0,0],"split_type":[0,0,0,0,0,0,0],"sum_hessian":[2.999191E1,1.6258667E1,1.3733244E1,1.43073015E1,1.9513648E0,1.8659308E0,1.1867313E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"7","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":13,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":14,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":15,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":16,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":17,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":18,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.3107685E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":19,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.3107686E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.5544205E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[9.1688216E-1,2.2754784E-1,-5.1663794E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":20,"left_children":[1,-1,-1],"loss_changes":[6.656246E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,2.2754784E-1,-5.1663794E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.2573483E1,1.6422234E1,1.615125E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[9.2301434E-1,-4.8820086E-2,1.3909082E0,2.1626403E0,-3.6976656E-1,2.2470978E-1,5.763944E-2,1.8870944E-2,-4.7591884E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":21,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[2.279093E1,0E0,3.5324833E1,1.0910568E0,5.994842E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-4.8820086E-2,1.8E0,5E0,5E0,2.2470978E-1,5.763944E-2,1.8870944E-2,-4.7591884E-2],"split_indices":[2,0,3,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.2487694E1,8.078556E0,2.440914E1,1.6811907E1,7.5972323E0,1.5566478E1,1.2454284E0,1.0891895E0,6.508043E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[9.2978615E-1,-4.551479E-1,2.1511948E0,-5.107355E-2,-2.3093836E-3,6.053595E-2,2.2205643E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0],"id":22,"left_children":[1,3,5,-1,-1,-1,-1],"loss_changes":[5.7407608E1,3.834796E-1,5.752945E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2],"right_children":[2,4,6,-1,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,4.9E0,-5.107355E-2,-2.3093836E-3,6.053595E-2,2.2205643E-1],"split_indices":[2,3,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0],"sum_hessian":[3.2358643E1,1.5458207E1,1.6900434E1,1.3534734E1,1.9234735E0,1.1435734E0,1.5756862E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"7","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":23,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":24,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":25,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":26,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":27,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":28,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2662426E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":29,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.266243E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.4149118E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[8.155754E-1,1.8502249E-1,-5.1191427E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":30,"left_children":[1,-1,-1],"loss_changes":[4.950379E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.8502249E-1,-5.1191427E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.435283E1,1.908452E1,1.5268309E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[8.219357E-1,-4.8234582E-2,1.1996063E0,1.7755054E0,-3.6105525E-1,1.8311796E-1,5.4449648E-2,1.8043518E-2,-4.6997346E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":31,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[1.7970413E1,0E0,2.55066E1,3.9951324E-1,5.736215E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-4.8234582E-2,1.8E0,5E0,5E0,1.8311796E-1,5.4449648E-2,1.8043518E-2,-4.6997346E-2],"split_indices":[2,0,3,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.4306915E1,7.6411433E0,2.6665773E1,1.9377592E1,7.288181E0,1.8072687E1,1.3049045E0,1.1105304E0,6.1776505E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[8.265303E-1,-4.47738E-1,1.7579228E0,-5.0568778E-2,-1.7067677E-3,7.5345355E-1,1.8493168E-1,9.963217E-3,1.1072838E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":32,"left_children":[1,3,5,-1,-1,7,-1,-1,-1],"loss_changes":[4.2612106E1,3.8265276E-1,4.9429703E-1,0E0,0E0,6.7680335E-1,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2,5,5],"right_children":[2,4,6,-1,-1,8,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,1.8E0,-5.0568778E-2,-1.7067677E-3,5.1E0,1.8493168E-1,9.963217E-3,1.1072838E-1],"split_indices":[2,3,3,0,0,2,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.424054E1,1.4678156E1,1.9562382E1,1.2783814E1,1.8943418E0,2.4024303E0,1.7159952E1,1.2936167E0,1.1088138E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":33,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":34,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":35,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":36,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":37,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":38,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.2225983E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":39,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.2225985E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.2792286E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[7.3675674E-1,1.5681933E-1,-5.072493E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":40,"left_children":[1,-1,-1],"loss_changes":[3.864136E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.5681933E-1,-5.072493E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.559041E1,2.1176447E1,1.4413962E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[7.422175E-1,-4.7642674E-2,1.0572474E0,1.5094881E0,-3.5135219E-1,1.5516688E0,5.0373413E-2,1.883494E-2,-4.655312E-2,1.5917678E-1,5.0308313E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0,0,0],"id":41,"left_children":[1,-1,3,5,7,9,-1,-1,-1,-1,-1],"loss_changes":[1.4568802E1,0E0,1.9272755E1,1.7120743E-1,5.7829404E-1,8.536911E-2,0E0,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4,5,5],"right_children":[2,-1,4,6,8,10,-1,-1,-1,-1,-1],"split_conditions":[3E0,-4.7642674E-2,1.8E0,5E0,6E0,1.6E0,5.0373413E-2,1.883494E-2,-4.655312E-2,1.5917678E-1,5.0308313E-2],"split_indices":[2,0,3,2,0,3,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0,0,0],"sum_hessian":[3.5636513E1,7.2148128E0,2.8421701E1,2.1460148E1,6.9615536E0,2.0075407E1,1.3847404E0,1.102178E0,5.859376E0,1.8837046E1,1.2383621E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"11","size_leaf_vector":"1"}},{"base_weights":[7.4828994E-1,-4.401219E-1,1.4983398E0,-5.0063718E-2,-1.0596345E-3,7.2750336E-1,1.5820305E-1,8.8875726E-2,1.5096664E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":42,"left_children":[1,3,5,-1,-1,7,-1,-1,-1],"loss_changes":[3.3239914E1,3.8239646E-1,3.0931473E-1,0E0,0E0,2.4404454E-1,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2,5,5],"right_children":[2,4,6,-1,-1,8,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,5E0,-5.0063718E-2,-1.0596345E-3,6.3E0,1.5820305E-1,8.8875726E-2,1.5096664E-2],"split_indices":[2,3,2,0,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.555108E1,1.3915677E1,2.16354E1,1.2052112E1,1.8635653E0,3.0682197E0,1.8567183E1,1.9744365E0,1.093783E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":43,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":44,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":45,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":46,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":47,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":48,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.179808E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":49,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1798083E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.1477749E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[6.7367613E-1,1.3676798E-1,-5.0261106E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":50,"left_children":[1,-1,-1],"loss_changes":[3.117336E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.3676798E-1,-5.0261106E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.634432E1,2.27558E1,1.3588519E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[6.795061E-1,-4.7041804E-2,9.4964707E-1,1.32213E0,-3.4196922E-1,1.3547733E-1,4.775451E-2,1.8594038E-2,-4.5959245E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":51,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[1.2091707E1,0E0,1.5215765E1,1.537323E-2,5.613049E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-4.7041804E-2,1.8E0,5E0,6E0,1.3547733E-1,4.775451E-2,1.8594038E-2,-4.5959245E-2],"split_indices":[2,0,3,2,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.648686E1,6.79991E0,2.9686947E1,2.3023647E1,6.663301E0,2.15853E1,1.4383459E0,1.1082964E0,5.5550046E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[6.84182E-1,-4.324239E-1,1.3080411E0,-4.9552083E-2,-7.057631E-4,6.097376E-1,1.3686371E-1,6.573548E-3,8.983444E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":52,"left_children":[1,3,5,-1,-1,7,-1,-1,-1],"loss_changes":[2.6664795E1,3.7711358E-1,1.9309998E-1,0E0,0E0,5.285373E-1,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2,5,5],"right_children":[2,4,6,-1,-1,8,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,1.8E0,-4.9552083E-2,-7.057631E-4,5.1E0,1.3686371E-1,6.573548E-3,8.983444E-2],"split_indices":[2,3,3,0,0,2,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.6466244E1,1.3181095E1,2.3285149E1,1.1334812E1,1.8462833E0,2.7425497E0,2.0542599E1,1.3762292E0,1.3663204E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":53,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":54,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":55,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":56,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":57,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":58,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.1376057E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":59,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.1376056E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[2.020617E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[6.224132E-1,1.2181747E-1,-4.97945E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":60,"left_children":[1,-1,-1],"loss_changes":[2.5742424E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.2181747E-1,-4.97945E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.6658592E1,2.3875336E1,1.2783255E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[6.2690043E-1,-4.6430256E-2,8.627765E-1,1.1767662E0,-3.3149803E-1,1.20862104E-1,2.0502571E-2,1.9715728E-2,-4.5267604E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":61,"left_children":[1,-1,3,5,7,-1,-1,-1,-1],"loss_changes":[1.0171363E1,0E0,1.2226191E1,5.3265E-1,5.601728E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4],"right_children":[2,-1,4,6,8,-1,-1,-1,-1],"split_conditions":[3E0,-4.6430256E-2,1.8E0,5.1E0,5E0,1.20862104E-1,2.0502571E-2,1.9715728E-2,-4.5267604E-2],"split_indices":[2,0,3,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.696115E1,6.3973775E0,3.0563772E1,2.421263E1,6.351142E0,2.320807E1,1.004559E0,1.0674114E0,5.2837305E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[6.322218E-1,-4.2431915E-1,1.1651763E0,-4.90401E-2,-3.3909707E-6,3.695452E-2,1.19950555E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0],"id":62,"left_children":[1,3,5,-1,-1,-1,-1],"loss_changes":[2.1864801E1,3.7732196E-1,2.5305557E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2],"right_children":[2,4,6,-1,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,4.9E0,-4.90401E-2,-3.3909707E-6,3.695452E-2,1.19950555E-1],"split_indices":[2,3,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0],"sum_hessian":[3.6952133E1,1.2458318E1,2.4493814E1,1.0644606E1,1.8137118E0,1.4997494E0,2.2994064E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"7","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":63,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":64,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":65,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":66,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":67,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":68,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.095637E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":69,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.095637E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.896981E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[5.800554E-1,1.1027656E-1,-4.9322795E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":70,"left_children":[1,-1,-1],"loss_changes":[2.1631315E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.1027656E-1,-4.9322795E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.6587868E1,2.4586357E1,1.200151E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[5.832055E-1,-4.5806643E-2,7.925687E-1,1.0646194E0,-3.2146114E-1,1.0919911E0,1.9850964E-2,1.9979585E-2,-4.4797182E-2,4.5303937E-2,1.126122E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0,0,0],"id":71,"left_children":[1,-1,3,5,7,9,-1,-1,-1,-1,-1],"loss_changes":[8.664342E0,0E0,1.0061874E1,3.997879E-1,5.5524516E-1,3.4780502E-2,0E0,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4,5,5],"right_children":[2,-1,4,6,8,10,-1,-1,-1,-1,-1],"split_conditions":[3E0,-4.5806643E-2,1.8E0,5.1E0,6E0,5.1E0,1.9850964E-2,1.9979585E-2,-4.4797182E-2,4.5303937E-2,1.126122E-1],"split_indices":[2,0,3,2,0,0,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0,0,0],"sum_hessian":[3.7078632E1,6.0083046E0,3.1070326E1,2.5007694E1,6.062631E0,2.398878E1,1.0189158E0,1.0709124E0,4.991719E0,1.9402218E0,2.2048557E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"11","size_leaf_vector":"1"}},{"base_weights":[5.870637E-1,-4.159111E-1,1.0494994E0,5.9858523E-4,-4.8660018E-2,4.9261746E-1,1.1010305E-1,2.9462182E-3,7.452645E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0],"id":72,"left_children":[1,3,5,-1,-1,7,-1,-1,-1],"loss_changes":[1.8134365E1,3.8338375E-1,2.1520805E-1,0E0,0E0,4.5144945E-1,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2,5,5],"right_children":[2,4,6,-1,-1,8,-1,-1,-1],"split_conditions":[4.8E0,2.6E0,1.8E0,5.9858523E-4,-4.8660018E-2,5.1E0,1.1010305E-1,2.9462182E-3,7.452645E-2],"split_indices":[2,1,3,0,0,2,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0],"sum_hessian":[3.715747E1,1.1757431E1,2.540004E1,1.8186158E0,9.938816E0,3.045698E0,2.2354342E1,1.4691148E0,1.576583E0],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"9","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":73,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":74,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":75,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":76,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":77,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":78,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0537115E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":79,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0537117E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.7773071E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[5.442863E-1,1.01133876E-1,-4.88531E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":80,"left_children":[1,-1,-1],"loss_changes":[1.8436737E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,1.01133876E-1,-4.88531E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.6196148E1,2.4939157E1,1.12569895E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[5.464315E-1,-4.5169238E-2,7.347574E-1,9.7395986E-1,-3.1024265E-1,9.9858177E-1,1.8921383E-2,2.040126E-2,-4.403667E-2,4.20113E-2,1.0290902E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0,0,0],"id":81,"left_children":[1,-1,3,5,7,9,-1,-1,-1,-1,-1],"loss_changes":[7.4539967E0,0E0,8.364998E0,3.2287598E-1,5.4263604E-1,1.6801834E-2,0E0,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4,5,5],"right_children":[2,-1,4,6,8,10,-1,-1,-1,-1,-1],"split_conditions":[3E0,-4.5169238E-2,1.8E0,5.1E0,5E0,5.1E0,1.8921383E-2,2.040126E-2,-4.403667E-2,4.20113E-2,1.0290902E-1],"split_indices":[2,0,3,2,2,0,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0,0,0],"sum_hessian":[3.68891E1,5.6334505E0,3.125565E1,2.5489122E1,5.7665267E0,2.4449512E1,1.0396097E0,1.0498095E0,4.7167172E0,1.96483E0,2.2484682E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"11","size_leaf_vector":"1"}},{"base_weights":[5.5023783E-1,-4.0724576E-1,9.6008974E-1,-4.805208E-2,2.7064322E-3,2.955181E-2,9.902268E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0],"id":82,"left_children":[1,3,5,-1,-1,-1,-1],"loss_changes":[1.5302009E1,3.9780784E-1,2.4623871E-1,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2],"right_children":[2,4,6,-1,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,4.9E0,-4.805208E-2,2.7064322E-3,2.955181E-2,9.902268E-2],"split_indices":[2,3,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0],"sum_hessian":[3.6996967E1,1.1091561E1,2.5905407E1,9.399342E0,1.692219E0,1.5925621E0,2.4312845E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"7","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":83,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":84,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":85,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":86,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":87,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":88,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-5.0121933E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":89,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-5.0121933E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.6630297E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[5.138694E-1,9.372836E-2,-4.8378326E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0],"id":90,"left_children":[1,-1,-1],"loss_changes":[1.5882741E1,0E0,0E0],"parents":[2147483647,0,0],"right_children":[2,-1,-1],"split_conditions":[3E0,9.372836E-2,-4.8378326E-2],"split_indices":[2,0,0],"split_type":[0,0,0],"sum_hessian":[3.5525948E1,2.498329E1,1.0542658E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"3","size_leaf_vector":"1"}},{"base_weights":[5.1563305E-1,-4.4517893E-2,6.8707687E-1,9.0173537E-1,-2.9958895E-1,9.23956E-1,1.8441962E-2,2.14411E-2,-4.3596316E-2,3.8829423E-2,9.524548E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0,0,0],"id":91,"left_children":[1,-1,3,5,7,9,-1,-1,-1,-1,-1],"loss_changes":[6.4714203E0,0E0,7.080453E0,2.5452423E-1,5.4883707E-1,2.109909E-2,0E0,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,2,2,3,3,4,4,5,5],"right_children":[2,-1,4,6,8,10,-1,-1,-1,-1,-1],"split_conditions":[3E0,-4.4517893E-2,1.8E0,5.1E0,6E0,5.1E0,1.8441962E-2,2.14411E-2,-4.3596316E-2,3.8829423E-2,9.524548E-2],"split_indices":[2,0,3,2,0,0,0,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0,0,0],"sum_hessian":[3.642927E1,5.274285E0,3.1154985E1,2.5658758E1,5.4962277E0,2.460838E1,1.0503787E0,1.0324935E0,4.4637346E0,1.9818867E0,2.2626493E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"11","size_leaf_vector":"1"}},{"base_weights":[5.1718664E-1,-3.9833513E-1,8.836423E-1,-4.7523998E-2,3.3983071E-3,4.0598193E-1,9.319247E-1,5.935588E-4,6.263664E-2,3.3714943E-2,9.5479615E-2],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0,0,0,0,0,0,0,0,0,0,0],"id":92,"left_children":[1,3,5,-1,-1,7,9,-1,-1,-1,-1],"loss_changes":[1.2979768E1,3.9678013E-1,2.4873734E-1,0E0,0E0,3.7256956E-1,3.5152435E-3,0E0,0E0,0E0,0E0],"parents":[2147483647,0,0,1,1,2,2,5,5,6,6],"right_children":[2,4,6,-1,-1,8,10,-1,-1,-1,-1],"split_conditions":[4.8E0,1.5E0,1.8E0,-4.7523998E-2,3.3983071E-3,5.1E0,4.9E0,5.935588E-4,6.263664E-2,3.3714943E-2,9.5479615E-2],"split_indices":[2,3,3,0,0,2,2,0,0,0,0],"split_type":[0,0,0,0,0,0,0,0,0,0,0],"sum_hessian":[3.66389E1,1.0448432E1,2.619047E1,8.7861805E0,1.6622512E0,3.2680392E0,2.292243E1,1.5256258E0,1.7424135E0,1.4317081E0,2.1490723E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"11","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":93,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":94,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":95,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":96,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":97,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":98,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}},{"base_weights":[-4.9706298E-1],"categories":[],"categories_nodes":[],"categories_segments":[],"categories_sizes":[],"default_left":[0],"id":99,"left_children":[-1],"loss_changes":[0E0],"parents":[2147483647],"right_children":[-1],"split_conditions":[-4.97063E-2],"split_indices":[0],"split_type":[0],"sum_hessian":[1.5535896E1],"tree_param":{"num_deleted":"0","num_feature":"4","num_nodes":"1","size_leaf_vector":"1"}}]},"name":"gbtree"},"learner_model_param":{"base_score":"5E-1","boost_from_average":"1","num_class":"10","num_feature":"4","num_target":"1"},"objective":{"name":"multi:softmax","softmax_multiclass_param":{"num_class":"10"}}},"version":[2,1,1]} \ No newline at end of file diff --git a/servers/xgboostserver/xgboostserver/requirements.txt b/servers/xgboostserver/xgboostserver/requirements.txt index 3ed709c3db..f146401e2c 100644 --- a/servers/xgboostserver/xgboostserver/requirements.txt +++ b/servers/xgboostserver/xgboostserver/requirements.txt @@ -1,3 +1,3 @@ -scikit-learn == 1.0.2 +scikit-learn >= 1.0.2, <=1.5.0 numpy >= 1.8.2 -xgboost == 1.4.2 +xgboost >= 1.7.0, <=2.2.0 diff --git a/wrappers/s2i/python/build_scripts/build_all.sh b/wrappers/s2i/python/build_scripts/build_all.sh old mode 100755 new mode 100644 index cb97125679..f840abfec5 --- a/wrappers/s2i/python/build_scripts/build_all.sh +++ b/wrappers/s2i/python/build_scripts/build_all.sh @@ -2,10 +2,10 @@ make -C ../ docker-build-conda-base # Build standard wrapper images -make -C ../ docker-build PYTHON_VERSION=3.8.10 +make -C ../ docker-build PYTHON_VERSION=3.10.15 # Push default tag image -make -C ../ docker-tag-base-python PYTHON_VERSION=3.8.10 +make -C ../ docker-tag-base-python PYTHON_VERSION=3.10.15 # Build GPU images -make -C ../ docker-build-gpu PYTHON_VERSION=3.8.10 +make -C ../ docker-build-gpu PYTHON_VERSION=3.10.15 diff --git a/wrappers/s2i/python/build_scripts/push_all.sh b/wrappers/s2i/python/build_scripts/push_all.sh old mode 100755 new mode 100644 index 3b96fc2ffc..abfabce9e9 --- a/wrappers/s2i/python/build_scripts/push_all.sh +++ b/wrappers/s2i/python/build_scripts/push_all.sh @@ -2,10 +2,10 @@ make -C ../ docker-push-conda-base # Push standard wrapper images -make -C ../ push_to_dockerhub PYTHON_VERSION=3.8.10 +make -C ../ push_to_dockerhub PYTHON_VERSION=3.10.15 # Push default tag image -make -C ../ docker-push-base-python PYTHON_VERSION=3.8.10 +make -C ../ docker-push-base-python PYTHON_VERSION=3.10.15 # Push GPU images -make -C ../ docker-push-gpu PYTHON_VERSION=3.8.10 +make -C ../ docker-push-gpu PYTHON_VERSION=3.10.15 From bc2a2af70307a8788b47ea9367d51ea12f61c7f7 Mon Sep 17 00:00:00 2001 From: Ramon Perez Date: Thu, 3 Oct 2024 11:12:43 +0000 Subject: [PATCH 3/3] updated python versions to 3.10 --- .github/workflows/images.yml | 6 +++--- python-builder/Dockerfile | 2 +- wrappers/s2i/python/Makefile | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index 0eea4f6c05..57f263418c 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -130,9 +130,9 @@ jobs: env: VERSION: ${{ steps.docker-tag.outputs.value }} run: | - make docker-build docker-push PYTHON_VERSION=3.8.10 - make docker-tag-base-python docker-push-base-python PYTHON_VERSION=3.8.10 - docker save -o /tmp/base-wrapper.tar seldonio/seldon-core-s2i-python38:${VERSION} + make docker-build docker-push PYTHON_VERSION=3.10.15 + make docker-tag-base-python docker-push-base-python PYTHON_VERSION=3.10.15 + docker save -o /tmp/base-wrapper.tar seldonio/seldon-core-s2i-python310:${VERSION} - name: Upload artifact uses: actions/upload-artifact@v3 diff --git a/python-builder/Dockerfile b/python-builder/Dockerfile index 2f879145d6..c8f9be3fcb 100644 --- a/python-builder/Dockerfile +++ b/python-builder/Dockerfile @@ -33,7 +33,7 @@ RUN apt-get upgrade -y && \ # This is to install desired version of Python without updating conda version -ENV PYTHON_VERSION "3.7.10" +ENV PYTHON_VERSION "3.10.15" ENV CONDA_VERSION "4.7.12" RUN conda install --yes -c conda-forge python=$PYTHON_VERSION conda=$CONDA_VERSION diff --git a/wrappers/s2i/python/Makefile b/wrappers/s2i/python/Makefile index eb45d58ce4..b5c4362301 100644 --- a/wrappers/s2i/python/Makefile +++ b/wrappers/s2i/python/Makefile @@ -3,9 +3,9 @@ VERSION ?= $(shell cat ../../../version.txt) DOCKER_REGISTRY ?= seldonio -CONDA_DOWNLOAD_VERSION ?= py38_23.3.1-0 +CONDA_DOWNLOAD_VERSION ?= py310 CONDA_VERSION ?= 23.5.0 -PYTHON_VERSION ?= 3.8.10 +PYTHON_VERSION ?= 3.10.15 IMAGE_PYTHON_VERSION = $(shell echo -n $(PYTHON_VERSION) | cut -d. -f1-2 | sed 's/\.//g') DEFAULT_IMAGE_PYTHON_VERSION = $(shell echo -n $(PYTHON_VERSION) | cut -d. -f1)