qags icon indicating copy to clipboard operation
qags copied to clipboard

Issue while executing qg_utils.py: ValueError: invalid literal for int() with base 10: 'where'

Open mriganktiwari opened this issue 4 years ago • 6 comments

While executing the qg_utils.py, Line# 132 in https://github.com/W4ngatang/qags/blob/master/qg_utils.py gives below issue.

ValueError: invalid literal for int() with base 10: 'where'

The string tokens in variable tok_str are of str type and thereby causing the issue.

I would like to ask if this is not the expected type of elements in tok_str?

mriganktiwari avatar Jan 18 '21 07:01 mriganktiwari

I'm facing the same issue. I believe this is some kind of legacy from the author (including GPT tokenizer decoding follows after) considering the log file we put contains plain texts as questions, and the fact that there is replacing lines for <s> and <mask>.

@W4ngatang correct me if I'm wrong.

sonsus avatar Mar 22 '21 00:03 sonsus

I'm facing the same issue. I believe this is some kind of legacy from the author (including GPT tokenizer decoding follows after) considering the log file we put contains plain texts as questions, and the fact that there is replacing lines for and .

@W4ngatang correct me if I'm wrong.

Have you solved the problem ?@mriganktiwari @sonsus

gaozhiguang avatar Mar 30 '21 02:03 gaozhiguang

Hey, I just encountered the same problem. Is there a solution?

bigabig avatar Apr 01 '21 09:04 bigabig

Hi everyone,

I'm the next one with the same issue. Could someone solve it?

My solution was to write the raw in the gen_fh-file instead of decoding. Any comments on that? Best, Gisela

g-vallejo avatar Jan 06 '22 09:01 g-vallejo

I never found the solution, and long back moved away from trying as well. If someone finds the solution please provide here.

mriganktiwari avatar Jan 08 '22 07:01 mriganktiwari

My solution to this is to delete the tokenize step in qg_utils(line 135-136), because I assume that the questions in log file are what we need.

Wandering whether am I correct. :)

Zhou-Zoey avatar Nov 14 '22 03:11 Zhou-Zoey