Skip to content

Fix offloading_decision_summary.py to read all split segments#69

Open
ff225 wants to merge 1 commit into
mainfrom
fix/sciot-052-summary-script-reads-all-segments
Open

Fix offloading_decision_summary.py to read all split segments#69
ff225 wants to merge 1 commit into
mainfrom
fix/sciot-052-summary-script-reads-all-segments

Conversation

@ff225

@ff225 ff225 commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Addresses part of #52 (offline-reader verification task, first bullet, scoped to offloading_decision_summary.py).

scripts/analysis/offloading_decision_summary.py read the input path with iter_offloading_decisions(), which only reads a single file. Once offloading_decisions.csv segment splitting is enabled (evaluation.split, see docs/OFFLOADING_DECISION_EVENTS.md), the base file is never written — only .segNNNN_* segments are — so running the script against the base path silently produced an empty summary instead of an error or a real result.

Fix: use iter_run_offloading_decisions() (already exported by server.telemetry.offloading_decisions, and already used elsewhere, e.g. in the offloading-decision-events tests), which discovers and reads every segment for the run via run_segment_paths. For unsplit/legacy single-file runs, behavior is unchanged — run_segment_paths just returns the one file.

I checked the other locations #52 calls out:

  • scripts/analysis/telemetry_notebook_utils.py::discover_csv_files already globs offloading_decisions*.csv, so it already reads all segments — no change needed.
  • src/server/evaluations/edit_evaluations.ipynb reads a single hardcoded ./evaluations.csv in one ad-hoc cell; it isn't part of the segmented offloading-decisions/inference-cycles output pipeline, so it's out of scope for this fix.

The issue's second bullet (evaluating a dedicated per-output output.split config) is a design question, not a bug fix, and is left for separate discussion — out of scope here to keep this change small and reviewable.

Test plan

  • Added test_offloading_decision_summary_reads_all_split_segments in tests/unit/test_offloading_decision_summary.py, writing 3 rows with max_rows=1 (forcing 3 segments, no base file) and asserting the summary covers all of them in order.
  • uv run pytest tests/unit -q — 148 passed, 1 skipped
  • Fast CI suite (tests/unit, integration subset, mqtt, offloading_algo) — 204 passed, 1 skipped, no regressions
  • Updated docs/OFFLOADING_DECISION_EVENTS.md to reflect the new behavior (previously told users to manually point at a segment).

The summary script used iter_offloading_decisions(), which only reads a
single file. Once offloading_decisions.csv splitting is enabled the base
file is never written, so pointing the script at it silently produced an
empty summary. Switch to iter_run_offloading_decisions(), which discovers
and reads every .segNNNN_* segment for the run.

Addresses one item of #52 (the offline-reader verification task); the
other analysis entry points already glob all segments.
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.

1 participant