M.cached.v2 加速如何使用?

用户成长系列
标签: #<Tag:0x00007f60aced2240>

(PAYNE) #1

m1 = M.advanced_auto_labeler.v1(
instruments=conf.instruments, start_date=conf.start_date, end_date=conf.split_date, label_expr=conf.label_expr, benchmark=‘000300.SHA’)

此部分想使用M.cached.v2 加速该如何使用?

m1 = M.cached.v2(run=M.advanced_auto_labeler.v1, kwargs=dict(instruments=conf.instruments, start_date=conf.start_date, end_date=conf.split_date,
label_expr=conf.label_expr, benchmark=‘000300.SHA’))

代码报错,ypeError Traceback (most recent call last)
in ()
75
76 m1 = M.cached.v2(run=M.advanced_auto_labeler.v1, kwargs=dict(instruments=conf.instruments, start_date=conf.start_date, end_date=conf.split_date,
—> 77 label_expr=conf.label_expr, benchmark=‘000300.SHA’))
78
79 # cast_label_int=True

TypeError: _cache_key_encoder: not supported type: <class ‘biglearning.module2.common.modulemanagerv2.BigQuantModuleVersion’>


(神龙斗士) #2

多谢反馈。使用示例见:https://bigquant.com/docs/module_cached.html

M. 下面的模块已经内置了相关支持,不需要在调用一次了。


(PAYNE) #3

最好别提大宽的文档了,过期的函数没有更新不说,实例代码全是错误,平台都不能跑

很多函数都V6,V7的版本了,文档里面还是V1的也不更新,而且更新的函数对用户来说没有什么太多的实际作用,里面的参数格式都改的,按文档里面根本就编译不能通过