Comments (11)
Start a local stanford-corenlp service.
from nl2sql-rule.
### Thanks, started the server and this pops up. I know there is already an issue created for this, but I didn't understand the answer given by you. Can you please explain it to me in a simpler way?
Traceback (most recent call last):
File "train.py", line 837, in
beam_size=1, show_table=False, show_answer_only=True
File "train.py", line 667, in infer
beam_size=beam_size)
File "/home/govind/Documents/Cricket/NL2SQL-BERT/sqlova/model/nl2sql/wikisql_models.py", line 115, in beam_forward
knowledge=knowledge, knowledge_header=knowledge_header)
File "/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py", line 532, in call
result = self.forward(*input, **kwargs)
File "/home/govind/Documents/Cricket/NL2SQL-BERT/sqlova/model/nl2sql/wikisql_models.py", line 562, in forward
knowledge = [k + (mL_n - len(k)) * [0] for k in knowledge]
TypeError: 'NoneType' object is not iterable
PS: I'm using the def infer below the input, but you were talking that infer API is not working and thus to use test? Please correct me if I'm wrong.
Best
Bill
from nl2sql-rule.
Prepare the data as the readme written.
from nl2sql-rule.
Took the same example of readMe file and pasted it into ctable.tables.json in data_and_model folder.
python3 train.py
BERT-type: uncased_L-12_H-768_A-12
Batch_size = 32
BERT parameters:
learning rate: 1e-05
Fine-tune BERT: False
vocab size: 30522
hidden_size: 768
num_hidden_layer: 12
num_attention_heads: 12
hidden_act: gelu
intermediate_size: 3072
hidden_dropout_prob: 0.1
attention_probs_dropout_prob: 0.1
max_position_embeddings: 512
type_vocab_size: 2
initializer_range: 0.02
Load pre-trained parameters.
Seq-to-SQL: the number of final BERT layers to be used: 2
Seq-to-SQL: the size of hidden dimension = 100
Seq-to-SQL: LSTM encoding layer size = 2
Seq-to-SQL: dropout rate = 0.3
Seq-to-SQL: learning rate = 0.001
Type question: what
Traceback (most recent call last):
File "train.py", line 837, in <module>
beam_size=1, show_table=False, show_answer_only=True
File "train.py", line 653, in infer
hds1 = tb1['header']
KeyError: 'header'
Had a look into train.py the def infer has a variable assigned hsa1 which accesses header.
I'm I doing something wrong?
from nl2sql-rule.
You have to debug and recode..
from nl2sql-rule.
I tried the repo from scratch, but still getting the same error. In ctable.tables.json I have added the same sample data input in the first line. Can you please help me out here? I don't understand if there is no header in your input sample data, but you still want to access it through def infer? How is that possible?
from nl2sql-rule.
https://drive.google.com/file/d/1iJvsf38f16el58H4NPINQ7uzal5-V4v4
the table data is here
from nl2sql-rule.
my sample data is the questions and SQLs.
The table data is not uploaded.
from nl2sql-rule.
Okay, thanks for the clarity, But the thing is I'm actually doing an inference. So I don't need the questions and sqls I guess? I have already downloaded the table data file, I see some tables and jsonl files and uncased vocab and model files also.
Can you tell me what should I insert into ctable.tables.json file to run the main.py file for inference?
Or Quick way you can tell is how can I convert the CSV file to get queries directly by running main.py. Please tell me how do I preprocess the CSV file? and what changes do I need to have in main.py?
Or send me a file which I can directly run for inference.
I'm sorry for the long conversation. Can I email you up?
from nl2sql-rule.
Hi, I am also facing the same issue. Is there any update on this.
Can u share the test for influence?
from nl2sql-rule.
Inference is not supported now.
from nl2sql-rule.
Related Issues (20)
- ERROR when running train.py (RuntimeError: Error(s) in loading state_dict for Seq2SQL_v1) HOT 1
- a requirements.txt ? HOT 2
- How much time to train this model HOT 1
- How do I use this for my dataset? HOT 3
- train.py HOT 5
- Updates on Large Models. HOT 1
- 两个额外特征 HOT 1
- CRF support HOT 1
- 《leveraging table content for zero-shot text-to-sql with meta-learning》
- bertindex_knowledge and header_knowledge HOT 3
- Test Data HOT 3
- Does this model support converting Chinese language to SQL? HOT 1
- Killed - python train.py - CPU HOT 1
- Why no use of BertTokenizer? HOT 1
- Evaluate cmd statement HOT 1
- evaluate how to use HOT 1
- AttributeError: ‘RMKeyView‘ object has no attribute ‘index‘ HOT 1
- No module named '_sqlite3' HOT 1
- TODO, add the data type info of column into model
- from sqlnet.dbengine import DBEngine ModuleNotFoundError: No module named 'sqlnet.dbengine' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nl2sql-rule.