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

Fixing a 'key' error and an import error #8

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

HAMZA310
Copy link

@HAMZA310 HAMZA310 commented Mar 29, 2021

When I tried to reproduce the results in ner.py file, I had to fix two errors. One of them was a typo. Specifically, each completion (item) in fit method expects key 'annotations' (not 'completions') and that's what the author had intended.
The other fix I had to make was not so obvious. Specifically, I see an import error with LabelStudioMLBase and changing the module it was importing form fixed the error. I learned this by seeing a couple of other label-studio code examples.
I've not used bert.py file, and can't speak for these fixes in that file.

Fixed a typo. Each completion (item) has 'annotations' not 'completions' . The code breaks with item['completions'] and works smooth with item['annotations'].
_LabelStudioMLBase_ could not be imported from _label_studio.ml_. Seeing a couple of other similar code examples on label-studio, I learned that import from _label_studio_ml.model_ works.
@HAMZA310 HAMZA310 changed the title Fixing a typo and an import error Fixing a 'key' error and an import error Mar 29, 2021
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.

1 participant