Skip to main content

Online Policy Distillation Observable Configuration and Metrics Reference

Observability handbook for OPD training: Tracing integration, custom metric reporting, console tabs, metric dictionary, training effect evaluation, and FAQ troubleshooting

Online Policy Distillation (OPD) training automatically records every LLM call, tool call, and scoring detail, and visualizes them in the Model Studio console. Integration only requires adding a few decorators and wrapper calls in your function code. Related documentation:

Overview

The observability capability is built on OpenTelemetry (an open-source observability standard) to implement Tracing (distributed tracing). Data is exported to ARMS (Application Real-time Monitoring Service) and displayed in the Model Studio console. A Span is the observability unit of a single operation in OpenTelemetry; multiple Spans nest automatically to form a call chain. Five sections:
  1. Integrate Tracing — the SDK automatically reports training metrics to the console; how to view them on the Trajectory page
  2. Custom metrics — reporting paths and constraints for rollout_metrics and reward_metrics
  3. View effects in the console — how to read the Metrics / Trajectory / Output / Logs tabs
  4. Training metrics reference — OPD-specific metric dictionary + common metrics quick reference
  5. Judge training effects and troubleshoot — in-training interpretation, post-training evaluation, and FAQ

Integrate Tracing

Using the Rollout processor of an OPD project as an example, Tracing is integrated in 3 steps. OPD difference: the LLM Span in the call chain corresponds to the student model call, and teacher model scoring happens on the server side.

Step 1: Add dependencies

Add the following OpenTelemetry-related dependencies to the requirements.txt in the project root:

Dependency

Description

opentelemetry-api==1.41.1

OTel API

opentelemetry-sdk==1.41.1

OTel SDK

opentelemetry-exporter-otlp-proto-http==1.41.1

OTLP HTTP exporter

opentelemetry-processor-baggage==0.62b1

Baggage processor

loongsuite-util-genai==0.4.0

Generative AI utility library

The runtime environment already has dashscope, fastapi, uvicorn, and pyyaml pre-installed; you may also pin versions in requirements.txt if needed.

Step 2: Add observability code

Code changes concentrate on 5 decorators/functions. They nest automatically to form a complete call chain:
# 调用链结构:装饰器自动嵌套形成 Span 树,[ENTRY] 为入口 Span,[LLM]/[TOOL]/[custom] 为子 Span
[ENTRY: ROLLOUT] @observe_processor          ← Rollout 处理器入口
├── [LLM] trace_client / @observe_llm        ← LLM 调用(学生模型调用)
│   └── (OpenAI / LangChain / DashScope API)
├── [TOOL] trace_tool / @observe_tool        ← 工具调用
│   ├── tool: my_tool (MCP)
│   └── tool: my_scorer (自定义)
└── [custom] rollout_metrics                 ← Rollout 自定义指标

[ENTRY: REWARD] @observe_processor           ← Reward 处理器入口
├── [LLM] trace_client / @observe_llm        ← LLM 调用(评分用)
├── [TOOL] trace_tool / @observe_tool        ← 工具调用
└── [custom] reward_metrics                  ← Reward 自定义指标

@observe_processor — Track processor entry

Add it to the process() method to create the top-level ENTRY Span (the entry Span, the outermost layer of the call chain). The SDK infers the Span type from the inheritance chain: inheriting AbstractRolloutProcessor is recognized as ROLLOUT, and inheriting AbstractRewardProcessor is recognized as REWARD. It automatically records input, output, duration, and success/failure status. Rollout side example (functions/rollout/my_rollout.py):
from dashscope.finetune.reinforcement.component.observability import observe_processor
# 导入 Rollout 处理器基类与输入输出类型(项目内已定义)

class MyRolloutProcessor(AbstractRolloutProcessor):
    @observe_processor  # Span 类型 = ROLLOUT(按继承 AbstractRolloutProcessor 自动推断)
    async def process(self, input: RolloutInput) -> RolloutOutput:
        # input: Rollout 输入,含 prompt、模型资源、工具列表等
        await self._async_setup()  # 异步初始化:建 LLM 客户端、加载工具
        return await self._async_process(input)  # 执行实际 Rollout 逻辑,返回轨迹与指标
