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

Do you have notebook version for RATSQL ? #56

Open
toreleon opened this issue Jun 30, 2021 · 5 comments
Open

Do you have notebook version for RATSQL ? #56

toreleon opened this issue Jun 30, 2021 · 5 comments

Comments

@toreleon
Copy link

I would like to run RATSQL but my laptop isn't enough for training. Can you help me to setup the run on Google colab ?

@alan-ai-learner
Copy link

https://github.com/DevanshChoubey/rat-sql/blob/master/RatSql.ipynb
try this and let me know if you run it successfully

@unknowed-ER
Copy link

@alan-ai-learner
I follow this ,but when I run python run.py preprocess experiments/spider-bert-run.jsonnet ,I can’t connection to CoreNLP like this

WARNING <class 'ratsql.models.enc_dec.EncDecModel.Preproc'>: superfluous {'name': 'EncDec'}

DB connections: 100%|██████████████████████████████████████████████████████████████████| 166/166 [00:00<00:00, 396.42it/s]
train section: 0%| | 0/8659 [00:00<?, ?it/s]
WARNING: CoreNLP connection timeout. Recreating the server...
train section: 0%| | 0/8659 [00:30<?, ?it/s]
Traceback (most recent call last):
File "/home/fsx/model/rat-sql/ratsql/resources/corenlp.py", line 28, in annotate
result = self.client.annotate(text, annotators, output_format, properties)
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 225, in annotate
r = self._request(text.encode('utf-8'), properties)
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 178, in _request
self.ensure_alive()
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 119, in ensure_alive
raise PermanentlyFailedException("Timed out waiting for service to come alive.")
corenlp.client.PermanentlyFailedException: Timed out waiting for service to come alive.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "run.py", line 108, in
main()
File "run.py", line 73, in main
preprocess.main(preprocess_config)
File "/home/fsx/model/rat-sql/ratsql/commands/preprocess.py", line 53, in main
preprocessor.preprocess()
File "/home/fsx/model/rat-sql/ratsql/commands/preprocess.py", line 32, in preprocess
to_add, validation_info = self.model_preproc.validate_item(item, section)
File "/home/fsx/model/rat-sql/ratsql/models/enc_dec.py", line 36, in validate_item
enc_result, enc_info = self.enc_preproc.validate_item(item, section)
File "/home/fsx/model/rat-sql/ratsql/models/spider/spider_enc.py", line 719, in validate_item
preproc_schema = self._preprocess_schema(item.schema)
File "/home/fsx/model/rat-sql/ratsql/models/spider/spider_enc.py", line 734, in _preprocess_schema
self.fix_issue_16_primary_keys, bert=True)
File "/home/fsx/model/rat-sql/ratsql/models/spider/spider_enc.py", line 78, in preprocess_schema_uncached
r.normalized_column_names.append(Bertokens(col_toks))
File "/home/fsx/model/rat-sql/ratsql/models/spider/spider_enc.py", line 552, in init
self.normalize_toks()
File "/home/fsx/model/rat-sql/ratsql/models/spider/spider_enc.py", line 603, in normalize_toks
ann = corenlp.annotate(tok, annotators=['tokenize', 'ssplit', 'lemma'])
File "/home/fsx/model/rat-sql/ratsql/resources/corenlp.py", line 46, in annotate
return _singleton.annotate(text, annotators, output_format, properties)
File "/home/fsx/model/rat-sql/ratsql/resources/corenlp.py", line 34, in annotate
result = self.client.annotate(text, annotators, output_format, properties)
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 225, in annotate
r = self._request(text.encode('utf-8'), properties)
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 178, in _request
self.ensure_alive()
File "/home/fsx/anaconda3/envs/torch1.6/lib/python3.7/site-packages/corenlp/client.py", line 119, in ensure_alive
raise PermanentlyFailedException("Timed out waiting for service to come alive.")
corenlp.client.PermanentlyFailedException: Timed out waiting for service to come alive.

Could you kown how to fix it?my java version is openjdk 1.8.0

@alan-ai-learner
Copy link

hey @unknowed-ER , I haven't use this now, due to some bugs, try smbop, which is great for text2sql task, with better implementations.

@unknowed-ER
Copy link

@alan-ai-learner ,thanks for your response , i'll try smbop .

@alan-ai-learner
Copy link

@alan-ai-learner ,thanks for your response , i'll try smbop .

👍

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

3 participants