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

Errors in inference on my table #22

Open
xkluan opened this issue Aug 20, 2021 · 1 comment
Open

Errors in inference on my table #22

xkluan opened this issue Aug 20, 2021 · 1 comment

Comments

@xkluan
Copy link

xkluan commented Aug 20, 2021

Hello,
I want to know why this error happened? Is this because the table data format or the missing data in table ?

Traceback (most recent call last):
File "my_test.py", line 91, in
code, ret_v = infer("how much dollar signed in 2021?")
File "my_test.py", line 86, in infer
output = inferer._infer_one(model, data_item, preproc_data, beam_size=1, use_heuristic=True)
File "/Users/Documents/gap-text2sql-main/rat-local-version/seq2struct/commands/infer.py", line 97, in _infer_one
model, data_item, preproc_item, beam_size=beam_size, max_steps=1000, from_cond=False)
File "/Users/Documents/gap-text2sql-main/rat-local-version/seq2struct/models/spider/spider_beam_search.py", line 21, in beam_search_with_heuristics
inference_state, next_choices = model.begin_inference(orig_item, preproc_item)
File "/Users/Documents/gap-text2sql-main/rat-local-version/seq2struct/models/enc_dec.py", line 133, in begin_inference
enc_state, = self.encoder([enc_input])
File "/Users/anaconda3/envs/chat/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in call
result = self.forward(*input, **kwargs)
File "/Users/Documents/gap-text2sql-main/rat-local-version/seq2struct/models/spider/spider_enc.py", line 1416, in forward
padded_token_lists, att_mask_lists, tok_type_lists = self.pad_sequence_for_bert_batch(batch_token_lists)
File "/Users/Documents/gap-text2sql-main/rat-local-version/seq2struct/models/spider/spider_enc.py", line 1556, in pad_sequence_for_bert_batch
max_len = max([len(it) for it in tokens_lists])
ValueError: max() arg is an empty sequence

@Impavidity
Copy link
Contributor

Have you checkout the notebook here https://github.com/awslabs/gap-text2sql/blob/main/rat-sql-gap/notebook.ipynb ?

If you can provide more details on the implementation of your my_test.py, it would be more helpful.

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

2 participants