Spaces:
Sleeping
Sleeping
Ahmet Kaan Sever
commited on
Commit
·
ea93485
1
Parent(s):
f3676ca
Disabled some tasks
Browse files
src/deepeval/deepeval_task_manager.py
CHANGED
@@ -23,16 +23,16 @@ class Task(Enum):
|
|
23 |
SENTIMENT_ANALYSIS = "sentiment_analysis_tr"
|
24 |
TURKISH_GENERAL_KNOWLEDGE = "turkish_general_knowledge"
|
25 |
SUMMARIZATION = "summarization_tr"
|
26 |
-
FAITHFULNESS = "sosyoloji_faithfulness"
|
27 |
-
TOXICITY = "sosyoloji_toxicity"
|
28 |
-
BIAS = "sosyoloji_bias"
|
29 |
-
INSTRUCTION_FOLLOWING = "instruction_following_tr"
|
30 |
-
READING_COMPREHENSION = "reading_comprehension_mc"
|
31 |
-
READING_COMPREHENSION_OE = "reading_comp_oe"
|
32 |
-
COMMONSENSE_REASONING = "commonsense_reasoning"
|
33 |
-
COMPLEX_REASONING = "complex_reasoning"
|
34 |
-
TRUTHFULNESS = "sosyoloji_truthfulness"
|
35 |
-
NLI = "nli"
|
36 |
|
37 |
|
38 |
class DeepEvalTaskManager:
|
@@ -45,9 +45,13 @@ class DeepEvalTaskManager:
|
|
45 |
"""Validate user tasks and store method references."""
|
46 |
print(self.available_tasks.keys())
|
47 |
print(user_tasks)
|
48 |
-
|
49 |
-
|
50 |
-
|
|
|
|
|
|
|
|
|
51 |
|
52 |
# Store actual method references instead of strings
|
53 |
return {task : self.available_tasks[task] for task in user_tasks}
|
|
|
23 |
SENTIMENT_ANALYSIS = "sentiment_analysis_tr"
|
24 |
TURKISH_GENERAL_KNOWLEDGE = "turkish_general_knowledge"
|
25 |
SUMMARIZATION = "summarization_tr"
|
26 |
+
#FAITHFULNESS = "sosyoloji_faithfulness"
|
27 |
+
#TOXICITY = "sosyoloji_toxicity"
|
28 |
+
#BIAS = "sosyoloji_bias"
|
29 |
+
#INSTRUCTION_FOLLOWING = "instruction_following_tr"
|
30 |
+
#READING_COMPREHENSION = "reading_comprehension_mc"
|
31 |
+
#READING_COMPREHENSION_OE = "reading_comp_oe"
|
32 |
+
#COMMONSENSE_REASONING = "commonsense_reasoning"
|
33 |
+
#COMPLEX_REASONING = "complex_reasoning"
|
34 |
+
#TRUTHFULNESS = "sosyoloji_truthfulness"
|
35 |
+
#NLI = "nli"
|
36 |
|
37 |
|
38 |
class DeepEvalTaskManager:
|
|
|
45 |
"""Validate user tasks and store method references."""
|
46 |
print(self.available_tasks.keys())
|
47 |
print(user_tasks)
|
48 |
+
|
49 |
+
try:
|
50 |
+
if not set(user_tasks).issubset(self.available_tasks.keys()):
|
51 |
+
invalid_tasks = set(user_tasks) - self.available_tasks.keys()
|
52 |
+
raise ValueError(f"Invalid task(s) requested: {invalid_tasks}")
|
53 |
+
except Exception as e:
|
54 |
+
print(f"Error: {e}")
|
55 |
|
56 |
# Store actual method references instead of strings
|
57 |
return {task : self.available_tasks[task] for task in user_tasks}
|