dq.set_labels_for_run
def set_labels_for_run(labels: Union[List[str], List[List[str]]]) -> None:
Sets the ordering of the labels for the model's output logits or probabilities.
Arguments | Text |
---|---|
labels | An ordered list of labels ie ['dog','cat','fish'] . This order MUST match the order of probabilities that the model outputs.If this is a multi-label task, then labels are a list of lists where each inner list indicates the label for the given task. The outer order (order of the tasks) must match the task-order of the task-probabilities logged as well. |
Examples:
Typically used after logging your dataset.
import dataquality as dq
dq.set_labels_for_run(['dog','cat','fish'])
# ... Later on the model's output logits must be a vector of length 3 in the above order
Last modified 9mo ago