{"description":"实验创建于2018/6/27","graph":{"edges":[{"to_node_id":"-927:input_1","from_node_id":"-915:data"},{"to_node_id":"-949:input_1","from_node_id":"-927:data_1"},{"to_node_id":"-961:input_1","from_node_id":"-949:data_1"}],"nodes":[{"node_id":"-961","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n \n tmp01=input_1.read_pickle()\n \n ad = {\n \"instruments\":tmp01,\n \"start_date\":\"2021-11-16\",\n \"end_date\":T.live_run_param('trading_date', \"2021-11-16\")\n #\"end_date\":\"2021-08-04\"\n }\n \n print(444444444444)\n # 这一段代码,结合超参搜索就会爆出错误\n # ERROR: moduleinvoker: module name: cached, module version: v3, trackeback: AssertionError: daemonic processes are not allowed to have children_\n # 在勾选 不显示日志之后,才会出现\n DataSource('bar5m_CN_STOCK_A').read(tmp01 ,start_date='2021-11-05',end_date='2021-11-16',fields=['close','volume'])\n print(333333333333)\n \n data_1 = DataSource.write_pickle(ad)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\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":"-961"},{"name":"input_2","node_id":"-961"},{"name":"input_3","node_id":"-961"}],"output_ports":[{"name":"data_1","node_id":"-961"},{"name":"data_2","node_id":"-961"},{"name":"data_3","node_id":"-961"}],"cacheable":true,"seq_num":6,"comment":"","comment_collapsed":true},{"node_id":"-7324","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"b","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-7324"}],"output_ports":[{"name":"data","node_id":"-7324"}],"cacheable":true,"seq_num":55,"comment":"","comment_collapsed":true},{"node_id":"-715","module_id":"BigQuantSpace.hyper_parameter_search.hyper_parameter_search-v1","parameters":[{"name":"param_grid_builder","value":"def bigquant_run():\n param_grid = {}\n\n param_grid['m30.features'] = [['a']]\n param_grid['m55.features'] = [['a'],['b']]\n \n \n return param_grid","type":"Literal","bound_global_parameter":null},{"name":"scoring","value":"def bigquant_run(result):\n score = result.get('m54').read_raw_perf()['algorithm_period_return'].dropna().tail(1)[0]\n return {'score':score}\n","type":"Literal","bound_global_parameter":null},{"name":"search_algorithm","value":"网格搜索","type":"Literal","bound_global_parameter":null},{"name":"search_iterations","value":"1","type":"Literal","bound_global_parameter":null},{"name":"random_state","value":"","type":"Literal","bound_global_parameter":null},{"name":"workers","value":"2","type":"Literal","bound_global_parameter":null},{"name":"worker_distributed_run","value":"False","type":"Literal","bound_global_parameter":null},{"name":"worker_silent","value":"True","type":"Literal","bound_global_parameter":null},{"name":"run_now","value":"True","type":"Literal","bound_global_parameter":null},{"name":"bq_graph","value":"True","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"bq_graph_port","node_id":"-715"},{"name":"input_1","node_id":"-715"},{"name":"input_2","node_id":"-715"},{"name":"input_3","node_id":"-715"}],"output_ports":[{"name":"result","node_id":"-715"}],"cacheable":false,"seq_num":18,"comment":"","comment_collapsed":true},{"node_id":"-3292","module_id":"BigQuantSpace.input_features.input_features-v1","parameters":[{"name":"features","value":"a","type":"Literal","bound_global_parameter":null}],"input_ports":[{"name":"features_ds","node_id":"-3292"}],"output_ports":[{"name":"data","node_id":"-3292"}],"cacheable":true,"seq_num":30,"comment":"","comment_collapsed":true},{"node_id":"-915","module_id":"BigQuantSpace.instruments.instruments-v2","parameters":[{"name":"start_date","value":"2017-01-01","type":"Literal","bound_global_parameter":null},{"name":"end_date","value":"2021-08-17","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":"-915"}],"output_ports":[{"name":"data","node_id":"-915"}],"cacheable":true,"seq_num":2,"comment":"","comment_collapsed":true},{"node_id":"-927","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n tmp01=input_1.read_pickle()\n \n df = pd.DataFrame()\n \n # print(tmp01['instruments'])\n \n df['instrument'] = tmp01['instruments']\n df['date'] = datetime.datetime.strptime(tmp01['start_date'], '%Y-%m-%d')\n \n data_1 = DataSource.write_df(df)\n return Outputs(data_1=data_1, data_2=None, data_3=None)\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":"-927"},{"name":"input_2","node_id":"-927"},{"name":"input_3","node_id":"-927"}],"output_ports":[{"name":"data_1","node_id":"-927"},{"name":"data_2","node_id":"-927"},{"name":"data_3","node_id":"-927"}],"cacheable":true,"seq_num":3,"comment":"","comment_collapsed":true},{"node_id":"-949","module_id":"BigQuantSpace.cached.cached-v3","parameters":[{"name":"run","value":"# Python 代码入口函数,input_1/2/3 对应三个输入端,data_1/2/3 对应三个输出端\ndef bigquant_run(input_1, input_2, input_3):\n # 示例代码如下。在这里编写您的代码\n# df = pd.DataFrame({'data': [1, 2, 3]})\n \n tmp02=input_1.read_df()\n \n ins = tmp02['instrument'].values.tolist()\n \n data_1 = DataSource.write_pickle(ins)\n \n return Outputs(data_1=data_1, data_2=None, data_3=None)\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":"-949"},{"name":"input_2","node_id":"-949"},{"name":"input_3","node_id":"-949"}],"output_ports":[{"name":"data_1","node_id":"-949"},{"name":"data_2","node_id":"-949"},{"name":"data_3","node_id":"-949"}],"cacheable":true,"seq_num":5,"comment":"","comment_collapsed":true}],"node_layout":"<node_postions><node_position Node='-961' Position='1625.2354736328125,-551.9535827636719,200,200'/><node_position Node='-7324' Position='1649.1824951171875,51.960166931152344,200,200'/><node_position Node='-715' Position='1404.7735595703125,-257.01493072509766,200,200'/><node_position Node='-3292' Position='1634.1575927734375,-22.695732682943344,200,200'/><node_position Node='-915' Position='1563.8856201171875,-855.1177368164062,200,200'/><node_position Node='-927' Position='1661.1981201171875,-763.5481567382812,200,200'/><node_position Node='-949' Position='1655.4766845703125,-661.8018188476562,200,200'/></node_postions>"},"nodes_readonly":false,"studio_version":"v2"}
[2021-11-19 16:55:44.422094] ERROR: moduleinvoker: module name: cached, module version: v3, trackeback: AssertionError: daemonic processes are not allowed to have children
[2021-11-19 16:55:44.423011] ERROR: moduleinvoker: module name: cached, module version: v3, trackeback: AssertionError: daemonic processes are not allowed to have children
[2021-11-19 16:55:44.449240] ERROR: moduleinvoker: module name: hyper_parameter_search, module version: v1, trackeback: RuntimeError: Cannot clone object , as the constructor either does not set or modifies parameter m30.features
[CV 1/1; 1/2] START m30.features=['a'], m55.features=['a']......................
[CV 1/1; 2/2] START m30.features=['a'], m55.features=['b']......................
444444444444444444444444
Fitting 1 folds for each of 2 candidates, totalling 2 fits
[Parallel(n_jobs=2)]: Using backend MultiprocessingBackend with 2 concurrent workers.
[CV 1/1; 2/2] END ....m30.features=['a'], m55.features=['b']; total time= 0.2s[CV 1/1; 1/2] END ....m30.features=['a'], m55.features=['a']; total time= 0.2s
[Parallel(n_jobs=2)]: Done 1 tasks | elapsed: 0.2s
[Parallel(n_jobs=2)]: Done 2 out of 2 | elapsed: 0.2s remaining: 0.0s
[Parallel(n_jobs=2)]: Done 2 out of 2 | elapsed: 0.2s finished
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-194-4b43e2542103> in <module>
123
124
--> 125 m18 = M.hyper_parameter_search.v1(
126 param_grid_builder=m18_param_grid_builder_bigquant_run,
127 scoring=m18_scoring_bigquant_run,
RuntimeError: Cannot clone object <biglearning.module2.modules.hyper_parameter_search.v1.graphestimator.GraphEstimator object at 0x7f884900ab20>, as the constructor either does not set or modifies parameter m30.features