chiayewken / Span-ASTE

Code Implementation of "Learning Span-Level Interactions for Aspect Sentiment Triplet Extraction".
MIT License
169 stars 45 forks source link

Train model for new data collected from social media #20

Closed Lafandi closed 2 years ago

Lafandi commented 2 years ago

Hi, I would like to train this model in a new dataset with another language "Bahasa" as aspects and opinions of them, especially in social media textual data, constitute a span of words with multiple lengths. How to execute the file accordingly?

chiayewken commented 2 years ago

Hi, first you need to tokenize the sentences into separated words and follow the annotation format guide and sample data file. For the model training stage and prediction stage, you can change the path_train, path_dev and path_test to point to your data files.

Lafandi commented 2 years ago

Hi, first you need to tokenize the sentences into separated words and follow the annotation format guide and sample data file. For the model training stage and prediction stage, you can change the path_train, path_dev and path_test to point to your data files.

Thank you for your guidance. I am new to data science; thank you, Sire, for your haste reply.

Lafandi commented 2 years ago

Hi, Dr. Chia greetings, :)

May I know if there is gonna be a maximum span limit for any aspect or opinion?

Thanks in advance, Regards.

On Fri, Sep 23, 2022 at 5:00 PM Chia Yew Ken @.***> wrote:

Closed #20 https://github.com/chiayewken/Span-ASTE/issues/20 as completed.

— Reply to this email directly, view it on GitHub https://github.com/chiayewken/Span-ASTE/issues/20#event-7445636231, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU2ME2WOYZBNKSTKHQT3J4TV7VWSNANCNFSM5ZPR3F6A . You are receiving this because you authored the thread.Message ID: @.***>

chiayewken commented 2 years ago

Hi, you can change the span width limit here: https://github.com/chiayewken/Span-ASTE/blob/28ac2e09b82b37bf12f4aefca903bf03e19080ad/training_config/config.jsonnet#L8

Lukafandi commented 2 years ago

Thank you... while going through all the closed and opened issues

I think I ran into similar issues with rdyzakya... I think something more need to be done when changing the pretrain model.

I ran the sample data given with another bert(bert-base-multilingual-cased).

predout.json will not be generated.

image image

In standard execution it will continue with trainer.optimizer.type however by changing the model it stop in a step prior to that which is trainer.trainer_callbacks = None

In the mean time ill keep trying to understand allennlp module...

chiayewken commented 2 years ago

Hi, for easier debugging, you can git pull the latest commit 16c7937 which allows you to debug into the specific allennlp code which caused the error. Take note that you also need to update the git commit version in the top notebook cell and train the model from scratch, hope it helps!

Lukafandi commented 2 years ago

Well billion gratitude now it worked and I just noticed the needs to update the commit version in notebook. It does help us to get around. Another error occurred but I guess it involving those who would love run the system using the pretrained SpanModel weights for prediction section.

image

For a full error I would have to click the hidden frame, but just doing my best.

image