Reward side example (functions/reward/reward.py):
class MyRewardProcessor(AbstractRewardProcessor):
    @observe_processor  # Span 类型 = REWARD(按继承 AbstractRewardProcessor 自动推断)
    async def process(self, input: RewardInput) -> RewardOutput:
        # input: Reward 输入,含 agent_output(模型轨迹)与 ground_truth(标准答案)
        messages = input.agent_output.messages  # 取模型多轮对话消息列表
        content = messages[-1].get("content", "") if messages else ""  # 取最后一条 assistant 回复文本
        score = await evaluate(content, input.ground_truth)  # 用标准答案对回复评分,返回主分
        return RewardOutput(
            reward=Reward(reward_score=score, reward_metrics={...}),  # 主分入 reward_score,分维度入 reward_metrics
            status=TaskStatus.SUCCESS,  # 任务状态:SUCCESS 表示评分成功
            error=None,  # 无异常时为 None;失败时填错误信息
        )

trace_client() — Track LLM client

Call it during initialization or in the process method to wrap the LLM client instance. Afterwards, all LLM requests from that client automatically produce an LLM Span that records the model name, request content, token usage, and latency. Supported client types (auto-detected by object attributes):
  • OpenAI clients (AsyncOpenAI / OpenAI)
  • OpenAI completions resource (.chat.completions)
  • LangChain ChatOpenAI and similar classes (via .client / .async_client)
  • DashScope Generation class (pass the class itself, not an instance)
Example (functions/rollout/my_rollout.py):
from dashscope.finetune.reinforcement.component.observability import trace_client
# 导入 LLM 客户端包装函数,调用后该客户端的请求自动产生 LLM Span

class MyRolloutProcessor(AbstractRolloutProcessor):
    def _build_llm(self, input: RolloutInput) -> ChatOpenAI:
        # input: Rollout 输入,model_resource 含模型名等资源配置
        resource = input.model_resource  # 取模型资源(由 Runtime 注入的学生模型)
        llm = ChatOpenAI(model=resource.model_name, ...)  # 构造 LangChain ChatOpenAI 客户端
        trace_client(llm)  # 包装后自动追踪所有 LLM 调用(记录模型名、请求、Token 用量、延迟)
        return llm

trace_tool() — Track tool calls

After obtaining a tool instance, call this to wrap the tool object. Afterwards, each tool call produces a TOOL Span that records the tool name, parameters, return value, and latency. Supported input formats:
  • A single LangChain BaseTool
  • List / tuple / dict (auto-traversed)
  • LangGraph ToolNode (auto-expands .tools_by_name)
  • MCP tools (auto-detected, provider set to "mcp")
  • Custom provider (trace_tool(tool, provider="my-plugin"))
MCP note: The MCP (Model Context Protocol) Server and Client run in different processes. The Server-side @observe_tool is ineffective on the Client side. You must call get_tools() on the Client side first, then run trace_tool(tools) on the returned tool list.

@observe_llm — Custom LLM function

When trace_client() cannot auto-detect your LLM client, use this decorator to manually mark an LLM call function. Signature requirement: the function must include keyword arguments model and messages after *. Example (functions/rollout/my_rollout.py):
from dashscope.finetune.reinforcement.component.observability import observe_llm
# 导入 LLM 装饰器,用于手动标记无法被 trace_client 自动识别的 LLM 调用

class MyRolloutProcessor(AbstractRolloutProcessor):
    @observe_llm  # 标记为 LLM Span(记录模型名、messages、Token 用量)
    async def _call_llm(self, *, messages: List[Dict], model: str) -> Any:
        # messages: 对话消息列表;model: 模型名(* 后关键字参数为签名硬性要求)
        ...

@observe_tool — Custom tool function

When trace_tool() cannot auto-detect your tool (e.g., a plain Python function used as a tool), use this decorator to mark it manually. You can customize the Span name via the name parameter. Example (functions/rollout/my_rollout.py):
from dashscope.finetune.reinforcement.component.observability import observe_tool
# 导入工具装饰器,用于手动标记无法被 trace_tool 自动识别的工具函数

class MyRolloutProcessor(AbstractRolloutProcessor):
    @observe_tool(name="my_scorer")  # 标记为 TOOL Span,name 自定义 Span 显示名
    def _score_response(self, *, messages: List[Dict]) -> float:
        # messages: 对话消息列表,函数返回评分为 float
        ...

