forrestdavis / NLPScholar

Tools for training an NLP Scholar
GNU General Public License v3.0
5 stars 2 forks source link

Issue with running evaluate TextClassification #4

Closed Eliheakins closed 2 weeks ago

Eliheakins commented 2 weeks ago

Describe the bug

When running evaluate on Minimal Pair with either a pretrained or untrained model you get an error.

To Reproduce

Run nlp scholar with the config file (linked) and the eval data (linked)

Expected behavior

Should produce results file from running eval

Observed behavior

eheakins@s01:~/NLPScholar$ python main.py Reading from config.yaml Loading data from midterm/evaldatatest.tsv... Running on cpu Traceback (most recent call last): File "/home/eheakins/NLPScholar/main.py", line 27, in exp.evaluate() File "/home/eheakins/NLPScholar/src/evaluations/TextClassification.py", line 92, in evaluate outputs = self.gather_labeled_output(Classifier) File "/home/eheakins/NLPScholar/src/evaluations/TextClassification.py", line 42, in gather_labeled_output outputs.extend(Classifier.get_text_predictions(batch, batch_pair)) UnboundLocalError: local variable 'batch_pair' referenced before assignment

Screenshots

N/A

Setup (please complete the following information)

Additional context

Here is link to necessary files, other files are included but you only need config.yaml and evaldatatest.tsv https://drive.google.com/file/d/1KEKJGG4F8qAgURQG72QtYPkyguwmfb_o/view?usp=sharing

forrestdavis commented 2 weeks ago

I think your link is just for config.yaml can you link the evaldatatest too

Eliheakins commented 2 weeks ago

https://drive.google.com/drive/folders/1F7PjgBe2j9UkwLto3VzUdMpLLxIU02gu?usp=sharing Apologies, clicked wrong share button. Here is the link to the folder with both

forrestdavis commented 2 weeks ago

Fixed with commit: 5a12fa9d3e9203b78bcb5a6963760ac607373947

Thank you!