Competition Workflows
Overview
Use this skill for Kaggle competition workflows from data access through notebook execution and submission. Prioritize reproducibility, rule compliance, and leakage prevention over leaderboard-chasing shortcuts.
Submission from Notebook Output
Use the notebook-kernel submission form when submitting an output file produced by a notebook version:
kaggle competitions submit <competition> -k <owner/slug> -f <file> -v <version> -m "<message>"
Before submission, confirm the notebook run completed successfully, the output file exists, and the version number matches the intended run. Use notebook-lifecycle for status, logs, files, and output download commands.
Competition Data Access
Use Kaggle CLI or kagglehub for competition downloads. Attach competition sources in kernel-metadata.json when the notebook must run on Kaggle. Confirm users accepted competition rules before assuming downloads or submissions will work.
Submission Validation Checklist
- Assert required columns, order, row count, and ID coverage.
- Check for nulls, infinities, invalid labels, and out-of-range predictions.
- Save outputs under
/kaggle/working during Kaggle runs.
- Verify the submitted filename exactly matches the generated artifact.
- Include a concise submission message that identifies model/run changes without exposing secrets.
Leakage and Validation Review
Use group/time/stratified splits that match the competition structure. Apply preprocessing inside folds to avoid fitting transforms on validation data. Avoid using public leaderboard feedback as a validation set; repeated leaderboard probing can overfit. Confirm external data, pretrained models, internet access, and ensemble sources comply with rules.
Reproducibility Standards
Notebook should execute top-to-bottom from a clean Kaggle session. Set seeds for Python, NumPy, framework libraries, and splitters where applicable. Pin package versions when environment drift could affect results. Use a DEBUG flag to run small samples locally or during fast checks without changing final-run logic.
Common Failure Modes
| Symptom |
Check |
| Submission rejected |
Filename, columns, rows, competition slug, accepted rules |
| Score impossible |
Leakage, target contamination, ID mismatch, train/test merge mistake |
| Notebook output missing |
Save location, run failure, timeout, file pattern |
| Local score diverges |
Split mismatch, fold leakage, random seeds, preprocessing outside folds |
Safety and Limits
Do not bypass competition rules or suggest hidden test reconstruction, private data scraping, or external data not allowed by rules. Warn before long GPU/TPU training runs. If secrets are needed, advise Kaggle Secrets through the UI; do not claim public API support for secrets administration.
Sources
1---2name: competition-workflows3description: Kaggle competition notebook workflows and submissions. PROACTIVELY activate for: (1) submitting notebook outputs to competitions, (2) `kaggle competitions submit -k`, (3) downloading competition data, (4) validating submission.csv format, (5) leakage review, (6) cross-validation split design, (7) public leaderboard overfitting concerns, (8) competition rule compliance, (9) reproducible top-to-bottom notebook execution, (10) fold-aware preprocessing for ML pipelines. Provides: submission commands, validation checklist, leakage controls, and competition-ready notebook guidance.4---5
6# Competition Workflows
7
8## Overview
9
10Use this skill for Kaggle competition workflows from data access through notebook execution and submission. Prioritize reproducibility, rule compliance, and leakage prevention over leaderboard-chasing shortcuts.
11
12## Submission from Notebook Output
13
14Use the notebook-kernel submission form when submitting an output file produced by a notebook version:
15
16```bash
17kaggle competitions submit <competition> -k <owner/slug> -f <file> -v <version> -m "<message>"
18```
19
20Before submission, confirm the notebook run completed successfully, the output file exists, and the version number matches the intended run. Use `notebook-lifecycle` for status, logs, files, and output download commands.
21
22## Competition Data Access
23
24Use Kaggle CLI or kagglehub for competition downloads. Attach competition sources in `kernel-metadata.json` when the notebook must run on Kaggle. Confirm users accepted competition rules before assuming downloads or submissions will work.
25
26## Submission Validation Checklist
27
28- Assert required columns, order, row count, and ID coverage.
29- Check for nulls, infinities, invalid labels, and out-of-range predictions.
30- Save outputs under `/kaggle/working` during Kaggle runs.
31- Verify the submitted filename exactly matches the generated artifact.
32- Include a concise submission message that identifies model/run changes without exposing secrets.
33
34## Leakage and Validation Review
35
36Use group/time/stratified splits that match the competition structure. Apply preprocessing inside folds to avoid fitting transforms on validation data. Avoid using public leaderboard feedback as a validation set; repeated leaderboard probing can overfit. Confirm external data, pretrained models, internet access, and ensemble sources comply with rules.
37
38## Reproducibility Standards
39
40Notebook should execute top-to-bottom from a clean Kaggle session. Set seeds for Python, NumPy, framework libraries, and splitters where applicable. Pin package versions when environment drift could affect results. Use a `DEBUG` flag to run small samples locally or during fast checks without changing final-run logic.
41
42## Common Failure Modes
43
44| Symptom | Check |
45|---|---|
46| Submission rejected | Filename, columns, rows, competition slug, accepted rules |
47| Score impossible | Leakage, target contamination, ID mismatch, train/test merge mistake |
48| Notebook output missing | Save location, run failure, timeout, file pattern |
49| Local score diverges | Split mismatch, fold leakage, random seeds, preprocessing outside folds |
50
51## Safety and Limits
52
53Do not bypass competition rules or suggest hidden test reconstruction, private data scraping, or external data not allowed by rules. Warn before long GPU/TPU training runs. If secrets are needed, advise Kaggle Secrets through the UI; do not claim public API support for secrets administration.
54
55## Sources
56
57- Kaggle API docs: https://www.kaggle.com/docs/api
58- Kaggle notebooks docs: https://www.kaggle.com/docs/notebooks
59- Kaggle kernels CLI: https://github.com/Kaggle/kaggle-api/blob/main/docs/kernels.md