Skip to content

Commit 41015a2

Browse files
refactor: refactor proj structure & configs
1 parent a257246 commit 41015a2

File tree

9 files changed

+13
-11
lines changed

9 files changed

+13
-11
lines changed

examples/evaluate/evaluate_kg/kg_evaluation_config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,6 @@ nodes:
4040
- build_kg
4141
params:
4242
metrics:
43+
- kg_accuracy
44+
- kg_consistency
45+
- kg_structure

examples/evaluate/evaluate_qa/qa_evaluation_config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ nodes:
7474
execution_params:
7575
replicas: 1
7676
batch_size: 128
77+
save_output: true
7778
params:
7879
method: aggregated # atomic, aggregated, multi_hop, cot, vqa
7980
data_format: ChatML # Alpaca, Sharegpt, ChatML
@@ -86,5 +87,10 @@ nodes:
8687
execution_params:
8788
replicas: 1
8889
batch_size: 128
90+
save_output: true
8991
params:
9092
metrics:
93+
- qa_length
94+
- qa_mtld
95+
- qa_reward_score
96+
- qa_uni_score
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
from .kg_quality_evaluator import KGQualityEvaluator
2-
from .length_evaluator import LengthEvaluator
3-
from .mtld_evaluator import MTLDEvaluator
4-
from .reward_evaluator import RewardEvaluator
5-
from .uni_evaluator import UniEvaluator
1+
from graphgen.models.evaluator.kg.kg_quality_evaluator import KGQualityEvaluator
2+
from graphgen.models.evaluator.qa.uni_evaluator import UniEvaluator

graphgen/models/evaluator/kg_quality_evaluator.py renamed to graphgen/models/evaluator/kg/kg_quality_evaluator.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ def evaluate_all(self) -> Dict[str, Any]:
7676

7777
try:
7878
logger.info("Starting structural robustness evaluation...")
79-
structure_evaluator = StructureEvaluator(
80-
graph_storage=self.graph_storage
81-
)
79+
structure_evaluator = StructureEvaluator(graph_storage=self.graph_storage)
8280
results["structure"] = structure_evaluator.evaluate()
8381
except Exception as e:
8482
logger.error(f"Structural evaluation failed: {e}")
@@ -105,7 +103,5 @@ def evaluate_consistency(self) -> Dict[str, Any]:
105103
return consistency_evaluator.evaluate()
106104

107105
def evaluate_structure(self) -> Dict[str, Any]:
108-
structure_evaluator = StructureEvaluator(
109-
graph_storage=self.graph_storage
110-
)
106+
structure_evaluator = StructureEvaluator(graph_storage=self.graph_storage)
111107
return structure_evaluator.evaluate()

graphgen/models/evaluator/qa/__init__.py

Whitespace-only changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)