label-studio-transformers icon indicating copy to clipboard operation
label-studio-transformers copied to clipboard

Fixing a 'key' error and an import error

Open HAMZA310 opened this issue 3 years ago • 0 comments

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.

HAMZA310 avatar Mar 29 '21 04:03 HAMZA310