Comments (9)
Hey Kevin,
Thanks for your question. So the terminal usually will be a cell value: it could be a float/integer or a string.
It usually involves some value copy mechanism to do it; but currently the model doesn't support it.
However, there is a simple solution for this:
If it is number, you can easily detect the number in the utterance and directly fill it in the generated SQL. For string type, you can match the n-gram against the value in the databases: if it matched, it would be a string value for the corresponding column.
I think above is a simple solution for this. I have a script to achieve this but it takes time to clean it and make it public. You can try this method out because that is pretty simple.
And I will try to make the script public as soon as possible if you did not implement it by yourself.
Peng
from gap-text2sql.
Hello @thecodemakr,
I got the same issue executing Inference solved the problem for me:
python run.py preprocess experiments/spider-configs/gap-run.jsonnet
(also execute the Preprocess dataset step in advance)
from gap-text2sql.
Hey,
Thanks for your interests on our work. You can checkout the pull request #6 when it is merged. I think you can run your own database and queries based on the notebook I provided.
Let me know if it works for you and let me know if you have any further questions.
Peng
from gap-text2sql.
Hello Peng,
Thank you very much for your quick response! I tried the notebook and it worked
Kevin
from gap-text2sql.
Hello Peng,
I made further tests and figured out that the response sometimes contains the word 'terminal' for example:
Query: department with budget greater then 10 billion
Answer: SELECT department.Department_ID FROM department WHERE department.Budget_in_Billions > 'terminal'
I guess 'terminal' should be replaced the words contained in the query. How can the replacement be achieved?
Sincerely
Kevin
from gap-text2sql.
Hey Peng,
Thank you very much for your explanation. I will try my best :)
Sincerely
Kevin
from gap-text2sql.
Hi @Impavidity @kev2513 , I get the following error on trying the notebook -
WARNING <class 'seq2struct.models.enc_dec.EncDecModel.Preproc'>: superfluous {'name': 'EncDec'}
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-21-d986dbd802ee> in <module>()
----> 1 inferer = Inferer(infer_config)
4 frames
/content/gap-text2sql/rat-sql-gap/seq2struct/commands/infer.py in __init__(self, config)
34 registry.lookup('model', config['model']).Preproc,
35 config['model'])
---> 36 self.model_preproc.load()
37
38 def load_model(self, logdir, step):
/content/gap-text2sql/rat-sql-gap/seq2struct/models/enc_dec.py in load(self)
54
55 def load(self):
---> 56 self.enc_preproc.load()
57 self.dec_preproc.load()
58
/content/gap-text2sql/rat-sql-gap/seq2struct/models/spider/spider_enc.py in load(self)
1272
1273 def load(self):
-> 1274 self.tokenizer = BartTokenizer.from_pretrained(self.data_dir)
1275
1276
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, *inputs, **kwargs)
1138
1139 """
-> 1140 return cls._from_pretrained(*inputs, **kwargs)
1141
1142 @classmethod
/usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs)
1244 ", ".join(s3_models),
1245 pretrained_model_name_or_path,
-> 1246 list(cls.vocab_files_names.values()),
1247 )
1248 )
OSError: Model name 'data/spider-bart/nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc' was not found in tokenizers model name list (facebook/bart-base, facebook/bart-large, facebook/bart-large-mnli, facebook/bart-large-cnn, facebook/bart-large-xsum, yjernite/bart_eli5). We assumed 'data/spider-bart/nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.json', 'merges.txt'] but couldn't find such vocabulary files at this path or url.
Can you please help me with what step am I missing?
from gap-text2sql.
Can you pls tell me that, How much time this command will run "python run.py preprocess experiments/spider-configs/gap-run.jsonnet", i'm running it for like an hr
from gap-text2sql.
Hi @Impavidity @kev2513 , I get the following error on trying the notebook -
WARNING <class 'seq2struct.models.enc_dec.EncDecModel.Preproc'>: superfluous {'name': 'EncDec'} --------------------------------------------------------------------------- OSError Traceback (most recent call last) <ipython-input-21-d986dbd802ee> in <module>() ----> 1 inferer = Inferer(infer_config) 4 frames /content/gap-text2sql/rat-sql-gap/seq2struct/commands/infer.py in __init__(self, config) 34 registry.lookup('model', config['model']).Preproc, 35 config['model']) ---> 36 self.model_preproc.load() 37 38 def load_model(self, logdir, step): /content/gap-text2sql/rat-sql-gap/seq2struct/models/enc_dec.py in load(self) 54 55 def load(self): ---> 56 self.enc_preproc.load() 57 self.dec_preproc.load() 58 /content/gap-text2sql/rat-sql-gap/seq2struct/models/spider/spider_enc.py in load(self) 1272 1273 def load(self): -> 1274 self.tokenizer = BartTokenizer.from_pretrained(self.data_dir) 1275 1276 /usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in from_pretrained(cls, *inputs, **kwargs) 1138 1139 """ -> 1140 return cls._from_pretrained(*inputs, **kwargs) 1141 1142 @classmethod /usr/local/lib/python3.7/dist-packages/transformers/tokenization_utils_base.py in _from_pretrained(cls, pretrained_model_name_or_path, *init_inputs, **kwargs) 1244 ", ".join(s3_models), 1245 pretrained_model_name_or_path, -> 1246 list(cls.vocab_files_names.values()), 1247 ) 1248 ) OSError: Model name 'data/spider-bart/nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc' was not found in tokenizers model name list (facebook/bart-base, facebook/bart-large, facebook/bart-large-mnli, facebook/bart-large-cnn, facebook/bart-large-xsum, yjernite/bart_eli5). We assumed 'data/spider-bart/nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc' was a path, a model identifier, or url to a directory containing vocabulary files named ['vocab.json', 'merges.txt'] but couldn't find such vocabulary files at this path or url.
Can you please help me with what step am I missing?
@thecodemakr I am also facing the issue while running the notebook
How did you resolve this
from gap-text2sql.
Related Issues (20)
- Query formed for total irrelevant input string HOT 3
- Where is the pre-training data stored, want to know the format of input data. HOT 3
- The code is missing the relogic.logickit file!please ! HOT 2
- Unable to run the notebook or any inference? HOT 5
- Where is the code of pre-training? HOT 2
- How much time will it take to run preprocess step? HOT 2
- Errors in inference on my table HOT 1
- Can we get the pretraining data? HOT 1
- The number of grammar rules (94) is inconsistent with the pre-trained model (97) HOT 1
- Can anyone help out in figuring out what is "terminal" here? HOT 2
- Issue while loading the model HOT 2
- Export to ONNX?
- What are all the steps we need to follow, for our own database
- On clause are missing in inference output HOT 2
- Cannot access model checkpoint HOT 2
- The Criteria-to-SQL dataset
- Can we train our own questions and SQL queries?
- Inferer(infer_config) problem
- ModuleNotFoundError: No module named 'relogic.logickit.dataflow'
- The Google Folders mentioned in the scripts are not available...
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 gap-text2sql.