Closed tkngoutham closed 4 years ago
Installed tupa with pip3 install tupa and tried to run below:
python -m tupa example.txt -m models/ucca-bilstm
output is: TUPA version 7fd1266 Loading from 'models/ucca-bilstm.json'. [dynet] random seed: 1 [dynet] allocating memory: 512MB [dynet] memory allocation done. [dynet] 2.1 Loading from 'models/ucca-bilstm.enum'... Done (0.140s). Loading model from 'models/ucca-bilstm': 23param [00:59, 2.59s/param] Loading model from 'models/ucca-bilstm': 100%|██████████████████████████████████████| 23/23 [01:01<00:00, 2.67s/param] Loading from 'models/ucca-bilstm.nlp.json'. tupa example.txt --hyperparams "shared --lstm-layers 2" "conllu --max-edge-labels 60" "sdp --max-edge-labels 70" "amr --node-label-dim 20 --max-node-labels 1000 --max-edge-labels 110 --node-category-dim 5 --max-node-categories 25" --log models/ucca-bilstm.log --max-words 0 --max-words-external 249861 --testscores models/ucca-bilstm.test.csv --vocab vocab/en_core_web_lg.csv --word-vectors ../word_vectors/wiki.en.vec Loading 'vocab/en_core_web_lg.csv': 0 rows [00:00, ? rows/s]Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/main.py", line 3, in main() File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 707, in main list(main_generator()) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 701, in main_generator yield from train_test(train_passages, dev_passages, test_passages, args) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 560, in train_test for result in p.parse(test_passages, evaluate=evaluate, write=args.write): File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 532, in parse start=1): File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 338, in parse vocab=self.model.config.vocab(lang=self.config.args.lang)), display=display) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/config.py", line 484, in vocab vocab = load_enum(filename) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/model_util.py", line 285, in load_enum return Vocab(tqdm(csv.reader(f), desc="Loading '%s'" % filename, file=sys.stdout, unit=" rows")) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/model_util.py", line 264, in init for k, v in tuples: ValueError: not enough values to unpack (expected 2, got 0) Loading 'vocab/en_core_web_lg.csv': 0 rows [00:00, ? rows/s]
I have my directory structure as below inside tupa directory: examples.txt models vocab word_vectors
ls vocab: en_core_web_lg.csv wiki.en.vec
ls word_vectors wiki.en.vec
Could you paste the output of the following command:
$ head -n1 vocab/en_core_web_lg.csv
When I run it after extracting the model from the release, I get
0,
Installed tupa with pip3 install tupa and tried to run below:
python -m tupa example.txt -m models/ucca-bilstm
output is: TUPA version 7fd1266 Loading from 'models/ucca-bilstm.json'. [dynet] random seed: 1 [dynet] allocating memory: 512MB [dynet] memory allocation done. [dynet] 2.1 Loading from 'models/ucca-bilstm.enum'... Done (0.140s). Loading model from 'models/ucca-bilstm': 23param [00:59, 2.59s/param]
main()
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 707, in main
list(main_generator())
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 701, in main_generator
yield from train_test(train_passages, dev_passages, test_passages, args)
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 560, in train_test
for result in p.parse(test_passages, evaluate=evaluate, write=args.write):
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 532, in parse
start=1):
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/parse.py", line 338, in parse
vocab=self.model.config.vocab(lang=self.config.args.lang)), display=display)
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/config.py", line 484, in vocab
vocab = load_enum(filename)
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/model_util.py", line 285, in load_enum
return Vocab(tqdm(csv.reader(f), desc="Loading '%s'" % filename, file=sys.stdout, unit=" rows"))
File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/model_util.py", line 264, in init
for k, v in tuples:
ValueError: not enough values to unpack (expected 2, got 0)
Loading 'vocab/en_core_web_lg.csv': 0 rows [00:00, ? rows/s]
Loading model from 'models/ucca-bilstm': 100%|██████████████████████████████████████| 23/23 [01:01<00:00, 2.67s/param] Loading from 'models/ucca-bilstm.nlp.json'. tupa example.txt --hyperparams "shared --lstm-layers 2" "conllu --max-edge-labels 60" "sdp --max-edge-labels 70" "amr --node-label-dim 20 --max-node-labels 1000 --max-edge-labels 110 --node-category-dim 5 --max-node-categories 25" --log models/ucca-bilstm.log --max-words 0 --max-words-external 249861 --testscores models/ucca-bilstm.test.csv --vocab vocab/en_core_web_lg.csv --word-vectors ../word_vectors/wiki.en.vec Loading 'vocab/en_core_web_lg.csv': 0 rows [00:00, ? rows/s]Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ubuntu/tf14env/lib/python3.5/site-packages/tupa/main.py", line 3, in
I have my directory structure as below inside tupa directory: examples.txt models vocab word_vectors
ls vocab: en_core_web_lg.csv wiki.en.vec
ls word_vectors wiki.en.vec