Step 3: Submit the task

When submitting a task, leave the Runtime env field empty — Tracing is enabled by default:
# FunctionComponentRuntime: Rollout/Reward 组件运行时配置
rollout_runtime = FunctionComponentRuntime(
    cpu=2, memory_size=4096, disk_size=512,  # 资源:2 核 CPU、4GB 内存、512MB 磁盘
    concurrency=30, capacity=30,  # 并发 30、容量 30(单实例同时处理请求数)
    min_capacity=30, max_capacity=60,  # 弹性伸缩下限 30、上限 60
    env={}  # 留空 = 默认开启 Tracing;设 {"ENABLE_TRAJECTORY": "false"} 可关闭
)
To disable Tracing (to save cost), set {"ENABLE_TRAJECTORY": "false"} in env. After disabling, system metrics are unaffected; only Tracing data collection stops.

Tracing performance and cost trade-off

Data pipeline and cost sources

  • Data flow: function code (decorators) → OpenTelemetry SDK → ARMS → console Trajectory/Metrics tabs
  • Cost sources: ARMS Span storage (pay-as-you-go) + a small amount of CPU/network overhead on the function side + a slight increase in training latency

Switch strategy and cost governance

Phase

Tracing status

Collected data

Not collected

Cost impact

Development / small-batch debugging

Fully on

All (trajectories + Reward analysis + tool calls + system metrics)

—

Low

Canary / pre-release confirmation

Retained

All

—

Medium

Large-scale formal training

Can disable

actor/critic/trajectory/timing system metrics

Trajectory replay / tool call details / custom metrics curves

Significantly reduced

