mc2-project / secure-xgboost

Secure collaborative training and inference for XGBoost.
https://mc2-project.github.io/secure-xgboost/
Apache License 2.0
105 stars 32 forks source link

Landing page usage example is broken #139

Open ryanleh opened 3 years ago

ryanleh commented 3 years ago

Copying and running the code from the Usage section of the landing page gives the following error:

Azure Quote Provider: libdcap_quoteprov.so [ERROR]: Could not retrieve environment variable for 'AZDCAP_DEBUG_LOG_LEVEL'
Traceback (most recent call last):
  File "demo.py", line 21, in <module>
    dtrain = xgb.DMatrix({"user1": "demo/data/train.enc"})
  File "/usr/local/lib/python3.7/site-packages/securexgboost-0.1-py3.7.egg/securexgboost/core.py", line 570, in __init__
    c_lengths))
  File "/usr/local/lib/python3.7/site-packages/securexgboost-0.1-py3.7.egg/securexgboost/core.py", line 203, in _check_call
    raise XGBoostError(py_str(_LIB.XGBGetLastError()))
securexgboost.core.XGBoostError: [16178315] /home/ryan/secure-xgboost/enclave/dmlc-core/src/io/local_filesys.cc:111: LocalFileSystem.ListDirectory demo/data error: No such file or directory
Stack trace:
  [bt] (0) _ZN4dmlc2io15LocalFileSystem13ListDirectoryERKNS0_3URIEPNSt3__16vectorINS0_8FileInfoENS5_9allocatorIS7_EEEE
  [bt] (1) _ZN4dmlc2io14InputSplitBase13ConvertToURIsERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEE
  [bt] (2) _ZN4dmlc2io14InputSplitBase17InitInputFileInfoERKNSt3__112basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEEb
  [bt] (3) _ZN4dmlc2io14InputSplitBase4InitEPNS0_10FileSystemEPKcmb
  [bt] (4) _ZN4dmlc10InputSplit6CreateEPKcS2_jjS2_bimb
  [bt] (5) _ZN4dmlc10InputSplit6CreateEPKcjjS2_
  [bt] (6) _ZN4dmlc4data18CreateLibSVMParserIjfEEPNS_6ParserIT_fEERKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEERKNS6_3mapISC_SC_NS6_4lessISC_EENSA_INS6_4pairISD_SC_EEEEEEjjbPKc
  [bt] (7) _ZN4dmlc4data13CreateParser_IjfEEPNS_6ParserIT_T0_EEPKcjjS8_bS8_
  [bt] (8) _ZN7xgboost7DMatrix4LoadERNSt3__16vectorIKNS1_12basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEENS6_IS9_EEEEbbbPPcRS9_m

Replacing the relative paths of these lines:

dtrain = xgb.DMatrix({"user1": "demo/data/train.enc"})
dtest = xgb.DMatrix({"user1": "demo/data/test.enc"})

with their appropiate absolute paths:

dtrain = xgb.DMatrix({"user1": "/home/ryan/secure-xgboost/demo/data/train.enc"})
dtest = xgb.DMatrix({"user1": "/home/ryan/secure-xgboost/demo/data/test.enc"})

fixes the issue.