shirley-wu / text_to_table

MIT License
72 stars 14 forks source link

Run Error #2

Closed dyh1998 closed 2 years ago

dyh1998 commented 2 years ago

Hi, author of the text-to-table article, a few days ago I ran into some troubles when I ran the program according to the readme file. I thought it might be an error when the checkpoints directory was created and there was an error in the parameter setting, but I did not see the relevant parameter settings in the readme file. Please look at the picture below and hope to get your help.Thanks. image

shirley-wu commented 2 years ago

Hi, average_checkpoints.py averages the top n checkpoints. Here it seems the training script custom_train.py fails, and thus no checkpoint is saved.

Could you post how you run custom_train.py? You can add set -x to the script to show all the commands you run. And do you change the code in custom_train.py?

dyh1998 commented 2 years ago

Thanks for your reply. I make sure that i didn't change the code in custom_train.py. I just follow the readme.md strictly. I tried to run this script again, and mistake happened again.

shirley-wu commented 2 years ago

Sorry for the late response. I tried running both scripts/wikitabletext/train_had.sh and scripts/wikitabletext/train_had.sh on my machine and everything is fine. Could you re-check:

  1. If you have all requirements installed. Particularly fairseq should be exactly v0.10.2
  2. If you're running under the project directory text_to_table
  3. If data/wikitabletext/bins contains all necessary files: dict.{data,text}.txt and {train,valid,test}.text-data.{data,text}.{bin,idx} (It may also have preprocess.log but it doesn't matter)

If you still meet errors, could you post the following info in this issue:

  1. the directory you're in when running the script
  2. the full command you use to run the script
  3. the files under data/wikitabletext/bins
  4. add set -x to the first line in the script, and post all the outputs
dyh1998 commented 2 years ago

Thanks for your reply in your space time, that's fine. I satisfied all the conditions above and the error also happened. The version of fairseq was 1.0x previously, so i fixed it and changed the version to 0.10.2. The error also happened, but it seems a new error. There are three pngs of the outputs:

image image image

shirley-wu commented 2 years ago

What is your python version? If you're using python 3.9, could you downgrade to lower versions? I'm using 3.8.8

I never met such issue, but I found a potentially related issue here https://github.com/pytorch/fairseq/issues/4032 they say it's because of a bug with Python 3.9 compatibility

dyh1998 commented 2 years ago

This is really a python version problem. It has been solved now. Thanks for your help.