Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't execute sql successfully #96

Closed
yc930401 opened this issue May 25, 2023 · 12 comments
Closed

can't execute sql successfully #96

yc930401 opened this issue May 25, 2023 · 12 comments

Comments

@yc930401
Copy link

不执行sql勉强能写出sql语句。但执行以后直接报错。
image
image
打印了一下json_to_load是个string不是json。

@yc930401
Copy link
Author

image
sql都是瞎回答,咋回事?

@csunny
Copy link
Collaborator

csunny commented May 25, 2023

auto_sql

@csunny
Copy link
Collaborator

csunny commented May 25, 2023

嗯,原先的插件模式需要引入插件文件,我们最新的版本内置了这部分插件。 可以关注一下我们接下来的发布

@CL-666666
Copy link

怎么选择数据库呢,.env也写了ip和端口

@yc930401
Copy link
Author

啥时候发布一个成熟的呢?今天又跑了一下最新的模型,sql还是执行不了

@yhjun1026
Copy link
Collaborator

当前版本已经内置了sql执行模式,只要模型服务正常SQL基本都可以正常执行的,线确定下你的版本,然后可以具体看下不能执行的原因,对话框是否有错误提示

@yc930401
Copy link
Author

image
执行不了sql呀,总是报错。今天刚刚又拉了代码。

@yc930401
Copy link
Author

自己debug了一下,问题多种多样的,这3个步骤任何一个步骤输出不正确都无法得到sql执行结果:

@yc930401
Copy link
Author

1.vicuna-13b模型不稳定,有时不能回答
2.只能生成简单的sql,复杂的sql大概率会出错,比如join表的时候经常join错key
3.对sql的解析有问题,因为模型的输出格式不一致。比如上图多了“system:”,有时候还会多“example:”,有时候有会在结尾的时候多了一些文字,导致无法解析。
对于3,在pilot/out_parser/base.py里多做一些过滤处理会好很多。

@yhjun1026
Copy link
Collaborator

这周会对于模型推理输出做优化:1.简化输出所需要的结构. 2.对于非预期的输出结构做增强识别。 本来这里设计是模型的输出,还需要模型再进行一次优化的 但是耗时太长,这个版本会优化一些这里的稳定性和 识别率。 上周这里是第一个版本,暂时可用,测试时候稳定性还可以,就没花太多时间去处理。 等这周的版本吧

@yc930401
Copy link
Author

嗯呢,辛苦辛苦,做模型真是不容易。

@WindFlowUpTheMoon
Copy link

怎么选择数据库呢,.env也写了ip和端口

config.py文件里面也要改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants