-
Notifications
You must be signed in to change notification settings - Fork 541
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Xgboost compiles successfully but some interfaces cannot be called #122
Comments
Were you able to solve this? I'm running into the same problem. |
Missing elements of a module are a sign of the wrong module being imported. Looking at dmlc/xgboost, if that's the right repository, I see that the problematic module name is imported as I'm not super familiar with namespace packages, but from googling, this looks potentially relevant. Looking at the top-level of the repo, it also appears like maybe it's the subdirectory |
@brandjon thank you for your very prompt reply! Indeed, the |
Glad that explains it. Filed #157 for the feature request to address this in the future, closing this issue. |
I don't think #157 will solve this. I assume @brandjon if you agree, would you mind re-opening this issue? |
Right. Thanks for pointing that out. |
I've ran into this issue too. After much head-scratching, it appears to be caused by the behaviour where empty You can disable this behaviour with: This only partially fixes the problem. For xgboost 0.90 you also need |
to make sure it works. xgboost has some files and folders with similar names and adding __init__ files will break it for context bazelbuild/rules_python#122
@5201314wq it's been a long long while, but if you try the |
I have added xgboost in my bazel project with rules_python.
After I build my project, there be a xgboost directory in pypi__xgboost_0_80 of my project's runfiles.and in xgboost, i can find rabit.py, But when I call xgb.train() in my code, I get an error as follows:
File "//bazel-bin//test.runfiles/pypi__xgboost_0_80/xgboost/training.py", line 52, in _train_internal
assert(rabit.get_world_size() != 1 or version == 0)
AttributeError: 'module' object has no attribute 'get_world_size'
I have also tried other versions of xgboost and bazel 0.13.1 and 0.17.1, but it doesn't work.
when i use ‘pip install xgboost==0.80’, everything works fine.
The text was updated successfully, but these errors were encountered: