GithubHelp home page GithubHelp logo

Comments (15)

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024 1

@shuoshuo0 不用natsql是正确的,因为它目前只和Spider对齐了,不过seq2seq模型应该适用于所有SQL格式。你现在用的T5还是mT5?如果可以的话,能给我展示几个text2sql_data_generator.py生成的数据集的例子吗?

我今天尝试的时候发现sql_metadata只能解析英文,中文表名列名会按字切分

这个问题我也遇到过 ,但是我解决了 你可以在linux和window上分别尝试这个包 会有不同 建议使用2.8.0 最新版本

我是在 linux 上尝试的,2.6.0 和 2.8.0 都没有解决,请问您是在 window 上运行后就解决了的么,不同操作系统有什么区别么

这个我也不清楚 我是在window上解决的 你可以尝试一下windows

from resdsql.

lihaoyang-ruc avatar lihaoyang-ruc commented on July 23, 2024

不好意思,我不太了解DuSQL这个数据集。你可能需要在DuSQL的训练集上重新训练一套参数。

为什么需要重新训练?我们在之前的issue里讨论过类似的话题,你可以参考一下:#23 (comment)

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

请问 我在DuSQL上(纯中文的text2sql数据集)上 ,在训练第一阶段的模型的时候,训练了18个epoch了,一共需要128个epoch ,输出信息如下,
This is epoch 18.
At 96516 training step, start an evaluation.
table AUC: 0.995056540132552
column AUC: 0.9897792703075354
total auc: 1.9848358104400874
early_stop_step: 1
应该是没有问题 ,但是我的model保存只有这几个文件:
config.json
dense_classifier.pt
special_tokens_map.json
tokenzier_config.json
tokenzier.json
相较于您提供的模型
added_tokens.json
config.json
dense_classifier.pt
sentencepiece.bpe.model
special_tokens_map.json
tokerizer_config.json
tokener.json

少了 added_tokens.json
sentencepiece.bpe.model
这两个文件 ,请问这个是正常的吗,这两个文件是要等到模型训练完之后才会保存的吗????望解答,谢谢!

from resdsql.

lihaoyang-ruc avatar lihaoyang-ruc commented on July 23, 2024

这两个文件应该是每次保存checkpoint都会有,不是等模型训练完才保存的。

你需要让Python环境(包括Python版本和所有modules的版本)和我保持一样。但是如果你能使用你的model正常地进行推理,可能也没有问题。

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

请问支持多卡吗,如果支持,是直接将--device "0" 改为 --device "0,1" 嘛?

from resdsql.

lihaoyang-ruc avatar lihaoyang-ruc commented on July 23, 2024

不好意思,目前不支持多卡并行训练以及推理。

from resdsql.

EnHuiPug avatar EnHuiPug commented on July 23, 2024

请问 我在DuSQL上(纯中文的text2sql数据集)上 ,在训练第一阶段的模型的时候,训练了18个epoch了,一共需要128个epoch ,输出信息如下, This is epoch 18. At 96516 training step, start an evaluation. table AUC: 0.995056540132552 column AUC: 0.9897792703075354 total auc: 1.9848358104400874 early_stop_step: 1 应该是没有问题 ,但是我的model保存只有这几个文件: config.json dense_classifier.pt special_tokens_map.json tokenzier_config.json tokenzier.json 相较于您提供的模型 added_tokens.json config.json dense_classifier.pt sentencepiece.bpe.model special_tokens_map.json tokerizer_config.json tokener.json

少了 added_tokens.json sentencepiece.bpe.model 这两个文件 ,请问这个是正常的吗,这两个文件是要等到模型训练完之后才会保存的吗????望解答,谢谢!

您好,请问一下 DuSql 数据集与这个项目的数据集格式不同,您是如何处理的

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

您好 ,我使用dusql在重新训练了一遍,使用的sql模式,而不是natsql ,但是在推理的时候我发现第一阶段的模型的输出结果 也就是表明和字段名的概率,并没有用上,导致最后的输出结果不对,请问这是什么原因呢???

