Repository navigation
feat(competitions): add --public to competitions leaderboard - #1222
Merged
stevemessick merged 2 commits intoOct 23, 2026
Merged
Conversation
On a competition that has concluded, `leaderboard --show` and `--download` return different leaderboards and neither says so. `--show` calls GetLeaderboard, whose override_public field was never set, so it returns the final leaderboard. `--download` calls DownloadLeaderboard, which has no such field and returns the public one. On playground-series-s6e8 the top three differ in both score and order between the two. Add --public, which sets override_public on the GetLeaderboard request, so the public leaderboard is reachable from --show and the two commands can be compared like for like. The field is only set when the flag is passed, so without it the request is what it was and --show still returns the final leaderboard, matching what the competition page shows by default. Spell out in the help text and docs which leaderboard each flag returns, since both previously described a difference in destination only. DownloadLeaderboard still cannot return the final leaderboard. Closing that gap needs a decision recorded on Kaggle#731. Part of Kaggle#731
Contributor
Author
|
This doesn't touch Please let me know which you want and I'll do it in a follow-up ! Or we leave |
Contributor
|
/gcbrun |
Contributor
|
/gcbrun |
stevemessick
approved these changes
Oct 23, 2026
stevemessick
left a comment
Contributor
There was a problem hiding this comment.
Thanks! We can leave --download as-is, for now.
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
leaderboard --showand--downloadreturn different leaderboards on a concluded competition, and neither says which. This adds--publicso the public leaderboard is reachable from--show.Problem
--showcallsGetLeaderboard, whoseoverride_publicfield the CLI never set, so it returns the final leaderboard.--downloadcallsDownloadLeaderboard, which has no such field and returns the public one. Onplayground-series-s6e8:Ranks 2 and 3 swap, and further down the two lists hold different teams. Measurements for three competitions are on #731.
Solution
--publicsetsoverride_publicon theGetLeaderboardrequest:which is what
--downloadgives.The field is only set when the flag is passed, so without it the request is what it was and
--showstill returns the final leaderboard. I left that default alone because it is what the competition page shows by default once a competition has concluded.--downloadis unchanged, and--publicdoes not reach it.The help text and
docs/competitions.mdnow say which leaderboard each flag returns. Both previously described a difference in destination only, which is what makes this easy to miss.On
--downloadIt still cannot return the final leaderboard. That needs either
override_publicadded to theDownloadLeaderboardrequest, which is a kagglesdk and server change rather than a CLI one, or serving--downloadby pagingGetLeaderboard. The second stays in this repo but costs one request per 200 rows, and those rows carry onlyteam_id,team_name,submission_dateandscore, so the CSV would lose theRank,SubmissionCountandTeamMemberUserNamescolumns the server writes today. Asked on #731 instead of picking one.Testing
hatch -e test run pytest tests/unit(1408 passed, 3 skipped)hatch run lint:all--show --publicmatches--downloadonplayground-series-s6e8,--showon its own is unchanged, and on the runningarc-prize-2026-arc-agi-2both forms return the same rows/gcbrunwhen convenientEight new tests cover the flag setting the field, the default leaving the request alone, paging still applying alongside it, the CLI forwarding the flag, and
--publicnot altering the download call. Seven of the eight fail against the previous code. The one that does not is the regression guard on the no-flag request, which has to pass either way. One existing parser test gained an assertion thatpublicdefaults to False.Related
Part of #731. It does not close it, since the
--downloadhalf is still open.