问答交流

为什么报错

由bq30zy4n创建,最终由small_q 被浏览 18 用户

  • [2024-01-25 19:49:01.356127] INFO: moduleinvoker:3319923022.py:1308:<module> rename_columns1.v2 运行完成[0.584233s].

  • [2024-01-25 19:49:01.384588] INFO: moduleinvoker:3319923022.py:1315:<module> stock_ranker_dai_train.v2 开始运行..

  • 2024-01-25 19:49:01 [info ] data loaded: train=(6711, 20), validation=None

  • 2024-01-25 19:49:01 [info ] 数据预处理 ..

  • 2024-01-25 19:49:01 [info ] 特征预处理 ..

  • 2024-01-25 19:49:01 [info ] prepare data: training ..

  • [2024-01-25 19:49:02.112433] ERROR: moduleinvoker:3319923022.py:1315:<module> module name: stock_ranker_dai_train, module version: v2, trackeback: IndexError: list index out of range

  • Output exceeds the size limit. Open the full output data in a text editor

    --------------------------------------------------------------------------- IndexError Traceback (most recent call last) Cell In[6], line 1315 1308 m161 = M.rename_columns1.v2( 1309 input_ds=m154.data, 1310 columns='列名Qlib Alpha158 LOW(参数20)@Qlib_Alpha158_LOW20|列名Qlib Alpha158 LOW(参数5)@Qlib_Alpha158_LOW', 1311 keep_old_columns=False 1312 ) 1314 # @module(position="-1241,-115", comment='5. 使用StockRanker算法训练', comment_collapsed=True) -> 1315 m132 = M.stock_ranker_dai_train.v2( 1316 data=m161.data, 1317 learning_algorithm='排序', 1318 number_of_leaves=30, 1319 min_docs_per_leaf=200, 1320 number_of_trees=1, 1321 learning_rate=1, 1322 max_bins=1023, 1323 feature_fraction=1, 1324 data_row_fraction=1, 1325 plot_charts=True, 1326 ndcg_discount_base=1 1327 ) 1328 # </aistudiograph> 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:210, in biglearning.module2.common.moduleinvoker._module_run() File /var/app/data/custom_module/publicmodules/stock_ranker_dai_train/v2/init.py:958, in run(data, validation_ds, learning_algorithm, number_of_leaves, min_docs_per_leaf, number_of_trees, learning_rate, max_bins, feature_fraction, data_row_fraction, plot_charts, ndcg_discount_base, base_model) 956 validation_data = validation_ds.read() if validation_ds is not None else None 957 logger.info(f"data loaded: train={data.shape}, validation={validation_data.shape if validation_data is not None else None}") --> 958 result = train( 959 features=None, 960 data=data, 961 validation_data=validation_data, 962 learning_algorithm=learning_algorithm, 963 learning_rate=learning_rate, 964 max_bins=max_bins, 965 number_of_trees=number_of_trees, 966 number_of_leaves=number_of_leaves,

    ...

    --> 331 self.__max_dcg = self.__max_dcg_range() 333 self.__doc_to_query = [0] * len(self.__doc_ids) 334 for q in range(0, len(self.__query_ids)): File /var/app/data/custom_module/publicmodules/stock_ranker_dai_train/v2/init.py:303, in train..DataFrame2Bin.__max_dcg_range(self) 301 label_counts[i] = 0 302 for k in range(self.__boundaries[q], self.__boundaries[q + 1]): --> 303 label = self.__labels[k] 304 label_counts[label] += 1 306 top_label = relevancy_level - 1 IndexError: list index out of range

\

评论
  • 解答:你好,你这边需要把策略克隆给我们,只有报错信息判断不出具体出错原因哈
{link}