{"description":"实验创建于2017/11/15","graph":{"edges":[{"to_node_id":"-300:features","from_node_id":"-2295:data"},{"to_node_id":"-300:instruments","from_node_id":"-620:data"},{"to_node_id":"-7201:input_1","from_node_id":"-300:data"}],"nodes":[{"node_id":"-2295","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"close_0\nopen_0\nlow_0\n","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-2295"}],"output_ports":[{"name":"data","node_id":"-2295"}],"cacheable":true,"seq_num":8,"comment":"","comment_collapsed":true},{"node_id":"-620","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2022-08-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2022-10-01","type":"Literal","bound_global_parameter":null},{"name":"market","value":"CN_STOCK_A","type":"Literal","bound_global_parameter":null},{"name":"instrument_list","value":"","type":"Literal","bound_global_parameter":null},{"name":"max_count","value":0,"type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"rolling_conf","node_id":"-620"}],"output_ports":[{"name":"data","node_id":"-620"}],"cacheable":true,"seq_num":24,"comment":"","comment_collapsed":true},{"node_id":"-300","module_id":"BigQuantSpace.general_feature_extractor.general_feature_extractor-v7","parameters":[{"name":"start_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"","type":"Literal","bound_global_parameter":null},{"name":"before_start_days","value":"100","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"instruments","node_id":"-300"},{"name":"features","node_id":"-300"}],"output_ports":[{"name":"data","node_id":"-300"}],"cacheable":true,"seq_num":22,"comment":"","comment_collapsed":true},{"node_id":"-7201","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"def preprocess(df):\n \n for factor in ['open_0']:\n df[factor] = df[factor].all_wbins(factor, 10)\n \n return df \n\n\n# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n df = input_1.read_df()\n\n data_a = df.apply(preprocess)\n data_1 = DataSource.write_df(data_a)\n \n return Outputs(data_1=data_1, data_2=None, data_3=None)\n\n","type":"Literal","bound_global_parameter":null},{"name":"post_run","value":"# 后处理函数,可选。输入是主函数的输出,可以在这里对数据做处理,或者返回更友好的outputs数据格式。此函数输出不会被缓存。\ndef bigquant_run(outputs):\n return outputs\n","type":"Literal","bound_global_parameter":null},{"name":"input_ports","value":"","type":"Literal","bound_global_parameter":null},{"name":"params","value":"{}","type":"Literal","bound_global_parameter":null},{"name":"output_ports","value":"","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"input_1","node_id":"-7201"},{"name":"input_2","node_id":"-7201"},{"name":"input_3","node_id":"-7201"}],"output_ports":[{"name":"data_1","node_id":"-7201"},{"name":"data_2","node_id":"-7201"},{"name":"data_3","node_id":"-7201"}],"cacheable":true,"seq_num":18,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-2295' Position='1048.4169921875,-301,200,200'/><node_position Node='-620' Position='726.2252197265625,-253.64591217041016,200,200'/><node_position Node='-300' Position='971.7381591796875,-165.4096450805664,200,200'/><node_position Node='-7201' Position='972.579345703125,-75.31746101379395,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2023-02-01 15:23:53.974170] INFO: moduleinvoker: input_features.v1 开始运行..
[2023-02-01 15:23:53.995319] INFO: moduleinvoker: 命中缓存
[2023-02-01 15:23:53.997835] INFO: moduleinvoker: input_features.v1 运行完成[0.023671s].
[2023-02-01 15:23:54.004060] INFO: moduleinvoker: instruments.v2 开始运行..
[2023-02-01 15:23:54.022620] INFO: moduleinvoker: 命中缓存
[2023-02-01 15:23:54.024659] INFO: moduleinvoker: instruments.v2 运行完成[0.020619s].
[2023-02-01 15:23:54.040173] INFO: moduleinvoker: general_feature_extractor.v7 开始运行..
[2023-02-01 15:23:54.048670] INFO: moduleinvoker: 命中缓存
[2023-02-01 15:23:54.051219] INFO: moduleinvoker: general_feature_extractor.v7 运行完成[0.011055s].
[2023-02-01 15:23:54.063664] INFO: moduleinvoker: cached.v3 开始运行..
[2023-02-01 15:23:55.031673] ERROR: moduleinvoker: module name: cached, module version: v3, trackeback: KeyError: 'open_0'
The above exception was the direct cause of the following exception:
KeyError: 'open_0'
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
KeyError: 'open_0'
The above exception was the direct cause of the following exception:
KeyError Traceback (most recent call last)
<ipython-input-6-69b749ff3e14> in <module>
49 )
50
---> 51 m18 = M.cached.v3(
52 input_1=m22.data,
53 run=m18_run_bigquant_run,
<ipython-input-6-69b749ff3e14> in m18_run_bigquant_run(input_1, input_2, input_3)
15 df = input_1.read_df()
16
---> 17 data_a = df.apply(preprocess)
18 data_1 = DataSource.write_df(data_a)
19
<ipython-input-6-69b749ff3e14> in preprocess(df)
6
7 for factor in ['open_0']:
----> 8 df[factor] = df[factor].all_wbins(factor, 10)
9
10 return df
KeyError: 'open_0'