explosion / spaCy

💫 Industrial-strength Natural Language Processing (NLP) in Python
https://spacy.io
MIT License
29.65k stars 4.36k forks source link

Training Config Widget gives duplicate optimizer lines #9348

Open demongolem-biz opened 2 years ago

demongolem-biz commented 2 years ago

I am going through the process of creating a custom ner model after having converted my annotated files to spaCy format. I am using the widget at the relevant spaCy site. When I go select my settings (English, ner only, CPU, accuracy), I get two optimizers lines such that the config file generated will give an error configparser.DuplicateSectionError when I go to train

demongolem-biz commented 2 years ago

Actually training.batcher, traning.batcher.size, and initialize are also repeated. It is as if they want to give me the options for both efficiency and accuracy.

svlandeg commented 2 years ago

I'm a little puzzled, because I can't actually reproduce this. We don't normally ask this, but can you provide a screenshot showing the duplicate section and the options that were selected?

demongolem-biz commented 2 years ago

It is really weird. I clicked on a link from a "towardsdatascience" article which took me to the page. I am using latest Chrome on RHEL 7.6. When I select Language, Components, Hardware, Optimized For the display does not update correctly. Sort of like it is not responding to these button events, but the on-screen display is like selectively responding to button events. In this case, if I were to click the copy code to clipboard at the bottom right and paste, what we would expect is pasted into a text editor or whatever.

If I on the other hand go directly to the spacy site, I can see the display updating correctly.

Here is a screenshot of the display out of sync with the selections that the user has made.

SpacyConfigWidget

svlandeg commented 2 years ago

Huh. What is the link you used?

demongolem-biz commented 2 years ago

Link is https://spacy.io/usage/training#config

It can be found at https://towardsdatascience.com/using-spacy-3-0-to-build-a-custom-ner-model-c9256bea098 .

That is the path I took where I noticed the widget not updating dynamically as settings were changed.

On Sun, Oct 3, 2021 at 4:15 PM Sofie Van Landeghem @.***> wrote:

Huh. What is the link you used?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/explosion/spaCy/issues/9348#issuecomment-933018386, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATBXGBKAGFKLOBAX5PJ2BGTUFC2XRANCNFSM5FEQLGCQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

polm commented 2 years ago

Checking this again, I am able to reproduce this. The way it works is a little subtle, though I think you mentioned it above.

  1. It's fine if you click the Download button.
  2. It's fine if you click the Copy button at the bottom right.
  3. The actual content displayed on screen has duplicate sections, and if you highlight and copy it will be wrong.

I have no idea why this would happen, but since we can reproduce it we can look at fixing it.

I'm using Chrome and there's no related output in my console.