Route benchmarks warnings and errors to stderr#1032
Merged
Conversation
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.
Contributor
|
not very sure if this is legit so defer to @dolaameng . thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
pytest tests/— 45/45)kaggle benchmarks initin a directory where the example file already exists) renders the warning to stderr