dev_dataloder = DataLoader(

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

我在dusql上训练,推理出来的结果总是不对,
结果是这样子的:select _ from _ on _ = _ where _ | select.,.,. from join on.id =.id where. < 3000000 and. >= 0.4
前面的那部分是对的 ,但是后面的那部分一直都不对 。没有正确预测出来字段名称和表名
我又在cspider上进行了训练,结果并没有问题,他们两个训练所产生的所有中间数据全部都一样,唯一不同的地方就是dusql的sql语句是中英结合的,比如 select 球员 from 足球场,dusql的 text,和sql语句都是中文的,请问这套程序是不是只适用于cspider 和 spider 这种纯英文的sql语句的这种呢? 望解答

from resdsql.

lihaoyang-ruc avatar lihaoyang-ruc commented on July 23, 2024

@shuoshuo0 不用natsql是正确的,因为它目前只和Spider对齐了,不过seq2seq模型应该适用于所有SQL格式。你现在用的T5还是mT5?如果可以的话,能给我展示几个text2sql_data_generator.py生成的数据集的例子吗?

from resdsql.

EnHuiPug avatar EnHuiPug commented on July 23, 2024

@shuoshuo0 不用natsql是正确的,因为它目前只和Spider对齐了,不过seq2seq模型应该适用于所有SQL格式。你现在用的T5还是mT5?如果可以的话,能给我展示几个text2sql_data_generator.py生成的数据集的例子吗?

我今天尝试的时候发现sql_metadata只能解析英文,中文表名列名会按字切分

from resdsql.

lihaoyang-ruc avatar lihaoyang-ruc commented on July 23, 2024

@EnHuiPug 感谢感谢,那可能这就是问题所在了

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

您是否能加我个联系方式呢,可能交流起来更加的方便,因为我感觉这个不是个容易解决的问题,如果可以的话,请加我的微信:15531294696
我用的是不是natsql 是sql,因为我的数据集是中文的,所以我用的是mt5模型,以下是text2sql_data_generator.py 生成的两条数据:
[
{
"db_id": "明星关系",
"input_sequence": "按离异时间从远到近,都有哪些明星离婚了? | 离异明星 : 离异明星.明星id , 离异明星.离异时间 , 离异明星.子女数量 , 离异明星.配偶id | 明星 : 明星.毕业院校 , 明星.年龄 , 明星.词条id , 明星.毕业时间 , 明星.姓名 | 明星夫妻 : 明星夫妻.子女数量 , 明星夫妻.配偶id , 明星夫妻.结婚时间 , 明星夫妻.明星id | 明星好友 : 明星好友.好友id , 明星好友.关系 , 明星好友.明星id | 明星夫妻.配偶id = 明星.词条id | 离异明星.配偶id = 明星.词条id | 明星夫妻.明星id = 明星.词条id | 明星好友.好友id = 明星.词条id | 明星好友.明星id = 明星.词条id | 离异明星.明星id = 明星.词条id",
"output_sequence": "select _ from _ order by _ asc | select 明星id from 离异明星 order by 离异时间 asc",
"tc_original": [
"离异明星.",
"离异明星.明星id",
"离异明星.离异时间",
"离异明星.子女数量",
"离异明星.配偶id",
"明星.
",
"明星.毕业院校",
"明星.年龄",
"明星.词条id",
"明星.毕业时间",
"明星.姓名",
"明星夫妻.",
"明星夫妻.子女数量",
"明星夫妻.配偶id",
"明星夫妻.结婚时间",
"明星夫妻.明星id",
"明星好友.
",
"明星好友.好友id",
"明星好友.关系",
"明星好友.明星id"
]
},
{
"db_id": "明星关系",
"input_sequence": "哪些明星在2002年之前离婚的? | 离异明星 : 离异明星.明星id , 离异明星.离异时间 , 离异明星.子女数量 , 离异明星.配偶id | 明星 : 明星.年龄 , 明星.姓名 , 明星.词条id , 明星.毕业院校 , 明星.毕业时间 | 明星夫妻 : 明星夫妻.结婚时间 , 明星夫妻.配偶id , 明星夫妻.子女数量 , 明星夫妻.明星id | 明星好友 : 明星好友.好友id , 明星好友.关系 , 明星好友.明星id | 明星夫妻.配偶id = 明星.词条id | 离异明星.配偶id = 明星.词条id | 明星夫妻.明星id = 明星.词条id | 明星好友.好友id = 明星.词条id | 明星好友.明星id = 明星.词条id | 离异明星.明星id = 明星.词条id",
"output_sequence": "select _ from _ where _ | select 明星id from 离异明星 where 离异时间 < 2002",
"tc_original": [
"离异明星.",
"离异明星.明星id",
"离异明星.离异时间",
"离异明星.子女数量",
"离异明星.配偶id",
"明星.
",
"明星.年龄",
"明星.姓名",
"明星.词条id",
"明星.毕业院校",
"明星.毕业时间",
"明星夫妻.",
"明星夫妻.结婚时间",
"明星夫妻.配偶id",
"明星夫妻.子女数量",
"明星夫妻.明星id",
"明星好友.
",
"明星好友.好友id",
"明星好友.关系",
"明星好友.明星id"
]
}
]

from resdsql.

shuoshuo0 avatar shuoshuo0 commented on July 23, 2024

@shuoshuo0 不用natsql是正确的,因为它目前只和Spider对齐了,不过seq2seq模型应该适用于所有SQL格式。你现在用的T5还是mT5?如果可以的话,能给我展示几个text2sql_data_generator.py生成的数据集的例子吗?

我今天尝试的时候发现sql_metadata只能解析英文,中文表名列名会按字切分

这个问题我也遇到过 ,但是我解决了 你可以在linux和window上分别尝试这个包 会有不同 建议使用2.8.0 最新版本

from resdsql.

EnHuiPug avatar EnHuiPug commented on July 23, 2024

@shuoshuo0 不用natsql是正确的,因为它目前只和Spider对齐了,不过seq2seq模型应该适用于所有SQL格式。你现在用的T5还是mT5?如果可以的话,能给我展示几个text2sql_data_generator.py生成的数据集的例子吗?

我今天尝试的时候发现sql_metadata只能解析英文,中文表名列名会按字切分

这个问题我也遇到过 ,但是我解决了 你可以在linux和window上分别尝试这个包 会有不同 建议使用2.8.0 最新版本

我是在 linux 上尝试的,2.6.0 和 2.8.0 都没有解决,请问您是在 window 上运行后就解决了的么,不同操作系统有什么区别么

from resdsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.