Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

have issue when run bow.py #51

Open
flyboyer opened this issue Dec 3, 2018 · 2 comments
Open

have issue when run bow.py #51

flyboyer opened this issue Dec 3, 2018 · 2 comments

Comments

@flyboyer
Copy link

flyboyer commented Dec 3, 2018

Traceback (most recent call last):
File "bow.py", line 111, in
results = se.eval(transfer_tasks)
File "../senteval/engine.py", line 59, in eval
self.results = {x: self.eval(x) for x in name}
File "../senteval/engine.py", line 59, in
self.results = {x: self.eval(x) for x in name}
File "../senteval/engine.py", line 121, in eval
self.results = self.evaluation.run(self.params, self.batcher)
File "../senteval/binary.py", line 49, in run
enc_input = np.vstack(enc_input)
File "/home/zzh/wyk_paper/software/anaconda3/envs/sentEval/lib/python3.6/site-packages/numpy/core/shape_base.py", line 234, in vstack
return _nx.concatenate([atleast_2d(_m) for _m in tup], 0)
ValueError: need at least one array to concatenate

when run bow's Transfer task : MR ,it's appear this issue.how to solve it and why?

@devfoo-one
Copy link

devfoo-one commented Jan 18, 2019

@flyboyer I had the same issue and fixed it for me: The problem was that i accidentally deleted the SentEval/data/downstream/tokenizer.sed file (wrong .gitignore config for the data folders). This led to empty data files SentEval/data/MR/Rt-polarity.* which caused the enc_input = np.vstack(enc_input) to crash because the enc_input was an empty list.

So checking if your tokenizer.sed exists and if your Rt-polarity.* files do contain data should help.

@devfoo-one
Copy link

FYI: #59 also leads to empty MR data files and may cause the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants