feat(competitions): add submission status command and --wait support#1139
Open
sridipbasu wants to merge 1 commit into
Open
feat(competitions): add submission status command and --wait support#1139sridipbasu wants to merge 1 commit into
sridipbasu wants to merge 1 commit into
Conversation
Contributor
Author
Contributor
|
/gcbrun |
bovard
requested changes
Jul 20, 2026
| """ | ||
| if kernel and not version or version and not kernel: | ||
| raise ValueError("Code competition submissions require both the output file name and the version number") | ||
| if wait is not None and poll_interval <= 0: |
Member
There was a problem hiding this comment.
to avoid ddosing ourselves, there should be a sane minimum poll interval
| start_time = time.time() | ||
| current_interval = min(self._ADAPTIVE_POLL_START, poll_interval) | ||
| try: | ||
| while True: |
Member
There was a problem hiding this comment.
Given a max notebook runtime of 12 hours, this should wait a maximum of 12 hours before exiting
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
This PR improves the competition submission workflow by adding support for waiting on a submission to finish scoring and by exposing submission details through a new CLI command.
What's changed
kaggle competitions submitnow prints the submission reference after a successful submission.--wait [SECONDS]to wait until a submission finishes scoring and print the public score.--poll-intervalto control the maximum polling interval while waiting.to view the status and details of a single submission.
Why?
Currently, after submitting to a competition, the CLI exits immediately and doesn't expose the submission reference returned by the backend. Although the SDK already provides a
get_submission()API, there isn't a CLI command that uses it.This makes it difficult to automate competition workflows or use the CLI in CI pipelines since users have to repeatedly check
kaggle competitions submissionsand identify the correct submission manually.This PR exposes the existing SDK functionality through the CLI without requiring any backend changes.
Example
$ kaggle competitions submit -c titanic -f submission.csv -m "CI run" --wait Submission ref: 12345678 Submission status: PENDING... Submission status: PENDING... Submission scored. Public score: 0.78468Implementation
404responses immediately after submission.Testing
Added unit tests covering parser behavior, polling, timeout handling, scoring failures, retries, and the new command.
Ran the full test suite.
Verified the feature against the live Kaggle API by:
Backward compatibility
Without
--wait, the existing submission workflow behaves as before. The only visible change is that the submission reference is now printed after a successful submission.