Skip to content

Route benchmarks warnings and errors to stderr#1032

Merged
simsryan-google merged 1 commit into
mainfrom
pr/benchmarks-cli-stderr-sweep
May 28, 2026
Merged

Route benchmarks warnings and errors to stderr#1032
simsryan-google merged 1 commit into
mainfrom
pr/benchmarks-cli-stderr-sweep

Conversation

@simsryan-google
Copy link
Copy Markdown
Contributor

@simsryan-google simsryan-google commented May 27, 2026

Summary

Phase 2 of the Kaggle benchmarks CLI error-message polish. Five benchmarks messages currently print to stdout but represent warnings or errors. Routing them to stderr keeps stdout clean for piped/parsed output.

  • benchmarks tasks delete — "Delete is not supported by the server yet."
  • benchmarks tasks log — "(No logs available — server returned N)" fallback when a per-run log fetch 404s.
  • benchmarks init — "Example file already exists at '…', skipping." and "Reference file already exists at '…', skipping." (also quoted the path for consistency with Phase 1).
  • benchmarks tasks publish — "Note: No backing notebook is associated with this task."

Scoped to benchmarks-only call sites; no shared infrastructure touched.

Note on overlap with #1030 (Phase 1)

I deliberately omitted the two Timed out… messages in _poll_task_creation / _poll_runs — Phase 1 (#1030) already edits those lines, and rerouting them here would conflict. Happy to follow up with a small rebase PR once #1030 lands if reviewers want those routed to stderr too.

Test plan

  • Existing test suite passes (pytest tests/ — 45/45)
  • Spot-check one of the affected paths (e.g. kaggle benchmarks init in a directory where the example file already exists) renders the warning to stderr

Five benchmarks messages currently print to stdout but represent
warnings or errors. Route them to stderr so they don't pollute
piped/parsed output:

- `benchmarks tasks delete` — "Delete is not supported by the
  server yet."
- `benchmarks tasks log` — "(No logs available — server returned N)"
  fallback when a per-run log fetch 404s.
- `benchmarks init` — "Example file already exists at '…', skipping."
  and "Reference file already exists at '…', skipping." (also quoted
  the path for consistency with Phase 1).
- `benchmarks tasks publish` — "Note: No backing notebook is
  associated with this task."

Deliberately omitted the two `Timed out…` messages in `_poll_*`,
since Phase 1 (PR #1030) already edits those lines; rerouting them
here would conflict.
@nl917 nl917 requested a review from dolaameng May 28, 2026 20:04
@nl917
Copy link
Copy Markdown
Contributor

nl917 commented May 28, 2026

not very sure if this is legit so defer to @dolaameng . thank you!

Copy link
Copy Markdown
Contributor

@dolaameng dolaameng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@simsryan-google simsryan-google merged commit a4d4463 into main May 28, 2026
14 checks passed
@simsryan-google simsryan-google deleted the pr/benchmarks-cli-stderr-sweep branch May 28, 2026 20:09
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.

3 participants