swabhs/open-sesame

Got an Error while Running a Basic Prediction Task

heeh opened this issue · 1 comments

heeh commented

Hello, thank you for the great program.
I was trying to predict a sample sentence.

Hoover Dam played a major role in preventing Las Vegas from drying up.

I saved this sentence on sample.txt and execute the following command.

$ python -m sesame.frameid --mode predict \
                           --model_name fn1.7-pretrained-frameid \
                           --raw_input sample.txt

However, I got the following error.

Reading logs/example.txt ...
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/open-sesame/sesame/frameid.py", line 110, in <module>
    instances, _, _ = read_conll(options.raw_input)
  File "/open-sesame/sesame/dataio.py", line 73, in read_conll
    elements.append(CoNLL09Element(l, read_depsyn))
  File "/open-sesame/sesame/conll09.py", line 40, in __init__
    self.id = int(ele[0])
ValueError: invalid literal for int() with base 10: 'Hoover Dam played a major role in preventing Las Vegas from drying up.'

Did I miss any steps?

heeh commented

Nevermind, I figured it out. The .txt input is meant for targetid prediction