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

Make an eval script for SQuaD #285

Closed
chenmoneygithub opened this issue Aug 7, 2022 · 5 comments
Closed

Make an eval script for SQuaD #285

chenmoneygithub opened this issue Aug 7, 2022 · 5 comments
Assignees

Comments

@chenmoneygithub
Copy link
Contributor

From a high level it is just a classification task, but there are some details to handle. The whole workflow can be described as:

  • Data
    1. We can use the SQuaD dataset from tensorflow dataset: link.
    2. Preferably just use V2?
  • Data preprocessing
    1. Add [CLS] token at the start, and [SEP] token between context and answer.
    2. From the given answer_start field, calculate the answer_end value, representing the index of start and end in the context.
    3. Calculate the start and end index in the tokenized context.
    4. Set the three labels: start token index, end token index, impossible (means impossible to find the answer).
  • Classification Head
    1. Takes in the pretrained model output, and outputs 3 things: start token logits/prob (shape=[sequence_length, ]), end token logits/prob (shape=[sequence_length, ]), impossible logits/prob (shape=[1,]).
    2. The structure should be one simple dense layer.
  • Training config
    1. Optimizer: TBD
    2. Learning rate: TBD
    3. Should we use KerasTuner? TBD
@chenmoneygithub chenmoneygithub added type:Bug Something isn't working and removed type:Bug Something isn't working labels Aug 7, 2022
@mattdangerw
Copy link
Member

mattdangerw commented Aug 8, 2022

Is this issue specifically for the BERT example?

@chenmoneygithub
Copy link
Contributor Author

It's for general purpose, I am thinking we should have some components for eval purposes.

@mattdangerw
Copy link
Member

It might be good to build the script specifically for BERT right now, and then shuffle of the components as we get a better understanding of what we need.

@mattdangerw
Copy link
Member

Assigning this to @aflah02 as I think you are the one actively working on this.

@aflah02
Copy link
Collaborator

aflah02 commented Sep 2, 2022

yup thanks!

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

3 participants