You need to enable JavaScript to run this app.
文档中心
火山方舟

火山方舟

复制全文
下载 pdf
管理模型精调
查询精调效果指标详细数据
复制全文
下载 pdf
查询精调效果指标详细数据
POST https://ark.cn-beijing.volcengineapi.com/?Action=GetModelCustomizationJobMetricData&Version=2024-01-01​
查询精调效果指标详细数据接口,用于获取模型精调任务在训练过程中的效果指标(如 train/loss、eval/loss 等)的打点数据。​
说明​
  • 指标数据按训练 Step 采样返回;当指定的 MinSampleStep 大于系统根据 MaxMetricPoint 计算出的步长时,以 MinSampleStep 为准。​
  • 单次请求每个指标最多返回 MaxMetricPoint 个采样点,超出范围将自动降采样。​
  • 指标数据仅在任务结束后保留有限时间,过期任务的指标可能无法查询。​
鉴权​
本接口支持鉴权方式如下,详情请参见 Base URL 及鉴权。​
  • Access Key 鉴权,请在 Access Key 管理 页面,获取 Access Key。本接口仅支持 Access Key 鉴权。​
​​
请求参数​
Body 参数​
FromStep integer 必选 | 查询的起点 step​
​
Metrics string[] 必选 | 指标名称列表​
​
ModelCustomizationJobId string 必选 | 精调任务 ID​
​
ToStep integer 必选 | 查询的终点 step​
​
MaxMetricPoint string 默认值 500 | 单个指标的最多返​
​
MinSampleStep string | 最小采样步长​
​
​
响应参数​
Items object[] | 指标数据列表​
​
​

Request

curl 'https://ark.cn-beijing.volcengineapi.com/?Action=GetModelCustomizationJobMetricData&Version=2024-01-01' \
  -H 'Content-Type: application/json' \
  -H 'X-Date: <X-Date>' \
  -H 'X-Content-Sha256: <X-Content-Sha256>' \
  -H 'Authorization: HMAC-SHA256 Credential=<AK>/<X-Date>/cn-beijing/ark/request, SignedHeaders=content-type;host;x-content-sha256;x-date, Signature=<Signature>' \
  -d '{
    "ModelCustomizationJobId": "mcj-20241128104838-g9vqg",
    "Metrics": [
        "train/total_tokens",
        "eval/loss",
        "train/loss",
        "eval/total_tokens"
    ]
}
'

Response

{
    "ResponseMetadata": {
        "RequestId": "20241212201041E7A67D3F69E447553B",
        "Action": "GetModelCustomizationJobMetricData",
        "Version": "2024-01-01",
        "Service": "ark",
        "Region": "cn-beijing"
    },
    "Result": {
        "Items": [
            {
                "Metric": "train/total_tokens",
                "Samples": [
                    {
                        "Step": 1,
                        "Value": 41422
                    },
                    {
                        "Step": 2,
                        "Value": 82844
                    }
                ]
            },
            {
                "Metric": "eval/loss",
                "Samples": [
                    {
                        "Step": 1,
                        "Value": 0.0725
                    },
                    {
                        "Step": 2,
                        "Value": 0.0625
                    }
                ]
            },
            {
                "Metric": "train/loss",
                "Samples": [
                    {
                        "Step": 1,
                        "Value": 0.0625
                    },
                    {
                        "Step": 2,
                        "Value": 0.0525
                    }
                ]
            }
        ]
    }
}
最近更新时间:2026.09.04 20:18:47
这个页面对您有帮助吗?
有用
有用
无用
无用