gpt4 book ai didi

python - 使用python将xgboost模型保存到hdfs

转载 作者:行者123 更新时间:2023-12-02 22:02:37 26 4
gpt4 key购买 nike

我需要使用python将XGBoost模型保存到hdfs。我试图用xgbm.save_model(path_to_hdfs)做到这一点
但出现以下错误:src/io.cc:37: Please compile with DMLC_USE_HDFS=1 to use hdfs
所以我的问题是如何处理这个错误?也许还有其他方法可以使用python脚本将XGBoost模型存储到hdfs?

最佳答案

如错误所述,您需要使用HDFS支持编译xgboost。

为此,您需要执行以下操作:

git clone --recursive https://github.com/dmlc/xgboost.git
cd xgboost
mkdir build
cmake -DDMLC_USE_HDFS=1 ..
make

安装 Python package,然后重试。

关于python - 使用python将xgboost模型保存到hdfs,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53225794/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com