OPD difference: for system metrics retained after disabling Tracing, see §Training metrics reference; trace/distillation/* are system metrics and remain viewable after disabling (teacher model health troubleshooting is unaffected). Cost governance for custom metrics:
  • Count and cardinality: the count and cardinality of reward_metrics / rollout_metrics affect ARMS storage
  • Avoid high-cardinality fields: do not use user_id / request_id as metric keys
  • Streamline metrics: keep key metrics ≤10; do not leave temporary debugging metrics

Custom metrics

The key-value metrics defined through the following entry points in your code automatically appear in the trace/ group of the console Metrics tab and on the Reward analysis page:

Entry

Code location

Console path

reward_metrics

Reward(reward_metrics={"acc": 0.8})

trace/reward_metrics/{reward-name}/acc/{avg,sum}

rollout_metrics

AgentOutput(rollout_metrics={"latency": 1.2})

trace/rollout_metrics/latency/{avg,sum}

Value type constraints:
  • Flat dict: reward_metrics / rollout_metrics return a flat dict (not a nested list), with each value a float
  • Main score reported separately: reward_score goes into Reward.reward_score alone; do not duplicate it in reward_metrics
  • Non-float only persisted: non-float data is persisted only via rollout_extra and does not enter metrics
  • Metric path: the reward_score main score maps to trace/reward/<name>/, and each dimension maps to trace/reward_metrics/<name>/<metric>
Multiple Reward function scenario: use RewardFunctionComponent(name="reward-1") to give each Reward function a unique name; metric paths are distinguished automatically (trace/reward_metrics/reward-1/...).

View effects in the console

After training starts, open the Model Fine-tuning console, enter the Model Fine-tuning page, and click the task name to view observability data in the details. The following explains the correspondence between "what you did in code → what you see in the console". OPD difference: the task details page has no standalone "Details" tab; status is viewed in the task list. Focus points: on the Metrics tab, watch the distillation loss, teacher model health, and validation reward; on the Trajectory tab, inspect tool call chains per sample; on the Output tab, the last Checkpoint is auto-published. The task details contain the following tabs, to be used in the order "check progress first → then check behavior → drill down when issues arise":

Tab

Main question answered

When to use

Trajectory

What the model actually did, why the score is what it is

Verify model behavior, attribute low-score samples

Metrics

Quantitative training trends

Read curves to judge convergence, spot inflection points

Output

Checkpoint list and publishing

Select a model after training completes

Logs

stdout / stderr / error stack traces

Troubleshoot when FAILED

Trajectory and behavior analysis

Trace details — corresponds to @observe_processor: on the Trajectory Details subpage of the Trajectory tab, you can see the complete interaction process of each Rollout:
  • Trace list: shows all sampled trajectories; supports filtering by Sample ID / Trajectory ID / Epoch / Step
  • Dialogue process: complete multi-turn interaction (user → assistant → tool_call → tool_result → assistant), intuitively showing the model's reasoning chain
  • Reward score: each Step shows the corresponding Reward score and status (SUCCESS/FAILED)
Focus on: are the tool calls correct? are the conversation rounds reasonable? is the model repeating ineffective operations? Tool calling analysis — corresponds to trace_tool / @observe_tool: on the Tool Calling Analysis subpage of the Trajectory tab, you can view:
  • Tool call records: tool name, call parameters, return results, and duration
  • Tracing sub-tab: the Span tree of each trajectory; expandable to view the full details of each tool call and LLM request
Typical use: troubleshoot an Agent's failed tool calls — which tool errored? were parameters passed correctly? was the duration too long? Reward analysis — corresponds to reward_metrics: Concept definitions:
  • Sample: one raw sample in the training data (one problem, one instruction, one prompt)
  • Trajectory: one specific interaction trajectory produced by the same Sample under n_rollouts samplings
  • Relationship: one Sample → N Trajectories (N = n_rollouts)
On the Reward analysis subpage of the Trajectory tab, evaluate training effects from three dimensions:
  • Step dimension: select a training Step to view the Reward aggregation (average score, success rate, trend chart) of all samples under that Step, to judge overall training trend
  • Sample dimension: select a Sample ID to compare the Reward of the same sample across different trajectories, to find problematic samples
  • Trajectory dimension: view the raw score of each scoring dimension for a single trajectory, for attribution analysis

Metrics, output, and logs

Metrics tab — corresponds to rollout_metrics / reward_metrics: in the trace/ group of the Metrics tab, you can see the aggregation curves (avg / sum) of all custom metrics you defined in code. For the full metric groups, see §Training metrics reference below; for how to attribute an abnormal metric → §Judge training effects and troubleshoot. Output tab: after training completes, you can see the Checkpoint list in the Output tab; each row contains the Checkpoint ID, publish status, and remaining retention time.
  1. Select the target Checkpoint and click the Publish button
  2. Wait for publishing to complete (status changes from "Pending Publish" to "Published")
  3. After publishing, you can call it via the model name in the API
OPD difference: the last Checkpoint is auto-published; the Output tab still allows manually selecting any Checkpoint to publish (it coexists with the auto-published last one; distinguish by model name when calling). Training completion does not equal training success. When Reward is enabled, it is recommended to use the Checkpoint with the best validation/data/reward/mean@1 rather than the default last one. Pure distillation (without registering a reward component) has no validation reward; judge effects by loss trend and independent evaluation. Logs tab: view training run logs on the Logs tab; they can also be obtained via the SDK / CLI:
  • SDK: AgenticRL.logs(job_id="ft-xxx", lines=100)
  • CLI: dashscope rl logs "ft-xxx" --lines 100
For FAILED task troubleshooting steps, see §FAQ → FAILED troubleshooting.

Training metrics reference

Below is the full set of OPD-specific metrics and common metrics. Metrics are displayed on the Metrics page; click to expand each group's details.

OPD-specific metrics

The following are OPD-specific metrics:

Metric

Meaning and interpretation

actor/distillation/loss

Distillation loss; a decline indicates the student model is approaching the teacher model

When reward is enabled, actor/distillation/loss and actor/pg_loss together constitute the total loss; both should decline or stabilize.

Metric

Meaning and interpretation

trace/distillation/valid_token_rate

Proportion of tokens for which the teacher model successfully provided a logprob (log probability); normally close to 1.0; less than 1 indicates missing scores

trace/distillation/missing_token_rate

Proportion of tokens for which the teacher model did not provide a logprob; normally close to 0

trace/distillation/empty_response_rate

Proportion of empty responses returned by the teacher model; normally close to 0; an increase points to an anomaly on the teacher model side

Metric

Meaning and interpretation

validation/data/reward/mean@1

Aggregated reward mean on the validation set; a rise relative to the baseline is healthy

Validation metrics include only the aggregated reward mean. Custom dimensions returned by the Reward function are not reflected in validation metrics; view them under the training metric trace/reward_metrics/<reward_name>/<metric> (the dimension name comes from the keys of reward_metrics and varies by task). Pure distillation (without registering a reward component, functions=None) does not report this group.

Key metrics quick reference

Category

Metric

Interpretation

Distillation

actor/distillation/loss

Decline or stabilize

Teacher model health

trace/distillation/valid_token_rate

Close to 1.0

Teacher model health

trace/distillation/missing_token_rate

Close to 0

Teacher model health

trace/distillation/empty_response_rate

Close to 0

Validation

validation/data/reward/mean@1

Rise relative to baseline

reward dimension

trace/reward_metrics/<reward_name>/<metric>

Key business dimensions do not regress

Common metrics

Metrics produced during training are grouped by prefix as follows; detailed metric descriptions for each group are in the collapsible panels below:

Group prefix

Metric count

Type

Description

actor/

8

System

Policy network metrics: loss, entropy, KL divergence, clip ratio, gradient norm, learning rate

critic/

12

System

Reward and value estimation: mean / max / min of score / rewards / advantages / returns

trajectory/

15

System

Trajectory statistics: response length, prompt length, truncation rate, abort rate, conversation turns

trace/

40+

Mixed

Observability metrics: epoch, LLM call count, success rate, custom metrics

timing/

11

System

Latency analysis: Trainer phase duration, Rollout duration, per-token duration

OPD difference: OPD does not produce the perf/ and fully_async/ metric groups. Click to expand the full metric list for each group:

Metric

Meaning

actor/loss

Total loss (pg + entropy + ...)

actor/pg_loss

Policy gradient loss

actor/entropy

Average token entropy of the current policy, reflecting exploration level

actor/ppo_kl

KL divergence of the current policy relative to the initial policy

actor/pg_clipfrac

Importance sampling clip trigger rate, reflecting policy drift speed

actor/pg_clipfrac_lower

Dual-clip lower-bound clip trigger rate (always 0 when dual-clip is not enabled)

actor/grad_norm

Gradient norm

actor/lr

Current learning rate

Metric

Meaning

critic/score/{mean,max,min}

Raw reward score statistics (before KL deduction)

critic/rewards/{mean,max,min}

Final training Reward statistics after KL penalty deduction

critic/advantages/{mean,max,min}

Advantage function statistics, reflecting the current policy's improvement over the baseline

critic/returns/{mean,max,min}

Returns (Critic target) statistics

Metric

Meaning

trajectory/response_length/{mean,max,min}

Response token count statistics (including abort samples)

trajectory/response/aborted_ratio

Proportion of trajectories with zero response length

trajectory/response_length_non_aborted/{mean,max,min}

Effective response token count statistics after excluding aborts

trajectory/response_length/clip_ratio

Proportion of responses truncated at max length

trajectory/prompt_length/{mean,max,min}

Prompt token count statistics

trajectory/prompt_length/clip_ratio

Proportion of prompts truncated at max length

trajectory/num_turns/{mean,max,min}

Statistics of turns of interaction between the Agent and the LLM

Metric

Meaning

trace/training/epoch

Current training epoch

trace/num_llm_calls/{avg,sum}

Per-trajectory / total LLM call count

trace/success_rate/agent/{avg,sum}

Agent task success rate / cumulative success count

trace/success_rate/reward/{avg,sum}

Reward computation success rate / cumulative success count

trace/attempts/agent/{avg,sum}

Agent average / cumulative HTTP attempt count (including retries)

trace/reward/<reward_name>/{avg,sum}

Average / cumulative value of a single Reward function

trace/reward_metrics/<reward_name>/<metric>/...

Custom sub-metrics returned by a Reward function

Divided into three subgroups: timing/s/* (Trainer phase duration, seconds), timing/s/rollout/* (Rollout-side duration, seconds), and timing/ms/*_per_token (per-token duration, milliseconds).

Metric

Meaning

timing/s/step

Total duration of a complete Trainer step

timing/s/trainer_fetch_batch

Time for the Trainer to wait for and fetch a batch

timing/s/old_log_prob

Log-prob computation time of the old policy

timing/s/adv

Advantage computation time

timing/s/update_actor

Actor backpropagation + optimizer step time

timing/s/param_sync

Time for the Rollouter to sync parameters from the Trainer

timing/s/rollout/agent_loop_latency/avg

Total duration of a single Rollout

timing/s/rollout/model_latency/avg

Cumulative LLM inference time for a single trajectory

timing/s/rollout/reward_latency/avg

Reward call duration

timing/ms/gen_per_token

Per-token duration in the generation phase

timing/ms/update_actor_per_token

Per-token duration in the Actor update phase

Judge training effects

The metrics reported during training are sufficient to judge whether a round of OPD is converging normally; post-training business effect evaluation is performed by the user according to their own criteria.

In-training interpretation order

On the Metrics page, interpret in the following order: ① Teacher model signal completeness — trace/distillation/valid_token_rate is close to 1.0. When noticeably below 1, teacher model scoring is missing, the explanatory power of other metrics decreases, and you should troubleshoot first (troubleshooting decision tree P2). ② Distillation convergence — actor/distillation/loss declines or stabilizes over training, indicating the student model is approaching the teacher model. ③ Validation set performance — validation/data/reward/mean@1 rises relative to the pre-training baseline. View per-dimension via trace/reward_metrics/<reward_name>/<metric>; key business dimensions (especially safety) must not regress. Validation frequency is controlled by eval_steps. If a validation point exists at step 0, that point corresponds to the pre-training model state and can be used directly as the baseline. Pure distillation (without registering a reward component, functions=None) produces no validation metrics or per-dimension metrics. Judge whether training is normal based on the distillation loss and teacher model health metrics; judge business effects via post-training evaluation.

Post-training business evaluation

Keep the pre-training baseline — distillation gain is a relative quantity; without a baseline, the improvement magnitude cannot be judged. Training produces a new model ID; the original model remains callable, but you must retain the baseline evaluation results yourself. Maintain consistent criteria — pre- and post-training evaluation should use the same evaluation set and decoding parameters (temperature, max_tokens, whether thinking is enabled, etc.). When criteria are inconsistent, the difference is not comparable — for example, a response truncated by the length limit can manifest as a false decline in capability. The example directory ships with evaluation and comparison scripts; these are only implementation references and can be modified as needed.

Acceptance criteria

Four items must be satisfied simultaneously:

Criterion

Requirement

Main criterion

Core evaluation metric improves and is not random fluctuation

Safety criterion

Safety dimensions are no higher than before training

Format criterion

Format dimensions are no lower than before training

Per-category criterion

No category significantly regresses after splitting by business category

Example three-way comparison (200 validation samples, temperature=0, 8 concurrency):

Metric

Base

Teacher

OPD

Core success rate

0.700

0.955

0.990

Safety violation rate

0.235

0

0

Why the student model surpasses the teacher model: when reward is enabled, reward scores against the reference answer, tending toward the reference answer rather than the teacher model; only pure distillation takes the teacher model as the performance ceiling.

OPD troubleshooting decision tree

Spot an abnormal curve on the Metrics page → locate the issue against this section → handle per the recommendations.

P1 Distillation loss not declining

  • Main signal: actor/distillation/loss does not decline over training or even rises
  • Root cause: teacher model signal missing / learning rate unsuitable (too small to converge or too large to break the output format) / poor data quality
  • Handling: first check whether valid_token_rate is close to 1.0 → when the signal is normal, loss not declining is often due to a too-small learning rate; increase learning_rate (×1.5~2, see the training config tuning decision table) → spot-check the reference answers in rollout_extra of the training data

P2 Teacher model scoring missing

  • Main signal: trace/distillation/valid_token_rate is noticeably below 1.0
  • Root cause: scoring missing on the teacher model side (the teacher model is hosted on the server, opaque to the user, and cannot be troubleshot directly)
  • Handling: check whether missing_token_rate and empty_response_rate rise in tandem → if the teacher model timeout or empty-response ratio is high, submit a ticket

P3 Validation set not rising

  • Main signal: validation/data/reward/mean@1 shows a downward inflection while training reward keeps rising
  • General handling: early stop (select an earlier Checkpoint on the Output tab) + keep pre- and post-training evaluation criteria consistent + view reward_metrics regression per dimension
  • Additional root cause: overfitting the teacher model style (in pure distillation)
  • Additional handling: spot-check the reference answer quality in rollout_extra
Four-source collaborative troubleshooting: the four types of observation sources each answer different questions: Logs → "when did it fail, error stack", Metrics → "is it happening / how severe", Trajectory → "why / which sample", Trajectory page · Tracing sub-tab → "which segment is slow / which external dependency is abnormal". Select the observation source by problem type:

Problem type

Primary

Secondary

Not needed

Training divergence

Metrics

Trajectory

Logs

Task FAILED

Logs

Metrics

Trajectory

Reward not rising

Metrics → Trajectory

reward_metrics

Logs

Tool call error

Tracing sub-tab

Logs

—

Training slowdown

Metrics timing

Tracing sub-tab

—

Poor output quality

Trajectory

reward_metrics

—

OPD-specific problem types and source selection:

Problem type

Primary

Secondary

Not needed

Distillation loss not declining

Metrics

Trajectory

Logs

Teacher model scoring missing

Metrics

Logs

Trajectory

Validation set not rising

Metrics → Trajectory

reward_metrics

Logs

Next steps

FAQ

Teacher model side anomalies

The teacher model is deployed on the server and is opaque to the user. The following symptoms require submitting a ticket:

Symptom

Handling

trace/distillation/valid_token_rate < 1, teacher model scoring missing

Submit a ticket

Teacher model timeout or scoring missing

Submit a ticket

Same-family teacher/student still reports a tokenizer mismatch

Submit a ticket

Self-check items

General self-check items:

Symptom

Troubleshooting direction

Tracing console is blank

①Confirm env is not set to ENABLE_TRAJECTORY="false" ②Confirm ARMS is authorized ③Check requirements.txt contains OTel dependencies ④Check process() has @observe_processor

Reward intermittent FAILED

Unhandled empty messages / encoding errors → add try/except returning TaskStatus.FAILED + error

Low format-type dimension

Check whether the student model output format meets the Reward function requirements

How to distinguish different Reward functions

Set a unique name via RewardFunctionComponent(name="reward-1"); metric paths are distinguished automatically

OPD-specific self-check items:

Symptom

Troubleshooting direction

400 ... teacher_model must be a valid model ID

Use a Model Studio model ID

On submission, error says the SDK lacks OPD capability

Switch to the wheel specified in the example

Pure distillation has no validation metrics

Normal behavior (no reward component registered, functions=None); judge via independent evaluation

format_valid abnormally low

Check whether the student model output is polluted by thinking/tool-call text, and confirm the Reward format-judgment regex matches the pre- and post-training decoding parameters

Fault quick reference and FAILED troubleshooting

General fault quick reference:

Symptom

First check

Next check

FAILED · function registration failed

classpath wrong / dependency missing

Check requirements.txt

FAILED · Rollout timeout

Single-traj timeout

timeout ↑ / use Tracing to find the slow segment

Tracing not visible

Console blank

Check ARMS authorization / requirements.txt

OPD-specific fault quick reference:

Symptom

First check

Next check

valid_token_rate low

Teacher model side anomaly

Submit a ticket

Distillation loss not declining

Teacher model signal completeness

Learning rate / data quality

tool_call_count is 0 / NO_TOOL frequent

Whether the student model supports function calling, and whether the passed tools parameter is correct

Check tool definition and api_key/base_url

Standard troubleshooting flow:
  1. Step 1 Task list confirm status and the failure time point
  2. Step 2 Logs tab last 100-500 lines (SDK AgenticRL.logs(job_id, lines=100) / CLI dashscope rl logs --lines 100)
  3. Step 3 Distinguish error layer:
    • User function error (Rollout/Reward throws an exception) → test_functions to reproduce locally → fix code → re-register/run
    • Framework error (OOM / insufficient resources / network) → tune concurrency / capacity
    • Data error (JSONL parse failed) → validate single-line format and rollout_extra
Common error patterns during training:

Error pattern

Main symptom

Handling suggestion

Insufficient resources

Scaling cannot keep up

See Step 3 framework error (tune concurrency / capacity)

Data format error

JSONL parse failed

Line-level JSON validation / messages roles / rollout_extra field

Token Plan
Model Playground
Model Compression
Statistics and Monitoring
Support