argilla-io / argilla

Argilla is a collaboration tool for AI engineers and domain experts to build high-quality datasets
https://docs.argilla.io
Apache License 2.0
3.89k stars 365 forks source link

[TextClassification] Logged predictions are not shown in Annotate mode #1154

Closed dcfidalgo closed 2 years ago

dcfidalgo commented 2 years ago

Describe the bug The logged predictions do not show up in annotate mode for textclassification records.

To Reproduce

import rubrix as rb

records = []
for example in to_label1.shuffle():
    record = rb.TextClassificationRecord(
        inputs=example["text"],
        metadata={'category': example['label']}, # log the intents for exploration of specific intents
        prediction=[(pred['label'], pred['score']) for pred in example['predictions']],
        prediction_agent="distilbert-base-uncased-finetuned-sst-2-english"
    )
    records.append(record)

rb.log(name='labeling_with_pretrained', records=records)

Basically the first part of our first tutorial.

Expected behavior Predictions should show up in annotate mode.

Screenshots Screenshot from 2022-02-15 11-35-11

Environment (please complete the following information):

Additional context

dcfidalgo commented 2 years ago

my mistake! I forgot to build the frontend ...