ryanzhumich / editsql

MIT License
203 stars 67 forks source link

problems with run_sparc_edistql.sh and test_sparc_editsql.sh #30

Open imanuelroz opened 3 years ago

imanuelroz commented 3 years ago

Hi,

I am trying to run the run_sparc_editsql.sh and test_sparc_editsql.sh, I already installed all the requirements as suggested by the GitHub and by the following page: https://towardsdatascience.com/natural-language-to-sql-use-it-on-your-own-database-d4cd5784d081, I am using colab in order to work with a GPU. I downloaded the glove.840B.300d.txt file and changed the path in the run_sparc_editsql.sh file and in the test_sparc_editsql.sh

When I run: bash run_sparc_editsql.sh initially I have the following error: No such file or directory: 'logs_sparc_editsql/valid_use_predicted_queries_predictions.json’, so I copied the given file which is present in logs/logs_sparc_editsql and paste it in the generated folder of logs_sparc_editsql. Then I try to run again the run_sparc_editsql.sh file and this time I have the following message:

File "/content/gdrive/My path/editsql/model/model.py", line 91, in embedding = np.array([float(val) for val in l_split[-embedding_size:]]) ValueError: could not convert string to float: 'squeeze2’.

Moreover If I then try to run the test_sparc_editsql.sh I have the following error.

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:51 (But I checked and CUDA seems to be available)

What can I do to solve the following problems and successfully run the code?

Thank you in advance.

Elvis-Liang commented 2 years ago

Could you teach me about where I can download the "glove.840B.300d.txt file"? Since I cannot find this file anywhere. I will appreciate if you can tell me.

imanuelroz commented 2 years ago

Hi, you can download it from here https://nlp.stanford.edu/projects/glove/ or from here https://www.kaggle.com/takuok/glove840b300dtxt

Darshan-j-24 commented 2 years ago

Hi,

I am trying to run the run_sparc_editsql.sh and test_sparc_editsql.sh, I already installed all the requirements as suggested by the GitHub and by the following page: https://towardsdatascience.com/natural-language-to-sql-use-it-on-your-own-database-d4cd5784d081, I am using colab in order to work with a GPU. I downloaded the glove.840B.300d.txt file and changed the path in the run_sparc_editsql.sh file and in the test_sparc_editsql.sh

When I run: bash run_sparc_editsql.sh initially I have the following error: No such file or directory: 'logs_sparc_editsql/valid_use_predicted_queries_predictions.json’, so I copied the given file which is present in logs/logs_sparc_editsql and paste it in the generated folder of logs_sparc_editsql. Then I try to run again the run_sparc_editsql.sh file and this time I have the following message:

File "/content/gdrive/My path/editsql/model/model.py", line 91, in embedding = np.array([float(val) for val in l_split[-embedding_size:]]) ValueError: could not convert string to float: 'squeeze2’.

Moreover If I then try to run the test_sparc_editsql.sh I have the following error.

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:51 (But I checked and CUDA seems to be available)

What can I do to solve the following problems and successfully run the code?

Thank you in advance.

Hi, were you able to solve this CUDA error. Even Im getting the same error and Im trying in COLAB.

PreethuPrakash commented 2 years ago

Hi,

I am trying to run the run_sparc_editsql.sh and test_sparc_editsql.sh, I already installed all the requirements as suggested by the GitHub and by the following page: https://towardsdatascience.com/natural-language-to-sql-use-it-on-your-own-database-d4cd5784d081, I am using colab in order to work with a GPU. I downloaded the glove.840B.300d.txt file and changed the path in the run_sparc_editsql.sh file and in the test_sparc_editsql.sh

When I run: bash run_sparc_editsql.sh initially I have the following error: No such file or directory: 'logs_sparc_editsql/valid_use_predicted_queries_predictions.json’, so I copied the given file which is present in logs/logs_sparc_editsql and paste it in the generated folder of logs_sparc_editsql. Then I try to run again the run_sparc_editsql.sh file and this time I have the following message:

File "/content/gdrive/My path/editsql/model/model.py", line 91, in embedding = np.array([float(val) for val in l_split[-embedding_size:]]) ValueError: could not convert string to float: 'squeeze2’.

Moreover If I then try to run the test_sparc_editsql.sh I have the following error.

RuntimeError: cuda runtime error (38) : no CUDA-capable device is detected at /pytorch/aten/src/THC/THCGeneral.cpp:51 (But I checked and CUDA seems to be available)

What can I do to solve the following problems and successfully run the code?

Thank you in advance.

Hi,

I'm facing the same issue while testing. Could anyone please help me to resolve this if you found the solution.

ChargedMonk commented 2 years ago

I solved this issue, you have to change the number of CUDA_VISIBLE_DEVICES to 0 here.