【平台使用】M.stockranker_gbdt.v1 使用报错,有这个函数的使用的example吗?
由csowen创建,最终由small_q 被浏览 21 用户
XGBoostError Traceback (most recent call last)
Cell In[1], line 308
303 m14 = M.dropnan.v1(
304 input_data=m18.data
305 )
307 # @module(position="725,714", comment='', comment_collapsed=True)
--> 308 m4 = M.stock_ranker_train_gbdt.v1(
309 training_ds=m13.data,
310 features=m3.data,##feteature
311 learning_algorithm='排序',
312 number_of_leaves=30,
313 minimum_docs_per_leaf=1000,
314 number_of_trees=20,
315 learning_rate=0.1,
316 max_bins=1023,
317 m_lazy_run=False
318 )
320 # @module(position="632,914", comment='', comment_collapsed=True)
321 m19 = M.trade.v4(
322 instruments=m9.data,
323 options_data=m4.predictions,
(...)
339 benchmark='000300.SHA'
340 )
File module2/common/modulemanagerv2.py:88, in biglearning.module2.common.modulemanagerv2.BigQuantModuleVersion.call()
File module2/common/moduleinvoker.py:370, in biglearning.module2.common.moduleinvoker.module_invoke()
File module2/common/moduleinvoker.py:292, in biglearning.module2.common.moduleinvoker._invoke_with_cache()
File module2/common/moduleinvoker.py:253, in biglearning.module2.common.moduleinvoker._invoke_with_cache()
File module2/common/moduleinvoker.py:212, in biglearning.module2.common.moduleinvoker._module_run()
File module2/modules/stock_ranker_train_gbdt/v1/init.py:105, in biglearning.module2.modules.stock_ranker_train_gbdt.v1.init.BigQuantModule.run.lambda()
File /var/app/enabled/bigdatasource/api/v6/init.py:164, in on_temp_path(self, func)
File /var/app/enabled/bigdatasource/impl/dsimpl/temppath.py:39, in on_temp_path(id, version, writable, func)
File module2/modules/stock_ranker_train_gbdt/v1/init.py:105, in biglearning.module2.modules.stock_ranker_train_gbdt.v1.init.BigQuantModule.run.lambda()
File /usr/local/python3/lib/python3.8/site-packages/xgboost/core.py:395, in DMatrix.init(self, data, label, missing, weight, silent, feature_names, feature_types, nthread)
393 if isinstance(data, STRING_TYPES):
394 handle = ctypes.c_void_p()
--> 395 _check_call(_LIB.XGDMatrixCreateFromFile(c_str(data),
396 ctypes.c_int(silent),
397 ctypes.byref(handle)))
398 self.handle = handle
399 elif isinstance(data, scipy.sparse.csr_matrix):
File /usr/local/python3/lib/python3.8/site-packages/xgboost/core.py:176, in _check_call(ret)
165 """Check the return value of C API call
166
167 This function will raise exception when error occurs.
(...)
173 return value from API calls
174 """
175 if ret != 0:
--> 176 raise XGBoostError(py_str(_LIB.XGBGetLastError()))
XGBoostError: [15:20:50] /workspace/dmlc-core/src/io/input_split_base.cc:173: Check failed: files_.size() != 0U (0 vs. 0) : Cannot find any files that matches the URI pattern /tmp/bq_ds_656a8bd514c14e27a900f1c375424406T
Stack trace:
[bt] (0) /usr/local/python3/xgboost/libxgboost.so(dmlc::LogMessageFatal::~LogMessageFatal()+0x24) [0x7f6c5806acb4]
[bt] (1) /usr/local/python3/xgboost/libxgboost.so(dmlc::io::InputSplitBase::InitInputFileInfo(std::string const&, bool)+0x68c) [0x7f6c58306a1c]
[bt] (2) /usr/local/python3/xgboost/libxgboost.so(dmlc::io::InputSplitBase::Init(dmlc::io::FileSystem*, char const*, unsigned long, bool)+0x43) [0x7f6c58306be3]
[bt] (3) /usr/local/python3/xgboost/libxgboost.so(dmlc::InputSplit::Create(char const*, char const*, unsigned int, unsigned int, char const*, bool, int, unsigned long, bool)+0xb7a) [0x7f6c582ef18a]
[bt] (4) /usr/local/python3/xgboost/libxgboost.so(dmlc::InputSplit::Create(char const*, unsigned int, unsigned int, char const*)+0x1e) [0x7f6c582ef81e]
[bt] (5) /usr/local/python3/xgboost/libxgboost.so(dmlc::Parser* dmlc::data::CreateLibSVMParser(std::string const&, std::map, std::allocator > > const&, unsigned int, unsigned int)+0x1a) [0x7f6c582cd09a]
[bt] (6) /usr/local/python3/xgboost/libxgboost.so(dmlc::Parser* dmlc::data::CreateParser_(char const*, unsigned int, unsigned int, char const*)+0x15b) [0x7f6c582be23b]
[bt] (7) /usr/local/python3/xgboost/libxgboost.so(xgboost::DMatrix::Load(std::string const&, bool, bool, std::string const&, unsigned long)+0x2df) [0x7f6c58093a0f]
[bt] (8) /usr/local/python3/xgboost/libxgboost.so(XGDMatrixCreateFromFile+0xc2) [0x7f6c580615b2]
这个版本的策略是基于xgboost开发的?