Giter VIP home page Giter VIP logo

Comments (11)

guotong1988 avatar guotong1988 commented on June 19, 2024

Start a local stanford-corenlp service.

from nl2sql-rule.

Bill-ai avatar Bill-ai commented on June 19, 2024

### 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.

guotong1988 avatar guotong1988 commented on June 19, 2024

Prepare the data as the readme written.
image

from nl2sql-rule.

Bill-ai avatar Bill-ai commented on June 19, 2024

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.

guotong1988 avatar guotong1988 commented on June 19, 2024

You have to debug and recode..

from nl2sql-rule.

Bill-ai avatar Bill-ai commented on June 19, 2024

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.

guotong1988 avatar guotong1988 commented on June 19, 2024

https://drive.google.com/file/d/1iJvsf38f16el58H4NPINQ7uzal5-V4v4

the table data is here

from nl2sql-rule.

guotong1988 avatar guotong1988 commented on June 19, 2024

my sample data is the questions and SQLs.
The table data is not uploaded.

from nl2sql-rule.

Bill-ai avatar Bill-ai commented on June 19, 2024

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.

sarkaramal avatar sarkaramal commented on June 19, 2024

Hi, I am also facing the same issue. Is there any update on this.
Can u share the test for influence?

from nl2sql-rule.

guotong1988 avatar guotong1988 commented on June 19, 2024

Inference is not supported now.

from nl2sql-rule.

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.