Commit 7bf4fe70 by ccran

feat: update config;

parent dd919218
...@@ -59,7 +59,7 @@ FILE_SUFFIX = "-审核批注" ...@@ -59,7 +59,7 @@ FILE_SUFFIX = "-审核批注"
use_non_fastgpt_llm = True use_non_fastgpt_llm = True
use_lufa = False use_lufa = False
use_jp_machine = True use_jp_machine = True
debug_mode = False debug_mode = True
## 关键参数** ## 关键参数**
max_model_len = 131072 max_model_len = 131072
......
...@@ -23,7 +23,7 @@ def get_params(): ...@@ -23,7 +23,7 @@ def get_params():
return { return {
"suffix": "_麓发迁移", "suffix": "_麓发迁移",
"batch_size": batch_size, "batch_size": batch_size,
"batch_input_dir_path": "jp-input", "batch_input_dir_path": "/data/home/htsc/jp-contract/data/batch/jp-temp",
"batch_output_dir_path": f"/data/home/htsc/jp-contract/data/benchmark/results/jp-output-{output_suffix}", "batch_output_dir_path": f"/data/home/htsc/jp-contract/data/benchmark/results/jp-output-{output_suffix}",
# 金盘fastgpt接口 # 金盘fastgpt接口
"url": "http://172.21.107.45:3002/api/v1/chat/completions", "url": "http://172.21.107.45:3002/api/v1/chat/completions",
......
...@@ -500,7 +500,7 @@ def parse_args() -> argparse.Namespace: ...@@ -500,7 +500,7 @@ def parse_args() -> argparse.Namespace:
parser = argparse.ArgumentParser(description="Loop batch/eval and optimize data/rules.xlsx with LLM.") parser = argparse.ArgumentParser(description="Loop batch/eval and optimize data/rules.xlsx with LLM.")
parser.add_argument("--rules-file", type=Path, default=DEFAULT_RULES_FILE) parser.add_argument("--rules-file", type=Path, default=DEFAULT_RULES_FILE)
parser.add_argument("--report-file", type=Path, default=DEFAULT_REPORT_FILE) parser.add_argument("--report-file", type=Path, default=DEFAULT_REPORT_FILE)
parser.add_argument("--rounds", type=int, default=1) parser.add_argument("--rounds", type=int, default=5)
parser.add_argument("--f1-threshold", type=float, default=0.9) parser.add_argument("--f1-threshold", type=float, default=0.9)
parser.add_argument("--example-limit", type=int, default=20) parser.add_argument("--example-limit", type=int, default=20)
parser.add_argument("--max-workers", type=int, default=DEFAULT_MAX_WORKERS) parser.add_argument("--max-workers", type=int, default=DEFAULT_MAX_WORKERS)
......
...@@ -48,6 +48,9 @@ class ExcelUtil: ...@@ -48,6 +48,9 @@ class ExcelUtil:
wb = openpyxl.load_workbook(self.file_path, data_only=True, read_only=True) wb = openpyxl.load_workbook(self.file_path, data_only=True, read_only=True)
except Exception as exc: except Exception as exc:
raise ExcelLoadError(f"Failed to open Excel file: {exc}") from exc raise ExcelLoadError(f"Failed to open Excel file: {exc}") from exc
if sheet_name and sheet_name not in wb.sheetnames:
return [] # Return empty if specified sheet is not found
ws = wb[sheet_name] if sheet_name else wb.active ws = wb[sheet_name] if sheet_name else wb.active
rows = list(ws.iter_rows(values_only=True)) rows = list(ws.iter_rows(values_only=True))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment