这是原代码:
setting = OptimizationSetting()
setting.set_target("return_drawdown_ratio")
setting.add_parameter("fixed_window",6,20,2)
ga_out = engine.run_ga_optimization(setting)
ga_out
运行一会后就报错:
Traceback (most recent call last):
File "c:\vnstudio\lib\multiprocessing\pool.py", line 121, in worker
result = (True, func(args, **kwds))
File "c:\vnstudio\lib\multiprocessing\pool.py", line 44, in mapstar
return list(map(args))
File "c:\vnstudio\lib\site-packages\vnpy\trader\optimize.py", line 229, in ga_evaluate
cache[tp] = result
File "<string>", line 2, in setitem
File "c:\vnstudio\lib\multiprocessing\managers.py", line 811, in _callmethod
raise convert_to_error(kind, result)
multiprocessing.managers.RemoteError:
Traceback (most recent call last):
File "c:\vnstudio\lib\multiprocessing\managers.py", line 234, in serve_client
request = recv()
File "c:\vnstudio\lib\multiprocessing\connection.py", line 251, in recv
return _ForkingPickler.loads(buf.getbuffer())
AttributeError: Can't get attribute 'dtype' on <module 'numpy' from 'c:\vnstudio\lib\site-packages\numpy\init.py'>
有时候改变回测的日期期间就能解决,相当于一个个试错过去
求助,到底是哪里的问题