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

bugs with multiple NERAnnotators per process space #675

Merged
merged 6 commits into from
Aug 3, 2018

Conversation

cowchipkid
Copy link
Contributor

There were some bugs with NER model loading, and all annotators were sharing the same NER model.

@cowchipkid cowchipkid requested review from mssammon and nitishgupta and removed request for mssammon August 2, 2018 19:19
@cowchipkid cowchipkid self-assigned this Aug 2, 2018
@nitishgupta nitishgupta requested review from danyaljj and mssammon and removed request for nitishgupta August 2, 2018 19:24
@nitishgupta
Copy link
Member

Build is failing, btw. @cowchipkid

@cowchipkid
Copy link
Contributor Author

cowchipkid commented Aug 2, 2018 via email

Copy link
Contributor

@mssammon mssammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@nitishgupta
Copy link
Member

@cowchipkid: looks like there was some orthogonal update to NER which now causes two (simple) merge conflicts. Could you please have a look?

@mssammon: Can we merge this after Tom fixes the merge request?

@mssammon
Copy link
Contributor

mssammon commented Aug 3, 2018

@nitishgupta yes, just waiting for conflict resolution.

@cowchipkid
Copy link
Contributor Author

@danyaljj This is ready to merge, can you put your OK on it and merge?

Copy link
Contributor

@mssammon mssammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: did you fix the bash script that was calling Yourkit?

@cowchipkid
Copy link
Contributor Author

@danyaljj @mssammon I've updated to version 4.0.12, fixed runNER so when tests complete, we are good.

Copy link
Contributor

@mssammon mssammon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great. Thanks.

@mssammon
Copy link
Contributor

mssammon commented Aug 3, 2018

Can merge when CI build finishes/shows green.

@nitishgupta
Copy link
Member

nitishgupta commented Aug 3, 2018

@cowchipkid I'm assuming you've tested multiple Annotators with different models running simultaneously. I have a question regarding the shared config you mentioned yesterday. What does that entail? How do we change the config programmatically when initializing the Annotators? What are the configs we can change, and what are their possible values? Sorry, if this information is listed somewhere, but a quick read through the README didn't give me much info.

@cowchipkid
Copy link
Contributor Author

@nitishgupta Yes, different annotators will not use different models stored as fields of the NERAnnotator as they did before. However, other configuration properties like the one that enables the use of the level 2 model, the one that breaks sentences on newlines and so on are all shared. And there is nothing you can do about it. Wish I had a better answer for you, if it were easy, I would just make the config class factory provided keyed on view name. But that's not a one day job, as some of the low level feature generators use these configuration properties and feature generators do not have access to the view name.

@danyaljj
Copy link
Member

danyaljj commented Aug 3, 2018

Looks good to me. Merge when you feel happy about it.

@cowchipkid cowchipkid merged commit 99971bd into CogComp:master Aug 3, 2018
@nitishgupta
Copy link
Member

nitishgupta commented Aug 3, 2018

@cowchipkid Thanks for your response.! I think I understand your point. Is there still a way to find out what the modifiable config parameters are, their possible values, and how to change them programmatically?

@cowchipkid
Copy link
Contributor Author

@nitishgupta All these properties are defined in a ParametersForLbjCode, all these properties are static fields of this class, and a static embedded properties class. From where I sit, coming up with a good solution that works consistently is the most expedient way to fix this, it is impossible for multiple annotators to share static variables without tons of monitor locks, defeating the usefulness of multi-threading. I believe a much better solution is to completely re-architect this properties container, rather than a singleton, build a factory interface to serve up instances per annotator. The only quandary is then how the low level feature generators can share a key with the annotator to fetch the instance of the properties from the factory. If I had more time, I could fix this, but alas my last day...

@nitishgupta
Copy link
Member

Okay, got it. Thank you.

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

Successfully merging this pull request may close these issues.

4 participants