Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
youdonghai committed Feb 13, 2025
1 parent 8117f83 commit f8a5b27
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
8 changes: 4 additions & 4 deletions kag/examples/TableEval/kag_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ log:

project:
biz_scene: table
#host_addr: http://127.0.0.1:8887
#id: '2'
host_addr: http://antspg-gz00b-006000164057.sa128-sqa.alipay.net:8887
id: '3500002'
host_addr: http://127.0.0.1:8887
id: '2'
#host_addr: http://antspg-gz00b-006000164057.sa128-sqa.alipay.net:8887
#id: '3500002'
language: en
namespace: TableEval
#------------project configuration end----------------#
Expand Down
19 changes: 12 additions & 7 deletions kag/examples/TableEval/solver/finqa.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ def getBenchMark(self, predictionlist: List[str], goldlist: List[str]):
def is_close_rel(self, a, b, rel_tol=1e-9):
return abs(a - b) < rel_tol * max(abs(a), abs(b))

import kag.examples.FinState.builder_component.table_and_text_extractor
import kag.examples.FinState.builder_component.table_classify_prompt
import kag.examples.FinState.builder_component.table_context_prompt
import kag.examples.FinState.builder_component.table_keywords_prompt
import kag.examples.FinState.builder_component.table_reformat_prompt

if __name__ == "__main__":
if RUN_ENV is None:
module_path = "/Users/youdonghai/code/KAG_ant/dep/KAG/kag/examples/FinState/builder_component"
else:
module_path = "/ossfs/workspace/KAG/dep/KAG/kag/examples/FinState/builder_component"
import_modules_from_path(module_path)
_data_list = load_finqa_data()
evaObj = MultiHerttEvaluate()
total_metrics = {
Expand All @@ -140,10 +140,15 @@ def is_close_rel(self, a, b, rel_tol=1e-9):
if debug_index is not None:
if i != debug_index:
continue
build_finqa_graph(_item)
_question = _item["qa"]["question"]
_gold = _item["qa"]["answer"]
_prediction = qa(question=_question)
try:
build_finqa_graph(_item)
_prediction = qa(question=_question)
except KeyboardInterrupt:
break
except:
_prediction = str(None)
print("#" * 100)
print(
"index="
Expand Down

0 comments on commit f8a5b27

Please sign in to comment.