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

Include annotator names or unique IDs in label field #2329

Open
Zeen0 opened this issue Mar 5, 2024 · 3 comments
Open

Include annotator names or unique IDs in label field #2329

Zeen0 opened this issue Mar 5, 2024 · 3 comments

Comments

@Zeen0
Copy link

Zeen0 commented Mar 5, 2024

Feature description

When exporting annotations made by multiple annotators on a single project, there is no way to discern who made which annotation. This would allow for projects to be more centralized for downstream tasks.

I notice that in the admin panel the names user IDs are associated with spans, but not in data export.

Copy link

github-actions bot commented Mar 5, 2024

Would you write your environment? Thank you!

@Zeen0
Copy link
Author

Zeen0 commented Mar 5, 2024

v1.8.4

@Zeen0
Copy link
Author

Zeen0 commented Mar 5, 2024

class Labels(abc.ABC):
    label_class = ExportedLabel
    column = "labels"
    fields: Tuple[str, ...] = ("example", "label")  # To boost performance

    def __init__(self, examples: QuerySet[ExportedExample], user=None):
        self.label_groups = defaultdict(list)
        labels = self.label_class.objects.filter(example__in=examples)
        if user:
            labels = labels.filter(user=user)
        for label in labels.select_related(*self.fields):
            self.label_groups[label.example.id].append(label)

    def find_by(self, example_id: int) -> Dict[str, List[ExportedLabel]]:
        return {self.column: self.label_groups[example_id]}

It looks like this might exist in the form of user binary, but can't seem to find any settings in /admin/ or the UI to activate it.

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

1 participant