Fix(benchmarks): hint when cached download lacks source notebooks#1039
Open
nl917 wants to merge 2 commits into
Open
Fix(benchmarks): hint when cached download lacks source notebooks#1039nl917 wants to merge 2 commits into
nl917 wants to merge 2 commits into
Conversation
If you ran `kaggle b t download <task>` without `-s` and then re-run with
`-s` hoping to backfill the source notebooks, the loop short-circuits on
the existing output directory and the `-s` flag is silently ignored — you
have to discover that `-f -s` is needed.
This adds a one-line tip after the summary when the user passed `-s` but
the cached directory lacks `__notebook__.ipynb` / `__notebook_source__.ipynb`:
Tip: 1 cached run(s) lack source notebooks. Re-run with -f -s to fetch them.
We don't auto-fetch — explicit `-f` keeps the "cached means don't touch"
contract and gives the user control over the additional network cost.
Two tests added in TestDownload:
- test_download_cached_dir_without_source_prints_tip_when_s_passed
- test_download_cached_dir_with_source_does_not_print_tip
dolaameng
reviewed
May 29, 2026
Contributor
There was a problem hiding this comment.
Same as #1038 (comment), please update the doc and skill file
Contributor
There was a problem hiding this comment.
Is this PR on top of download-fix?
Contributor
Author
There was a problem hiding this comment.
yes, this is based on that branch. This PR is not ready yet :)
| output = capsys.readouterr().out | ||
|
|
||
| assert "Cached" in output | ||
| assert "1 cached run(s) lack source notebooks" in output or "lack source notebooks" in output |
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
If you've previously run
kaggle b t download <task>without-sandlater realize you want the source notebooks, running the command again with
-ssilently does nothing — the cached output directory already exists, sothe loop short-circuits before the
-sflag is ever forwarded to thedownload API. You have to discover on your own that
-f -sis needed tobackfill.
This adds a one-line tip after the summary when:
-s(--include-source), and__notebook__.ipynb/__notebook_source__.ipynb.Before / After
Before (
-son an already-cached run silently does nothing):After (tip points to the workaround):