pcs-annotator 0.1.6__tar.gz → 0.1.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pcs-annotator
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Summary: A Python library for classification tasks using multiple LLMs
5
5
  Project-URL: Homepage, https://github.com/salsina/PCS-Python-Library
6
6
  Project-URL: Issues, https://github.com/salsina/PCS-Python-Library/issues
@@ -53,7 +53,7 @@ class LLM:
53
53
 
54
54
  model = HuggingFaceEndpoint(
55
55
  repo_id=self.model_name,
56
- task="conversational",
56
+ # task="conversational",
57
57
  temperature=0.1,
58
58
  huggingfacehub_api_token=self.key,
59
59
  )
@@ -186,7 +186,7 @@ class PCS:
186
186
 
187
187
  num_labels = len(possible_labels)
188
188
  pcs_labels = np.zeros(num_labels)
189
-
189
+
190
190
  for i in range(len(w_llms)):
191
191
  pcs_label_llm = np.zeros(num_labels)
192
192
  for j in range(len(llm_labels[i])): #Iterate through MR labels
@@ -413,6 +413,11 @@ class PCS:
413
413
  text_mr1 = self.textMutator.MutateText(text=text, mr="passive_active")
414
414
  text_mr2 = self.textMutator.MutateText(text=text, mr="double_negation")
415
415
  text_mr3 = self.textMutator.MutateText(text=text, mr="synonym")
416
+ print("text", text)
417
+ print("text_mr1", text_mr1)
418
+ print("text_mr2", text_mr2)
419
+ print("text_mr3", text_mr3)
420
+
416
421
  llm_preds = []
417
422
  for annotator in self.annotators:
418
423
  annotations = []
@@ -421,7 +426,7 @@ class PCS:
421
426
  annotations.append(annotator.annotate(text_mr2)[0])
422
427
  annotations.append(annotator.annotate(text_mr3)[0])
423
428
  llm_preds.append(annotations)
424
-
429
+ print("llm_preds", llm_preds)
425
430
  confidences = self.get_pcs_label(llm_preds)
426
431
  label_confidences = {}
427
432
  for i in range(len(self.possible_labels)):
@@ -5,7 +5,7 @@ build-backend = "hatchling.build"
5
5
 
6
6
  [project]
7
7
  name = "pcs-annotator"
8
- version = "0.1.6"
8
+ version = "0.1.8"
9
9
  authors = [
10
10
  { name = "Sina Salimian", email = "sina99.sn@gmail.com" }
11
11
  ]
File without changes
File without changes