From 727e2a1288b9d46225a0b7ece1fd502259e50707 Mon Sep 17 00:00:00 2001 From: makseq-ubnt Date: Thu, 3 Oct 2024 19:57:03 +0100 Subject: [PATCH] fix: Gliner bug in training --- label_studio_ml/examples/gliner/model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/label_studio_ml/examples/gliner/model.py b/label_studio_ml/examples/gliner/model.py index b63311426..90e719f48 100644 --- a/label_studio_ml/examples/gliner/model.py +++ b/label_studio_ml/examples/gliner/model.py @@ -239,9 +239,9 @@ def fit(self, event, data, **kwargs): tokens, ner = self.process_training_data(task) training_data.append({"tokenized_text": tokens, "ner": ner}) + from_name, to_name, value = self.label_interface.get_first_tag_occurence('Labels', 'Text') eval_data = { - "entity_types": sorted(self.label_interface.get_tag(from_name).labels) -, + "entity_types": sorted(self.label_interface.get_tag(from_name).labels), "samples": training_data[:10] }