Skip to content

Commit 9b541c5

Browse files
committed
fix(metric_helper): correct trajectory save path and add tool call metric
- Change trajectory save directory from "ctx_trackers" to "trajectory" to organize files better - Add recording of tool call counts alongside error rates in tool metrics - Update experiment suffix in deep finance example script for clearer naming convention
1 parent 3c85960 commit 9b541c5

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

ajet/utils/metric_helper/save_trajectory_as_json.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def save_trajectory_as_json(ctx_trackers, global_steps, prefix="train"):
4040
# Define save directory and file path
4141
traj_save_dir = os.path.join(
4242
os.environ.get("BEST_LOGGER_PATH", "launcher_record"),
43-
"ctx_trackers",
43+
"trajectory",
4444
prefix,
4545
f"step_{global_steps}"
4646
)

ajet/utils/metric_helper/tool_metric_helper.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ def compute_tool_metrics(tool_stats_list: List[Dict[str, Any]], prefix: str = ""
125125
if calls > 0:
126126
error_rate = errors / calls * 100
127127
metrics[f"{prefix}tool_error/{tool_name}/error_rate"] = round(error_rate, 2)
128+
metrics[f"{prefix}tool_error/{tool_name}/calls"] = calls
128129

129130

130131
return metrics

tutorial/example_deep_finance/deep_finance.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33
#===============================================================================
44
# 1. 配置区域 - 用户只需修改这里
55
#===============================================================================
6-
SUFFIX="ajet_deep_finance" # 实验后缀,影响所有日志和实验名称
6+
SUFFIX="deep_finance" # 实验后缀,影响所有日志和实验名称
77
PREFIX="open" # 实验前缀,影响日志和实验所在文件夹
88

99
# OpenJudge 模型配置

0 commit comments

Comments
 (0)