在线服务 框架版本和新版本模型不兼容 已解决
收藏
快速回复
AI Studio平台使用 问答其他 1703 2
在线服务 框架版本和新版本模型不兼容 已解决
收藏
快速回复
AI Studio平台使用 问答其他 1703 2

环境

模型保存代码:

def save_model(path):
    if not os.path.exists(path):
        os.makedirs(path)
    print ('save models to %s' % (path))
    fluid.io.save_inference_model(path,   #保存推理model的路径
                                      ['team_a', 'team_b'],     #推理(inference)需要 feed 的数据
                                      [predict],                #保存推理(inference)结果的 Variables
                                      exe,                      #executor 保存 inference model
                                      train_prog)

    print('训练模型保存完成!')

在线服务测试报错:

01/Feb/2020 06:*:*] "POST / HTTP/1.1" 200 97
Traceback (most recent call last):
  File "/home/work/serving/webserver/home/views.py", line 48, in index
    out = serving.infer(json.loads(req))
  File "/home/work/serving/webserver/home/serving.py", line 24, in infer
    return_numpy=False
  File "/usr/local/lib/python3.5/site-packages/paddle/fluid/executor.py", line 657, in run
    use_program_cache=use_program_cache)
  File "/usr/local/lib/python3.5/site-packages/paddle/fluid/executor.py", line 755, in _run
    exe.run(program.desc, scope, 0, True, True, fetch_var_name)
paddle.fluid.core_avx.EnforceNotMet: op_info_ptr should not be null
Operator lookup_table_v2 has not been registered at [/paddle/paddle/fluid/framework/op_info.h:*]

 

今天吃啥
已解决
2# 回复于2020-02
您好,目前在线服务底层使用的是paddle 1.4.1, 近期会进行升级,如果您比较着急的话,可以考虑使用paddle 1.4.1 版本训练模型试一下。
0
收藏
回复
全部评论(2)
时间顺序
今天吃啥
#2 回复于2020-02

您好,目前在线服务底层使用的是paddle 1.4.1, 近期会进行升级,如果您比较着急的话,可以考虑使用paddle 1.4.1 版本训练模型试一下。

0
回复
追梦驻华
#3 回复于2020-02

还没更新完。

0
回复
在@后输入用户全名并按空格结束,可艾特全站任一用户