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

ValueError when running inference #14

Open
yaoyiyao-yao opened this issue Feb 27, 2021 · 4 comments
Open

ValueError when running inference #14

yaoyiyao-yao opened this issue Feb 27, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@yaoyiyao-yao
Copy link

Hi,
I have two problems.

First,in Process Spider Data part,"mv spider data/ "can not execute,I think it is because "data/spider/scripts" already exists.Does it mean add scripts folder under spider folder and then put spider folder under data folder?

Second,in inference part,after using "./experiment-bridge.sh configs/bridge/spider-bridge-bert-large.sh --inference 0 --checkpoint_path /home/guest31/spiderModel/TabularSemanticParsing/model/bridge-spider-bert-large-ems-70-1-exe-68-2.tar",the output shows ”ValueError: too many values to unpack (expected 3)"
The details are as follows:
Traceback (most recent call last):
File "/home/guest31/anaconda3/envs/bridge/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/home/guest31/anaconda3/envs/bridge/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/guest31/spiderModel/TabularSemanticParsing/src/experiments.py", line 407, in
run_experiment(args)
File "/home/guest31/spiderModel/TabularSemanticParsing/src/experiments.py", line 394, in run_experiment
inference(sp)
File "/home/guest31/spiderModel/TabularSemanticParsing/src/experiments.py", line 122, in inference
engine=engine, inline_eval=True, verbose=True)
File "/home/guest31/spiderModel/TabularSemanticParsing/src/semantic_parser/learn_framework.py", line 209, in inference
restored_pred, grammatical, schema_consistent = pred_restored_cache[db_name][pred_sql]
ValueError: too many values to unpack (expected 3)

Could you please give me some suggestions?
Thank you.

@thecodemakr
Copy link

I have not been able to run this end to end but I moved this checkpoint to the default location. I did not get value errors then.

mv bridge-spider-bert-large-ems-70-1-exe-68-2.tar /content/TabularSemanticParsing/model/spider.bridge.lstm.meta.ts.ppl-0.85.2.dn.eo.feat.bert-large-uncased.xavier-1024-400-400-16-2-0.0005-inv-sqr-0.0005-4000-6e-05-inv-sqr-3e-05-4000-0.3-0.3-0.0-0.0-1-8-0.0-0.0-res-0.2-0.0-ff-0.4-0.0/model-best.tar

@yaoyiyao-yao
Copy link
Author

Thanks for your suggestion.
But after I trying this,I still have the "ValueError: too many values to unpack (expected 3)" problem.

@todpole3 todpole3 added the bug Something isn't working label Mar 4, 2021
@1160300911
Copy link

I think this is because the uploaded cache file was saved by the previous version of the code. In the previous version, this line was written as followed:

restored_pred = pred_restored_cache[db_name][pred_sql]

So you need to restore this line. And due to the completeness, you also need to restore the moz_sp.restore_clause_order function as before.

@CannonWWW
Copy link

I think this is because the uploaded cache file was saved by the previous version of the code. In the previous version, this line was written as followed:

restored_pred = pred_restored_cache[db_name][pred_sql]

So you need to restore this line. And due to the completeness, you also need to restore the moz_sp.restore_clause_order function as before.

could you please tell how to fix the bug? I would greatly appreciate your urgent assistance with this matter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants