BERT-for-RRC-ABSA icon indicating copy to clipboard operation
BERT-for-RRC-ABSA copied to clipboard

AE Evaluation

Open vishnu-itachi opened this issue 3 years ago • 8 comments

After downloading "post-trained Laptop weights" (fine-tuned model). How can I Evaluate using that weights for aspect Extraction? Thank you.

vishnu-itachi avatar Mar 18 '21 09:03 vishnu-itachi

You need to fine tune on laptop aspect extraction data.

On Thu, Mar 18, 2021 at 2:23 AM Vishnu @.***> wrote:

After downloading "post-trained Laptop weights" (fine-tuned model). How can I Evaluate using that weights for aspect Extraction? Thank you.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/howardhsu/BERT-for-RRC-ABSA/issues/18, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRK37ZSCPSRBIVSAGKUPM3TEHBBBANCNFSM4ZMHKZMA .

-- Homepage: https://howardhsu.github.io/ Linkedin: https://www.linkedin.com/in/hu-xu-9852403b/ Google Scholar: https://scholar.google.com/citations?user=SaH2yWMAAAAJ Twitter: https://twitter.com/Hu_Hsu Email: @.***

howardhsu avatar Mar 20 '21 03:03 howardhsu

You need to fine tune on laptop aspect extraction data. Isn't the "post-trained Laptop weights" already fine-tuned weights of the model on laptop data?

vishnu-itachi avatar Mar 20 '21 06:03 vishnu-itachi

it's on laptop domain but not on a particular task such as AE.

On Fri, Mar 19, 2021 at 11:28 PM Vishnu @.***> wrote:

You need to fine tune on laptop aspect extraction data. Isn't the "post-trained Laptop weights" already fine-tuned weights of the model on laptop data?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/howardhsu/BERT-for-RRC-ABSA/issues/18#issuecomment-803259879, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRK37YHEZEWWAUK5UBN4EDTEQ6AJANCNFSM4ZMHKZMA .

-- Homepage: https://howardhsu.github.io/ Linkedin: https://www.linkedin.com/in/hu-xu-9852403b/ Google Scholar: https://scholar.google.com/citations?user=SaH2yWMAAAAJ Twitter: https://twitter.com/Hu_Hsu Email: @.***

howardhsu avatar Mar 20 '21 16:03 howardhsu

Thanks for the info. While evaluating I am getting this error w.r.t to Main.Aspects

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext
	at gr.ilsp.nlp.semeval.absa.eval.ConsoleAspectsAndCategsExtractionEval.run(ConsoleAspectsAndCategsExtractionEval.java:74)
	at gr.ilsp.nlp.semeval.absa.eval.ConsoleAspectsAndCategsExtractionEval.main(ConsoleAspectsAndCategsExtractionEval.java:243)
	at Main.Aspects.main(Aspects.java:9)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 3 more
Traceback (most recent call last):
  File "eval/evaluate_ae.py", line 174, in <module>
    print(evaluate(args.pred_json, command, template) )
  File "eval/evaluate_ae.py", line 158, in evaluate
    acc=check_output(command ).split()
  File "/usr/lib/python3.7/subprocess.py", line 411, in check_output
    **kwargs).stdout
  File "/usr/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['java', '-cp', 'eval/eval.jar', 'Main.Aspects', 'data/ae/official_data/laptop_pred.xml', 'data/ae/official_data/Laptops_Test_Gold.xml']' returned non-zero exit status 1.

Can you help me with this. Thanks

vishnu-itachi avatar Mar 22 '21 07:03 vishnu-itachi

Make sure you can run the CMD in eval code from terminal first. Then the reason could be the semeval jar cannot be executed on new versions of java. There's a similar issue posted.

I evaluate on java 8.

On Mon, Mar 22, 2021 at 12:56 AM Vishnu @.***> wrote:

Thanks for the info. While evaluating I am getting this error w.r.t to Main.Aspects

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext at gr.ilsp.nlp.semeval.absa.eval.ConsoleAspectsAndCategsExtractionEval.run(ConsoleAspectsAndCategsExtractionEval.java:74) at gr.ilsp.nlp.semeval.absa.eval.ConsoleAspectsAndCategsExtractionEval.main(ConsoleAspectsAndCategsExtractionEval.java:243) at Main.Aspects.main(Aspects.java:9) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXBContext at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) ... 3 more Traceback (most recent call last): File "eval/evaluate_ae.py", line 174, in print(evaluate(args.pred_json, command, template) ) File "eval/evaluate_ae.py", line 158, in evaluate acc=check_output(command ).split() File "/usr/lib/python3.7/subprocess.py", line 411, in check_output **kwargs).stdout File "/usr/lib/python3.7/subprocess.py", line 512, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['java', '-cp', 'eval/eval.jar', 'Main.Aspects', 'data/ae/official_data/laptop_pred.xml', 'data/ae/official_data/Laptops_Test_Gold.xml']' returned non-zero exit status 1.

Can you help me with this. Thanks

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/howardhsu/BERT-for-RRC-ABSA/issues/18#issuecomment-803848299, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRK373XXDXEE24PSGDW54LTE3Z4HANCNFSM4ZMHKZMA .

-- Homepage: https://howardhsu.github.io/ Linkedin: https://www.linkedin.com/in/hu-xu-9852403b/ Google Scholar: https://scholar.google.com/citations?user=SaH2yWMAAAAJ Twitter: https://twitter.com/Hu_Hsu Email: @.***

howardhsu avatar Mar 22 '21 09:03 howardhsu

Thanks a lot for the quick reply. Resolved the problem. Can you explain what is "laptop_pred.xml" which according to the java command should be present along with "Laptops_Test_Gold.xml" and "Laptops_Test_Data_PhaseA.xml" in official_data in ae as it is not mentioned in readme from where we get that. Thanks

vishnu-itachi avatar Mar 22 '21 10:03 vishnu-itachi

put model predictions into a XML file that jar can only read.

On Mon, Mar 22, 2021 at 3:26 AM Vishnu @.***> wrote:

Thanks a lot for the quick reply. Resolved the problem. Can you explain what is "laptop_pred.xml" which according to the java command should be present along with "Laptops_Test_Gold.xml" and "Laptops_Test_Data_PhaseA.xml" in official_data in ae as it is not mentioned in readme from where we get that. Thanks

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/howardhsu/BERT-for-RRC-ABSA/issues/18#issuecomment-803952271, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACRK375OB5UZCJ2KRUBSGQ3TE4LOLANCNFSM4ZMHKZMA .

-- Homepage: https://howardhsu.github.io/ Linkedin: https://www.linkedin.com/in/hu-xu-9852403b/ Google Scholar: https://scholar.google.com/citations?user=SaH2yWMAAAAJ Twitter: https://twitter.com/Hu_Hsu Email: @.***

howardhsu avatar Mar 22 '21 10:03 howardhsu

put model predictions into a XML file that jar can only read. Got it thanks a lot.

vishnu-itachi avatar Mar 22 '21 10:03 vishnu-itachi