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

Code Error With AutoLabelingAnnotation VIew Class In Tag V1.4.0 #1375

Closed
hushulong opened this issue May 20, 2021 · 1 comment
Closed

Code Error With AutoLabelingAnnotation VIew Class In Tag V1.4.0 #1375

hushulong opened this issue May 20, 2021 · 1 comment

Comments

@hushulong
Copy link

I was running doccano locally with the version tag v1.4.0,reference pip installation.

I have created sequence labeling project and configured auto labeling settings, i got the error when i was trying auto labeling function on the annotation page:
image

With debug information,i have read source code and found it to be much newer than in previous months,e.g.,document class was replaced by example class, the error code here:
image
image

I'm not familiar with fork and pull request,so i create this, and the master branch code is still wrong when i submit this issues report.

Please repair and create a new tag as soon as possible.


Your Environment

  • Operating System: Ubuntu18.04
  • Python Version Used: Python3.8.5
  • When you install doccano: V1.4.0
  • How did you install doccano (Heroku button etc): pip install doccano
@hushulong
Copy link
Author

I found another area (still in auto_labeling.py AutoLabelingAnnotation Class)that needed to be modified when i changed the above code error and ran it again.
image

the right code such as:

def transform(self, labels):
    project = get_object_or_404(Project, pk=self.kwargs['project_id'])
    for label in labels:
        label['example'] = self.kwargs['doc_id']
        if 'label' in label:
            label['label'] = project.labels.get(text=label.pop('label')).id
    return labels

then, auto labeling is running well.
image

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

No branches or pull requests

2 participants