AdithyaSK HF Staff commited on
Commit
fa45c93
·
verified ·
1 Parent(s): b922961

Create dedicated SFT dashboard with restart-safe scalar archive and bounded plots

Browse files
README.md CHANGED
@@ -1,13 +1,23 @@
1
  ---
2
- title: Data Agent Sft Trackio
3
- emoji: 🐠
4
- colorFrom: pink
5
  colorTo: green
6
  sdk: gradio
7
- sdk_version: 6.28.0
8
- python_version: '3.13'
9
  app_file: app.py
10
  pinned: false
11
  ---
12
 
13
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ title: Data Agent SFT Comparison
3
+ emoji: 📊
4
+ colorFrom: blue
5
  colorTo: green
6
  sdk: gradio
 
 
7
  app_file: app.py
8
  pinned: false
9
  ---
10
 
11
+ # Data Agent SFT comparison
12
+
13
+ Six SFT runs, two models and epoch-by-epoch evaluation. This public CPU-basic Space is separate from the [RL dashboard](https://huggingface.co/spaces/FineEnvs/data-agent-training-comparison-trackio).
14
+
15
+ [Overview](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28eval_observed%2F%28pass_at_1%7Ctool_call_savings_pct%29%7Ctrain_sft%2Floss_mean50%7Ceval_coverage%2Fgraded_cells%29%24) · [Training](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28train_sft%7Ctrain_summary%29%2F) · [Evaluations](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28eval_observed%7Ceval_coverage%7Ceval_usage%7Ceval_efficiency%29%2F)
16
+
17
+ [Training runtimes, epoch scores and article citation data](SFT_RESULTS.md) · [CSV](sft_training_summary.csv) · [Evaluation breakdowns](sft_evaluations.json)
18
+
19
+ Includes training loss, token accuracy, gradients, runtime and throughput; pass@1 by harness and difficulty; tool savings and token usage. Keep smoothing at 0 for already-smoothed loss curves. Dense plots retain roughly 800 training points per run; all evaluation points are kept. The full scalar archive and raw database retain every update.
20
+
21
+ Bash 907 evaluations are incomplete (999 and 850 of 1,000). Bash 4,677 includes test overlap. Other SFT epoch evaluations are complete. SFT uses imitation, not an efficiency reward. Qwen RL used correctness only; LFM RL used correctness plus efficiency. See the results document for definitions and denominators.
22
+
23
+ Data is restored from the versioned scalar archive on startup, so a restart cannot lose this historical snapshot. No private traces or model weights are hosted here.
SFT_RESULTS.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # SFT training runtimes and evaluations
2
+
3
+ Snapshot: 29 September 2026. Six completed two-epoch SFT runs, published in the dedicated SFT project `data-agent-sft-comparison`.
4
+
5
+ [Overview](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28eval_observed%2F%28pass_at_1%7Ctool_call_savings_pct%29%7Ctrain_sft%2Floss_mean50%7Ceval_coverage%2Fgraded_cells%29%24) · [Training](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28train_sft%7Ctrain_summary%29%2F) · [Evaluations](https://fineenvs-data-agent-sft-trackio.hf.space/?project=data-agent-sft-comparison&run_ids=f036025d14dd1296b49ce58fe500ec3d%2Ca4cf64db18a6b31a095ebbf9ab0a6b68%2C1bb4e31576c25d10314f48dc1a762a96%2C7dd987e57d95f45535307e5635ede2b0%2C7db29f7f7bf5dc725c86f83c2761a007%2Ca568c52ea8521b301f8155bed9b43826&smoothing=0&metric_filter=%5E%28eval_observed%7Ceval_coverage%7Ceval_usage%7Ceval_efficiency%29%2F)
6
+
7
+ | Run | Tasks / examples | Train runtime | Mean loss | Loss: first / last 50 | Epoch 1 pass@1 | Epoch 2 pass@1 |
8
+ |---|---:|---:|---:|---:|---:|---:|
9
+ | LFM 2.6B · SFT bash · 907 tasks | 907 / 907 | 0h 09m 28s | 0.4464 | 0.5437 / 0.3974 | 41.74% (999/1000) | 46.59% (850/1000) |
10
+ | LFM 2.6B · SFT bash · 4677 tasks (eval overlap) | 4,677 / 4,677 | 0h 45m 29s | 0.3533 | 0.5188 / 0.3372 | 41.30% (1000/1000) | 40.80% (1000/1000) |
11
+ | LFM 2.6B · SFT OpenCode · 801 tasks | 801 / 4,825 | 1h 28m 17s | 0.2906 | 0.3997 / 0.2789 | 45.10% (1000/1000) | 47.50% (1000/1000) |
12
+ | Qwen 2B · SFT OpenCode · 801 tasks | 801 / 4,825 | 1h 11m 27s | 0.2270 | 0.2825 / 0.2147 | 28.40% (1000/1000) | 26.50% (1000/1000) |
13
+ | LFM 2.6B · SFT four harnesses · 888 tasks | 888 / 17,929 | 6h 26m 50s | 0.5815 | 0.9076 / 0.5854 | 38.30% (1000/1000) | 43.10% (1000/1000) |
14
+ | Qwen 2B · SFT four harnesses · 888 tasks | 888 / 17,929 | 5h 18m 45s | 0.3844 | 0.5131 / 0.3797 | 30.90% (1000/1000) | 32.70% (1000/1000) |
15
+
16
+ Runtime is the final Trainer `train_runtime`: training loop only, excluding queue time, preprocessing and evaluation. Loss is supervised cross entropy; absolute losses across different training datasets are not comparable. Training curves include every logged optimizer update; `loss_mean50` is a trailing mean with shorter windows at the start. Keep dashboard smoothing at 0. Historical ingestion timestamps are not original training timestamps.
17
+
18
+ ## Evaluation interpretation
19
+
20
+ - Pass@1 uses 250 fixed tasks across OpenCode, Claude Code, Codex and Mini-SWE-Agent. Each harness has 33 easy, 118 medium and 99 hard tasks. Scores are fractions on Trackio.
21
+ - Bash 907 epoch 1 has 999/1000 graded; epoch 2 has 850/1000. These are provisional, excluding missing cases. All other SFT epoch evaluations have 1000/1000 graded.
22
+ - Bash 4,677 includes 33 notebook overlaps and four matching test questions. It is an overlap-inclusive experiment, not a clean held-out result.
23
+ - The LFM pretrained baseline has 998/1000 graded. The Qwen baseline has 1000/1000 graded. A baseline repeated at step 0 is the same shared measurement, not another evaluation.
24
+ - The x axis uses each run's optimizer steps; compare epochs as well, since dataset sizes and numbers of updates differ.
25
+ - Tool savings = 100 × (1 − checkpoint calls / baseline calls), on task/harness pairs solved by both. Positive means fewer native ATIF tool calls. Matched cohort sizes are logged; cohorts differ between runs. This is descriptive, not a causal estimate.
26
+ - SFT has no explicit tool-efficiency reward. Qwen RL used correctness only; LFM RL used correctness plus a tool-efficiency bonus.
27
+ - Token means include all captured calls and repeated history; they are not cache-adjusted. Missing counters are omitted, never filled with zero.
28
+
29
+ ## Data and citation
30
+
31
+ [Training summary CSV](sft_training_summary.csv) · [Training summary JSON](sft_training_summary.json) · [Epoch evaluations, harness breakdowns and efficiency](sft_evaluations.json)
32
+
33
+ These aggregate exports include SHA-256 hashes of the source metrics and evaluation summaries. The public dashboard contains scalar metrics only. No rollout text, credentials or model weights are included. For a reproducible article citation, use the commit-pinned version of this document and exports rather than relying solely on the live dashboard.
34
+
35
+ Training datasets: [bash demonstrations](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-sft), [OpenCode teacher rollouts](https://huggingface.co/datasets/AdithyaSK/qwen38-27b-harbor-rollouts), [multi-harness SFT](https://huggingface.co/datasets/FineEnvs/SmolDataEnvs-multiharness-sft).
36
+
37
+ ## Plot rendering
38
+
39
+ Dense training curves are sampled to roughly 800 points per run for browser responsiveness. Every evaluation and runtime-summary point is retained. All 12,782 original training updates remain in the database and in [the full scalar archive](sft_events.json.gz). The archive is restored automatically on a fresh Space start.
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gzip
2
+ import json
3
+ import os
4
+ from collections import defaultdict
5
+ from pathlib import Path
6
+
7
+ os.environ.setdefault("TRACKIO_DIR", "/tmp/data-agent-sft-trackio")
8
+ os.environ["TRACKIO_PLOT_ORDER"] = "eval_observed/pass_at_1,train_sft/loss_mean50,eval_observed/tool_call_savings_pct,eval_coverage/graded_cells,eval_observed/harness/*,eval_observed/difficulty/*,eval_efficiency/*,eval_usage/*,train_sft/*,train_summary/*,eval_coverage/*"
9
+
10
+ import trackio
11
+ from trackio import server
12
+ from trackio.sqlite_storage import SQLiteStorage
13
+ from comparison_reads import install
14
+
15
+ PROJECT = "data-agent-sft-comparison"
16
+ groups = defaultdict(list)
17
+ with gzip.open(Path(__file__).with_name("sft_events.json.gz"), "rt") as source:
18
+ for entry in json.load(source):
19
+ groups[entry["run_id"]].append(entry)
20
+ for run_id, entries in groups.items():
21
+ SQLiteStorage.bulk_log(project=PROJECT, run=entries[0]["run"], run_id=run_id,
22
+ metrics_list=[e["metrics"] for e in entries], steps=[e["step"] for e in entries],
23
+ log_ids=[e["log_id"] for e in entries], config=entries[0]["config"])
24
+ print(f"Restored {sum(map(len, groups.values()))} scalar events across {len(groups)} SFT runs.", flush=True)
25
+ install(server, SQLiteStorage, PROJECT)
26
+ trackio.show(project=PROJECT, open_browser=False)
comparison_reads.py ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Bound dense plotting data while preserving sparse metrics and raw SQL access."""
2
+ from functools import wraps
3
+ import math
4
+
5
+
6
+ def plot_rows(rows, limit=800):
7
+ dense = [r for r in rows if any(k.startswith(('train/', 'train_sft/', 'train_verified/')) for k in r)]
8
+ stride = max(1, math.ceil(len(dense) / limit))
9
+ keep = {id(r) for r in dense[::stride]}
10
+ if dense:
11
+ keep.add(id(dense[-1]))
12
+ return [r for r in rows if id(r) in keep or not any(k.startswith(('train/', 'train_sft/', 'train_verified/')) for k in r)
13
+ or any(k.startswith(('eval', 'train_summary/')) for k in r)]
14
+
15
+
16
+ def install(server, storage, project, hidden_run_ids=()):
17
+ hidden = set(hidden_run_ids)
18
+ original_logs, original_batch = server.get_logs, server.get_logs_batch
19
+ original_runs, original_configs = server.get_runs_for_project, server.get_run_configs
20
+
21
+ @wraps(original_logs)
22
+ def get_logs(project, run=None, run_id=None, scalar_only=False):
23
+ if project != target:
24
+ return original_logs(project, run, run_id, scalar_only)
25
+ rows = storage.get_logs(project, run, max_points=None, run_id=run_id,
26
+ scalar_only=server._normalize_bool_param(scalar_only, 'scalar_only'))
27
+ return plot_rows(rows)
28
+
29
+ @wraps(original_batch)
30
+ def get_logs_batch(project, runs, max_points=3000, scalar_only=False):
31
+ if project != target:
32
+ return original_batch(project, runs, max_points, scalar_only)
33
+ # Fetch runs separately so dense series from one run cannot displace another's evals.
34
+ return [{'run': r.get('run'), 'run_id': r.get('run_id'),
35
+ 'logs': get_logs(project, r.get('run'), r.get('run_id'), scalar_only)}
36
+ for r in server._normalize_logs_batch_runs(runs)]
37
+
38
+ @wraps(original_runs)
39
+ def get_runs_for_project(project):
40
+ rows = original_runs(project)
41
+ return [r for r in rows if r['id'] not in hidden] if project == target else rows
42
+
43
+ @wraps(original_configs)
44
+ def get_run_configs(project):
45
+ configs = original_configs(project)
46
+ return {k: v for k, v in configs.items() if k not in hidden} if project == target else configs
47
+
48
+ target = project
49
+ server.get_logs, server.get_logs_batch = get_logs, get_logs_batch
50
+ server.get_runs_for_project, server.get_run_configs = get_runs_for_project, get_run_configs
requirements.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ trackio[spaces,mcp]==0.33.0
sft_evaluations.json ADDED
The diff for this file is too large to render. See raw diff
 
sft_events.json.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd12d1ab11a7ec502c87801ee3588a2258b07f06e112fbd881b5bef7f93c833b
3
+ size 1517912
sft_training_summary.csv ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ tasks,examples,epoch_steps,runtime_seconds,mean_train_loss,loss_first50,loss_last50,metrics_sha256,run,model,epoch1_pass_at_1,epoch1_graded,epoch2_pass_at_1,epoch2_graded
2
+ 907,907,"[114, 228]",567.9285,0.44636775108805876,0.5436920684576034,0.3974331718683243,f4e40c769a103dbe20688c2b237a1effdaca280359dff33452d35a160d15784d,LFM 2.6B · SFT bash · 907 tasks,lfm,0.4174174174174174,999,0.46588235294117647,850
3
+ 4677,4677,"[585, 1170]",2729.0271,0.35326611715504247,0.5187726891040803,0.3372010153532028,6cdfaa6803faa4cf730c9c863d7ea80243d4bb4a38bf18c3a3e0b59795101eb0,LFM 2.6B · SFT bash · 4677 tasks (eval overlap),lfm,0.413,1000,0.408,1000
4
+ 801,4825,"[604, 1208]",5296.5726,0.29063189937270534,0.3997403588891029,0.2788516191393137,c7fa2e30faeb02f277076b6b12e4a395674973aabac185d1579a43b66d3b4ae5,LFM 2.6B · SFT OpenCode · 801 tasks,lfm,0.451,1000,0.475,1000
5
+ 801,4825,"[604, 1208]",4286.5479,0.22704624168155407,0.28249539285898206,0.21466757848858833,282145ba1de34e326eb947f2859473bf30d33dc426685c12910eb141e2c5fb61,Qwen 2B · SFT OpenCode · 801 tasks,qwen,0.284,1000,0.265,1000
6
+ 888,17929,"[2242, 4484]",23209.8465,0.5814626613510548,0.9076286560297012,0.5854089191555977,eb94a9046cee795466efba0eade4b14a8e9acac16c12dc967369ec6d2daf5bfc,LFM 2.6B · SFT four harnesses · 888 tasks,lfm,0.383,1000,0.431,1000
7
+ 888,17929,"[2242, 4484]",19125.4948,0.384378594270742,0.5131349170207977,0.37968474060297014,e44afd214cef850be4cb07db67999da4c33ba52784ea3e5aeb6c9902c2bb9012,Qwen 2B · SFT four harnesses · 888 tasks,qwen,0.309,1000,0.327,1000
sft_training_summary.json ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "tasks": 907,
4
+ "examples": 907,
5
+ "epoch_steps": [
6
+ 114,
7
+ 228
8
+ ],
9
+ "runtime_seconds": 567.9285,
10
+ "mean_train_loss": 0.44636775108805876,
11
+ "loss_first50": 0.5436920684576034,
12
+ "loss_last50": 0.3974331718683243,
13
+ "metrics_sha256": "f4e40c769a103dbe20688c2b237a1effdaca280359dff33452d35a160d15784d",
14
+ "run": "LFM 2.6B \u00b7 SFT bash \u00b7 907 tasks",
15
+ "model": "lfm",
16
+ "epoch1_pass_at_1": 0.4174174174174174,
17
+ "epoch1_graded": 999,
18
+ "epoch2_pass_at_1": 0.46588235294117647,
19
+ "epoch2_graded": 850
20
+ },
21
+ {
22
+ "tasks": 4677,
23
+ "examples": 4677,
24
+ "epoch_steps": [
25
+ 585,
26
+ 1170
27
+ ],
28
+ "runtime_seconds": 2729.0271,
29
+ "mean_train_loss": 0.35326611715504247,
30
+ "loss_first50": 0.5187726891040803,
31
+ "loss_last50": 0.3372010153532028,
32
+ "metrics_sha256": "6cdfaa6803faa4cf730c9c863d7ea80243d4bb4a38bf18c3a3e0b59795101eb0",
33
+ "run": "LFM 2.6B \u00b7 SFT bash \u00b7 4677 tasks (eval overlap)",
34
+ "model": "lfm",
35
+ "epoch1_pass_at_1": 0.413,
36
+ "epoch1_graded": 1000,
37
+ "epoch2_pass_at_1": 0.408,
38
+ "epoch2_graded": 1000
39
+ },
40
+ {
41
+ "tasks": 801,
42
+ "examples": 4825,
43
+ "epoch_steps": [
44
+ 604,
45
+ 1208
46
+ ],
47
+ "runtime_seconds": 5296.5726,
48
+ "mean_train_loss": 0.29063189937270534,
49
+ "loss_first50": 0.3997403588891029,
50
+ "loss_last50": 0.2788516191393137,
51
+ "metrics_sha256": "c7fa2e30faeb02f277076b6b12e4a395674973aabac185d1579a43b66d3b4ae5",
52
+ "run": "LFM 2.6B \u00b7 SFT OpenCode \u00b7 801 tasks",
53
+ "model": "lfm",
54
+ "epoch1_pass_at_1": 0.451,
55
+ "epoch1_graded": 1000,
56
+ "epoch2_pass_at_1": 0.475,
57
+ "epoch2_graded": 1000
58
+ },
59
+ {
60
+ "tasks": 801,
61
+ "examples": 4825,
62
+ "epoch_steps": [
63
+ 604,
64
+ 1208
65
+ ],
66
+ "runtime_seconds": 4286.5479,
67
+ "mean_train_loss": 0.22704624168155407,
68
+ "loss_first50": 0.28249539285898206,
69
+ "loss_last50": 0.21466757848858833,
70
+ "metrics_sha256": "282145ba1de34e326eb947f2859473bf30d33dc426685c12910eb141e2c5fb61",
71
+ "run": "Qwen 2B \u00b7 SFT OpenCode \u00b7 801 tasks",
72
+ "model": "qwen",
73
+ "epoch1_pass_at_1": 0.284,
74
+ "epoch1_graded": 1000,
75
+ "epoch2_pass_at_1": 0.265,
76
+ "epoch2_graded": 1000
77
+ },
78
+ {
79
+ "tasks": 888,
80
+ "examples": 17929,
81
+ "epoch_steps": [
82
+ 2242,
83
+ 4484
84
+ ],
85
+ "runtime_seconds": 23209.8465,
86
+ "mean_train_loss": 0.5814626613510548,
87
+ "loss_first50": 0.9076286560297012,
88
+ "loss_last50": 0.5854089191555977,
89
+ "metrics_sha256": "eb94a9046cee795466efba0eade4b14a8e9acac16c12dc967369ec6d2daf5bfc",
90
+ "run": "LFM 2.6B \u00b7 SFT four harnesses \u00b7 888 tasks",
91
+ "model": "lfm",
92
+ "epoch1_pass_at_1": 0.383,
93
+ "epoch1_graded": 1000,
94
+ "epoch2_pass_at_1": 0.431,
95
+ "epoch2_graded": 1000
96
+ },
97
+ {
98
+ "tasks": 888,
99
+ "examples": 17929,
100
+ "epoch_steps": [
101
+ 2242,
102
+ 4484
103
+ ],
104
+ "runtime_seconds": 19125.4948,
105
+ "mean_train_loss": 0.384378594270742,
106
+ "loss_first50": 0.5131349170207977,
107
+ "loss_last50": 0.37968474060297014,
108
+ "metrics_sha256": "e44afd214cef850be4cb07db67999da4c33ba52784ea3e5aeb6c9902c2bb9012",
109
+ "run": "Qwen 2B \u00b7 SFT four harnesses \u00b7 888 tasks",
110
+ "model": "qwen",
111
+ "epoch1_pass_at_1": 0.309,
112
+ "epoch1_graded": 1000,
113
+ "epoch2_pass_at_1": 0.327,
114
+ "epoch2_graded": 1000
115
+ }
116
+ ]