Giter Site home page Giter Site logo

juruomp / rat-sql-tc Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 2.0 51.25 MB

Code for our paper "Pay More Attention to History: A Context Modeling Strategy for Conversational Text-to-SQL"

License: Apache License 2.0

Jsonnet 0.78% TeX 0.02% Python 98.52% Jupyter Notebook 0.61% Shell 0.07%

rat-sql-tc's Introduction

RAT-SQL-TC

Code for our paper "Pay More Attention to History: A Context Modeling Strategy for Conversational Text-to-SQL"

Please refer to gap-text2sql rep for environment and requirements.

Preprocess dataset

python run.py preprocess experiments/sparc-tcs-configs/gap-run.jsonnet

Inference

python run.py eval experiments/sparc-tcs-configs/gap-run.jsonnet

Training

python run.py train experiments/sparc-tcs-configs/gap-run.jsonnet

rat-sql-tc's People

Contributors

juruomp avatar

Stargazers

Mohammadhossein Malekpour avatar  avatar  avatar Yuan Jinjie avatar hcZhang avatar

Watchers

 avatar

rat-sql-tc's Issues

Problem with starting training

Hi developer of RAT-SQL-TC
These days I've been trying to run your code on my machine but encountered a problem when training, here is the traceback in my PyCharm:

Traceback (most recent call last):
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/run.py", line 107, in <module>
    main()
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/run.py", line 69, in main
    train.main(train_config)
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/seq2struct/commands/train.py", line 324, in main
    trainer = Trainer(logger, config)
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/seq2struct/commands/train.py", line 101, in __init__
    self.model_preproc.load()
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/seq2struct/models/enc_dec.py", line 56, in load
    self.enc_preproc.load()
  File "/home/xfy/NLP/RAT-SQL-TC/rat-sql-gap/seq2struct/models/spider/spider_enc.py", line 1646, in load
    self.tokenizer = BartTokenizer.from_pretrained(self.data_dir if enc_dir is None else enc_dir)
  File "/home/xfy/CondaEnvs/text2sql/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 1768, in from_pretrained
    raise EnvironmentError(
OSError: Can't load tokenizer for 'data/sparc-bart-tcs/sparc,nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'data/sparc-bart-tcs/sparc,nl2code-1115,output_from=true,fs=2,emb=bart,cvlink/enc' is the correct path to a directory containing all relevant files for a BartTokenizer tokenizer.

The problem seems to have something to do with the BartTokenizer file missing on huggingface because PuDB returns something else as shown in the picture below.
problem_training

Any idea on how to fix this?

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.