Coder Social home page Coder Social logo

Comments (5)

alan-ai-learner avatar alan-ai-learner commented on June 11, 2024

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

from rat-sql.

unknowed-ER avatar unknowed-ER commented on June 11, 2024

@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

from rat-sql.

alan-ai-learner avatar alan-ai-learner commented on June 11, 2024

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

from rat-sql.

unknowed-ER avatar unknowed-ER commented on June 11, 2024

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

from rat-sql.

alan-ai-learner avatar alan-ai-learner commented on June 11, 2024

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

👍

from rat-sql.

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.