问答交流

【代码报错】TypeError: int() argument must be a string, a bytes-like object or a real number

由bq4n08z8创建,最终由small_q 被浏览 14 用户

stock_ranker_dai_train.v9 模型分析调用异常。

m5 = M.stock_ranker_dai_train.v9(
    data=m3_data,
    learning_algorithm="""排序""",
    number_of_leaves=30,
    min_docs_per_leaf=1000,
    number_of_trees=25,
    learning_rate=0.1,
    max_bins=1023,
    feature_fraction=1,
    data_row_fraction=1,
    plot_charts=True,
    ndcg_discount_base=1,
    m_name="""m5"""
)

:::warning

  • [2024-12-09 15:44:05] INFO: stock_ranker_dai_train.v9 开始运行 ..
  • [2024-12-09 15:44:05] INFO: data loaded: train=(951986, 13), validation=None
  • [2024-12-09 15:44:05] INFO: 数据预处理 ..
  • 您可以去社区论坛问答交流板块反馈咨询 去发帖>>
  • \

  • TypeError Traceback (most recent call last)
  • Cell In[11], line 3
  • 1 print('==m5======')
  • 2 # @module(position="-449,-555", comment="""""", comment_collapsed=True) ---->
  • 3 m5 = M.stock_ranker_dai_train.v9(
  • 4 data=m3_data,
  • 5 learning_algorithm="""排序""",
  • 6 number_of_leaves=30,
  • 7 min_docs_per_leaf=1000,
  • 8 number_of_trees=25,
  • 9 learning_rate=0.1,
  • 10 max_bins=1023,
  • 11 feature_fraction=1,
  • 12 data_row_fraction=1,
  • 13 plot_charts=True,
  • 14 ndcg_discount_base=1,
  • 15 m_name="""m5"""
  • 16 )
  • 18 # @module(position="-373,-411", comment="""""", comment_collapsed=True)
  • 19 m6 = M.stock_ranker_dai_predict.v12(
  • 20 model=m5.model,
  • 21 data=m4.data,
  • 22 m_name="""m6"""
  • 23 )
  • File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/bigmodule/modules.py:28, in call(self, **kwargs)
  • File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/bigmodule/moduleinvoker.py:203, in module_invoke(name, version, kwargs)
  • File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/bigmodule/moduleinvoker.py:169, in _module_invoke(name, version, kwargs)
  • File /opt/pyenv/versions/3.11.8/lib/python3.11/site-packages/bigmodule/moduleinvoker.py:41, in _module_run(module, kwargs)
  • File dist/build/stock_ranker_dai_train/v9/init.py:66, in v9.run()
  • File dist/build/stock_ranker_dai_train/v9/utils.py:939, in v9.utils.train()
  • File dist/build/stock_ranker_dai_train/v9/utils.py:748, in v9.utils.train._train()
  • File dist/build/stock_ranker_dai_train/v9/utils.py:575, in v9.utils.train.df_to_bin()
  • TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'

:::

\

评论
  • 方便讲代码链接贴出来吗,初步判定是您没取到数据
{link}