Use individual spaCy with transformer backbones for all NER models #335
Comments
As this issue is addressed, there is also the following action to be done (see also PR #345).
|
Hello @FrancescoCasalegno, Before moving further with this task, I think some points should be clarified:
|
All points above, except the following one, are independent of implementation constraints. For the following point, some implementation constraints could apply (tested on
I have investigated. Technically, this is possible to reuse from
The trained ➡️ I will post on Monday a performance (entity F1) comparison between reusing or not the |
TL;DRIn the context of the experiment (see Methods below), re-using ResultsThe pipeline MethodPerformance scores are from Both pipelines use the Pipeline B uses |
Let's try to do so, unless some logical steps can be isolated (see also next point).
Let's try to keep using
Let's first try to implement the following points:
Based on the results shown here and the discussion with the team, let's stick with a brand new pipeline. This is easier and also seems to provide better F1 score.
Yes, let's wait for #343 and #337 to be done!
Convention we agreed upon is:
How long do the |
With the exact same settings, training on CPU (80 cores) is It takes 2.840 secs / step on CPU while it takes 0.6005 sec / step on GPU. |
UPDATE Create one While working on the task (see previous line), I have noticed several issues with the annotations:
|
UPDATE Automate analysis of annotations I have made a code ( The goal is to Note for both sections below: Here is the for all the annotation files used for training and evaluation
Here is an python analyze.py --verbose annotations5_EmmanuelleLogette_2020-06-30_raw2_Disease.jsonl
|
UPDATE Analyze the annotations to define cleaning rules (for the next line). Here is:
Case 1 - Ignored texts (w/o and w/ spans)Causes:
Case 2 - Duplicated
|
Hello @FrancescoCasalegno, The evaluation is crashing. After investigation, the bug was introduced by #348. Would you know why? The bug:
To reproduce:
|
Hello @FrancescoCasalegno, I have 1) merged #362 on top of #351 and 2) locally removed the fix The evaluation stage worked! Thank you 🎉 NB: For practical reasons, I keep |
Hello @FrancescoCasalegno, Could you confirm your position on the following points for #351?
Regarding point 3: |
Hi! Here are my 2 cents. The following points are what I think we should keep in mind.
Given those points:
Not sure this would be good. Because we would need to modify the
I don't think this really matters, or does it? Results should be the same on CPU and GPU, and moreover the runtime should be irrelevant in both cases.
I see our re-occurring nightmare here 😁 Sure, |
Thank you very much for the clarifications!
So, should we mark #351 as Otherwise, I have updated the TODO list of #351 to:
Yes, using the revision in the Dockerfile for DVC is a nightmare. Maybe we could come up with something easier. |
🚀 Feature
In light of what we discussed in PR #328, and in particular looking at the results shown in this comparison table, we should operate the following changes to the NER models in
data_and_models/pipelines/ner
.transformer
backbone. Now they are usingtok2vec
.CORD19 NLI+STS v1
. Also, the weights should not be frozen during the fine-tuning on the NER task.model2
is used to extract 3 different entity types (see table here).add_er.py
, then in the future we'll improve that with Migrate add_er to spacy train and config.cfg #310).The text was updated successfully, but these errors were encountered: