Skip to content

feat: Show detailed information for one run in the terminal (#251) - #425

Open
anna495 wants to merge 5 commits into
inclusionAI:mainfrom
anna495:feat/show-run-info
Open

feat: Show detailed information for one run in the terminal (#251)#425
anna495 wants to merge 5 commits into
inclusionAI:mainfrom
anna495:feat/show-run-info

Conversation

@anna495

@anna495 anna495 commented Jul 31, 2026

Copy link
Copy Markdown

Summary

Add areno show <run_id> — display model, dataset, algorithm, resolved key settings, current stage, latest metrics, and last error for a single training run. Reads from existing local artifacts with no new dependencies.

Usage

areno show <run_id>                  # human-readable output
areno show <run_id> --format json    # structured JSON
areno show <run_id> --format table   # compact key-value table

Run ID can be a full ID, partial ID prefix (if unique), or PID.

CLI Output

Run: train sft Qwen/Qwen3.5-0.8B  (id=841950e0f0ed)
Kind:     train
Status:   exited
Stage:    train_start
Step:     1027
Created:  2026-07-30T06:07:24+00:00
Updated:  2026-07-30T06:22:21+00:00
Metrics:  /tmp/areno/tfevent_sft

Key settings:
  algo                   sft
  ckpt                   Qwen/Qwen3.5-0.8B
  dataset_path           yahma/alpaca-cleaned
  world_size             2
  batch_size             2
  mini_bs                2
  optimizer_lr           1e-06
  lr_decay_style         cosine
  weight_decay           0.01
  ...

Latest metrics (29):
  rollout/accuracy               0.0  @step 1026
  rollout/prompt_len_mean        25.0  @step 1026
  rollout/response_len_mean      54.5  @step 1026
  train/loss                     1.4218  @step 1026
  train/grad_norm                45.300  @step 1026
  ...

Timing (80 steps recorded):
  Avg total / step:    1.16s
  Avg train / step:    1.16s

Recent logs (last 1 lines):
  registered AReno command: areno train --ckpt Qwen/Qwen3.5-0.8B ...

What changed

File Change
areno/cli/show.py New: areno show CLI with human/table/json output
areno/cli/main.py +1 line: register show command
tests/test_cli_show_cpu.py New: 20 CPU tests
docs/show-run.md New: user guide with usage, examples, limitations

Edge cases handled

Scenario Behavior
Run ID not found Clear error, exit code != 0
Ambiguous partial ID Lists matching IDs, exit code != 0
Partial ID prefix Matches if unique
Missing metrics Section omitted, no error
Missing config Section omitted, no error
Partially written artifacts Still produces output with available fields
Active/running run Shows "running" status and current stage, no exit code
Secrets in config Auto-redacted (key/token/password/credential)
Full samples Never printed

Design decisions

  • Dashboard API first, local fallback: Tries GET /api/jobs/{id} first for full data, falls back to reading local artifact files when server is unavailable.
  • Sections config normalization: Dashboard API returns config with a sections key for structured display. _normalize_dashboard_config() extracts flat key-value pairs for CLI consumption.
  • Secret redaction: Config keys matching key/secret/token/password/credential patterns are automatically hidden from output.
  • Partial ID matching: Users can type a prefix of the run ID instead of the full 12-character hex.

Tests (20 CPU)

Category Count Coverage
Human format 7 Basic output, key settings, metrics, error section, timing, secrets redaction
JSON format 1 Valid JSON with expected fields
Table format 1 Key fields present in table output
Invalid input 6 Nonexistent ID, ambiguous partial, partial match, empty metrics/config, partial artifacts
Active runs 2 Running status, stage display, no exit code
Resolve job 3 Exact ID match, PID match, no match

Related Issue

Closes #251

qiinran added 5 commits July 30, 2026 10:49
- areno show <run_id> 支持 human/table/json 三种输出格式
- 展示 model/dataset/algo/key settings/stage/latest metrics/last error
- 支持 partial ID 前缀匹配和 PID 匹配
- Dashboard 不可用时 fallback 到本地 artifact
- 自动隐藏 secrets (key/token/password),不打印完整训练样本
- 20 个 CPU 测试覆盖成功路径、无效输入、边界情况、活跃run、job解析
- 文档 docs/show-run.md 含用法、输出示例、选项说明、测试概览
- Dashboard API返回的config包含sections结构化数据,解析为flat key-value
- 单独调用/api/jobs/{id}/metrics获取指标摘要
- 新增_fetch_metric_summaries函数
…ard 消除重复代码

show_command 和 _load_job_details 里都有 sections 解析逻辑,提取成共享函数
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Show detailed information for one run in the terminal

1 participant