新版的stockranker DAI如何固化模型
由bq8ispcb创建,最终由small_q 被浏览 19 用户
如结果为m5.stockRanker(DAI)
用m5.model获取DataSource
import pandas as pd
pd.DataFrame([DataSource("datasource的name").read()]).to_pickle('/home/bigquant/work/userlib/model.csv')
再在自定义python模块中输入以下内容是吗
def bigquant_run(input_1, input_2, input_3):
data = pd.read_pickle('/home/bigquant/work/userlib/RF_model.csv')
model_ds = DataSource.write_pickle(data.iloc[0].to_dict())
return Outputs(data_1=model_ds)
但报错显示
319 def decode(self, input, final=False): 320 # decode input (taking the buffer into account) 321 data = self.buffer + input --> 322 (result, consumed) = self._buffer_decode(data, self.errors, final) 323 # keep undecoded input until the next call 324 self.buffer = data[consumed:] UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
为什么会编码不对呢,新版的DAI好像可视化分享不出来
另外想问下,新版的dai只能回测,暂不支持模拟是吗
https://bigquant.com/codeshare/2fd4ddee-02d0-4c9d-bdc0-2be5929aec4d
\