I am running into an issue using the xgboost classifer from adversarial robustness toolbox (ART).
AttributeError: partially initialized module 'xgboost' has no attribute 'DMatrix' (most likely due to a circular import)
Steps:
- clone the ART repo.
- cd into the examples dir.
- run the xgboost example
Expected behavior: The program should print out the accuracy for the classification of the MNIST Model.
Actual
Traceback (most recent call last):
File "/Users/evangertis/development/PythonAutomation/ART_examples/xgboost.py", line 7, in <module>
import xgboost as xgb
File "/Users/evangertis/development/PythonAutomation/ART_examples/xgboost.py", line 31, in <module>
dtrain = xgb.DMatrix(x_train, label=np.argmax(y_train, axis=1))
AttributeError: partially initialized module 'xgboost' has no attribute 'DMatrix' (most likely due to a circular import)
Screenshots
System information (please complete the following information):
- MacOS
- Python 3.9
- Latest commit 3ff566f
- XGBoost: 1.5.2
I am using this example: https://github.com/Trusted-AI/adversarial-robustness-toolbox/blob/main/examples/get_started_scikit_learn.py