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
Questions about Database access in Serve Mode #32
Comments
As a follow up to this, I have also seen that the model returns me the expected output by executing the SQL query generated, in my current use case that I want to test out the model for, it's not really possible for me feed the model with data (rows in SQL tables), I am confused why does the model need data when it only needs the input database schema, could you please help me in understanding that? |
Hi!
The files must contain the (portion of the) schema the model is expected to work on. They may otherwise be empty. If they contain rows with real entity names, then the model may perform better: the inference pipeline searches the database for entities that match nouns and phrases from the user's question and, if found, adds the information to the input to the model. The model then can use it to generate a more accurate SQL query. |
You can reproduce the schema in sqlite. That gets you something that can work ok in many cases. |
The model can work with a database that is empty except for the schema. In that case, the queries will return empty results. |
@adityay121 I take your thumbs-up reaction as a sign that the issue was sufficiently addressed, was it not? |
Hey @tscholak Sorry I forgot to reply back to you, yes most of the queries have been addressed above, thank you. out of curiosity, I wanted to know how can I increase the sequence length of the output predictions, in case I want a longer output. also I wanted to know your opinions on the subject
|
Hi @tschola, sorry to bother, I was hoping you could help me understand the following issues that I am facing.
|
Hi @adityay121!
This is a configuration parameter. You can set
In theory, yes. However, this paper introduces a new transformer architecture that needs to be trained from scratch. As far as I can see, it is not possible to convert an existing pre-trained and/or fine-tuned T5 model to that architecture to make use of the sparse optimizations described in the paper. If Google releases a T5 model checkpoint based on the Terraformer architecture and Huggingface adds an implementation in
This is a warning that is shown once when the number of input tokens exceeds the maximum (512 tokens, I believe). In that case, the input is truncated and inference is run with the remainder. While this is a lossy intervention, it is not a critical error, and your program will continue working afterwards.
This could be the issue described in #20. Try increasing the memory allocated to docker. 8GB is the absolute minimum, I am using up to 64 GB.
The bigger the input to the model, the larger the memory requirements. The smaller the model, the smaller those requirements.
Yes, you have to make sure that the CUDA device is visible to PyTorch in the docker container. Run the Python interpreter, import
For that, you need to change the serving code. See https://github.com/ElementAI/picard/blob/e37020b6eee18bff865d9d2ba852bd636f3ed777/seq2seq/serve_seq2seq.py#L133. |
Hello Dr @tscholak, thank your for taking your time out and helping me to get stuff done 🙏 |
Hey @tscholak , so I have been fiddling with your model for a while now, I love the work you guys have done, I just wanted to ask a few questions about the files that go into your
./database
folder when you deploy it on serving mode, as per the ReadMe the format's supposed to be like the one shown belowI am just wondering about the content in each of these files, are they supposed to have both the schema and the rows of data?
And another thing is for my current use case that I want to try your model on, my data is stored on a Postgres AWS server, I can't really convert these to SQLite or even export this data to a local machine (company policy) so how would you suggest me to get the model working with such a setup, what are some of the changes that I would have to make?
Thank you for taking out your time
The text was updated successfully, but these errors were encountered: