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

Using pre-trained model example not working #37

Closed
YoannMR opened this issue Jul 16, 2017 · 7 comments
Closed

Using pre-trained model example not working #37

YoannMR opened this issue Jul 16, 2017 · 7 comments
Labels

Comments

@YoannMR
Copy link

YoannMR commented Jul 16, 2017

Hi,

Thanks a lot for the model and the code! They are very useful.

I'm trying to re-use the conll-2003 pre-trained model like in the example, using the example files in the same folder path (..\data\example_unannotated_texts\deploy).

with: dataset_text_folder = ../data/example_unannotated_texts

while the text files to be annotated are in ..\data\example_unannotated_texts\deploy

The output text file is empty, and the loading shows that it found no tokens.

I tried running it from dataset_text_folder = ../data/example_unannotated_texts/deploy instead, but then I get an error message (assertion error) saying that the tag is not 'O' (from the remove BIO function).

I also get an error message from spacy (asking to download the 'en' data from it first, which I did a few times already) the first time I run the code on the data to annotate. If I run it a second time, it then runs but the spacy file created during the first run is empty (which I believe is the problem).

Thanks for your help!
Yoann

@YoannMR
Copy link
Author

YoannMR commented Jul 16, 2017

My bad!

I checked a second time the spacy 'en' install and there was an error message. Re-running it with admin rights fixed it and it now works great.

Thanks again for the tool!

Next step would be to figure out how to run it in a more 'production-like' way (ie: give it a pipe line of text files to annotates).

Let me know if that's something you already worked on.

@YoannMR YoannMR closed this as completed Jul 16, 2017
@Franck-Dernoncourt
Copy link
Owner

Next step would be to figure out how to run it in a more 'production-like' way (ie: give it a pipe line of text files to annotates).

Separating the initialization and the predicting part was done on the series of commits on Jul 11, 2017. Did you clone the repo before?

@YoannMR
Copy link
Author

YoannMR commented Jul 16, 2017

Thanks a lot for your quick answer!

I updated it yesterday (still need to figure out the updates).

Has it been documented how to use the separation between initialization and prediction parts?

@Franck-Dernoncourt
Copy link
Owner

Has it been documented how to use the separation between initialization and prediction parts?

Good point, sorry about that, we should! In todo list :-)

@YoannMR
Copy link
Author

YoannMR commented Jul 17, 2017

Thanks again for your answer!

by the way, I'm noticing some training differences between the two versions.

On the older versions, training has more noise (larger variations) hence requiring a lower learning rate for the SGD (ex. 0.001 vs 0.005) compared to the newer version.

Do you happen to know where it may be coming from?

I see that gradient clipping is now a parameter. Was it used on the previous version? If so, what was the value? I suspect that it could be causing part of the differences but a quick scan through the code did not reveal it.

@Franck-Dernoncourt
Copy link
Owner

I see that gradient clipping is now a parameter. Was it used on the previous version?

It was (e.g. May 11

gradient_clipping_value = 5.0
).

I'll let you know if I can think of any difference that the new commits may have introduced.

@YoannMR
Copy link
Author

YoannMR commented Jul 17, 2017

Thanks.

It was not among the parameters that were pre-defined in the parameters.ini file that I was using in the previous version so I thought it might be different.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants