linkedin / linkedin/TE2Rules

compatibility with xgboost 2.0.3

Open
#10 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
66
Forks
10
PR merge metrics
No merged PRs in 30d

Description

Using xgboost 2.0.3, I found the following error:
(with categorical support)
model_explainer = ModelExplainer(
File "/mllab/miniconda3/envs/llm-3.9/lib/python3.9/site-packages/te2rules/explainer.py", line 110, in __init__
self.random_forest = XgboostXGBClassifierAdapter(
File "/mllab/miniconda3/envs/llm-3.9/lib/python3.9/site-packages/te2rules/adapter.py", line 254, in __init__
self.random_forest = self._convert()
File "/mllab/miniconda3/envs/llm-3.9/lib/python3.9/site-packages/te2rules/adapter.py", line 290, in _convert
node = self._build_tree(tree_dict)
File "/mllab/miniconda3/envs/llm-3.9/lib/python3.9/site-packages/te2rules/adapter.py", line 266, in _build_tree
i = int(tree_dict["split"][1:])
ValueError: invalid literal for int() with base 10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the categorical-support failure with xgboost 2.0.3, starting from te2rules/explainer.py line 110 and following the adapter construction into te2rules/adapter.py lines 254-290. Inspect _build_tree at line 266 and _convert at line 290; done means the model conversion completes without the reported ValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.