mars-project / mars-project/mars
[BUG] xgboost 1.7: ImportError: cannot import name 'rabit' from 'xgboost'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.7k
- Forks
- 325
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
A clear and concise description of what the bug is.
```python
ctx = {'d115db169882b5c06d671c887024b11f_0': (array([[0.83104541, 0.80554386, 0.3985519 , ..., 0.72182508, 0.77294997,
...f43806cf2fd20aef4b6e34fc0468be5d_0': [b'DMLC_NUM_WORKER=1', b'DMLC_TRACKER_URI=127.0.0.1', b'DMLC_TRACKER_PORT=32911']}
op = XGBTrain
@classmethod
def execute(cls, ctx, op: "XGBTrain"):
if op.merge:
return super().execute(ctx, op)
> from xgboost import train, rabit
E ImportError: cannot import name 'rabit' from 'xgboost' (/home/vsts/miniconda/envs/test/lib/python3.9/site-packages/xgboost/__init__.py)
mars/learn/contrib/xgboost/train.py:167: ImportError
```
**To Reproduce**
To help us reproducing this bug, please provide information below:
1. Your Python version
2. The version of Mars you use
3. Versions of crucial packages, such as numpy, scipy and pandas
4. Full stack of the error.
5. Minimized code to reproduce the error.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Additional context**
Add any other context about the problem here.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at mars/learn/contrib/xgboost/train.py:167 and reproduce the reported ImportError with Python 3.9 and xgboost 1.7. Inspect the XGBTrain execution path and its xgboost import assumptions. Done means the reported training path no longer raises this rabit import error.
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
- Needs clarification
- Newbie friendliness
- 35/100