mars-project / mars

Mars is a tensor-based unified framework for large-scale data computation which scales numpy, pandas, scikit-learn and Python functions.
https://mars-project.readthedocs.io
Apache License 2.0
2.68k stars 325 forks source link

[BUG] xgboost 1.7: ImportError: cannot import name 'rabit' from 'xgboost' #3288

Open fyrestone opened 1 year ago

fyrestone commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

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 <key=d2d29ee95452257a278991ec8bb47865>

    @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.