kaggle 2.2.0__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. {kaggle-2.2.0 → kaggle-2.2.1}/CHANGELOG.md +10 -0
  2. {kaggle-2.2.0 → kaggle-2.2.1}/PKG-INFO +3 -2
  3. {kaggle-2.2.0 → kaggle-2.2.1}/docs/benchmarks.md +20 -1
  4. {kaggle-2.2.0 → kaggle-2.2.1}/docs/simulation_competitions.md +28 -0
  5. {kaggle-2.2.0 → kaggle-2.2.1}/pyproject.toml +4 -2
  6. {kaggle-2.2.0 → kaggle-2.2.1}/requirements.lock +3 -1
  7. {kaggle-2.2.0 → kaggle-2.2.1}/skills/references/benchmarks.md +4 -2
  8. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/__init__.py +1 -1
  9. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/api/kaggle_api_extended.py +257 -102
  10. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/cli.py +38 -1
  11. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/test/test_benchmarks_cli.py +270 -15
  12. {kaggle-2.2.0 → kaggle-2.2.1}/tests/test_commands.sh +2 -0
  13. kaggle-2.2.1/tests/test_kernel_parsing.py +75 -0
  14. kaggle-2.2.1/tests/test_kernels_pull.py +141 -0
  15. kaggle-2.2.1/tests/test_quota.py +132 -0
  16. kaggle-2.2.1/tests/test_team_submissions.py +96 -0
  17. {kaggle-2.2.0 → kaggle-2.2.1}/.gcloudignore +0 -0
  18. {kaggle-2.2.0 → kaggle-2.2.1}/.gitignore +0 -0
  19. {kaggle-2.2.0 → kaggle-2.2.1}/CONTRIBUTING.md +0 -0
  20. {kaggle-2.2.0 → kaggle-2.2.1}/Dockerfile +0 -0
  21. {kaggle-2.2.0 → kaggle-2.2.1}/GEMINI.md +0 -0
  22. {kaggle-2.2.0 → kaggle-2.2.1}/LICENSE.txt +0 -0
  23. {kaggle-2.2.0 → kaggle-2.2.1}/README.md +0 -0
  24. {kaggle-2.2.0 → kaggle-2.2.1}/SECURITY.md +0 -0
  25. {kaggle-2.2.0 → kaggle-2.2.1}/docker-hatch +0 -0
  26. {kaggle-2.2.0 → kaggle-2.2.1}/docs/Makefile +0 -0
  27. {kaggle-2.2.0 → kaggle-2.2.1}/docs/README.md +0 -0
  28. {kaggle-2.2.0 → kaggle-2.2.1}/docs/competitions.md +0 -0
  29. {kaggle-2.2.0 → kaggle-2.2.1}/docs/conf.py +0 -0
  30. {kaggle-2.2.0 → kaggle-2.2.1}/docs/configuration.md +0 -0
  31. {kaggle-2.2.0 → kaggle-2.2.1}/docs/datasets.md +0 -0
  32. {kaggle-2.2.0 → kaggle-2.2.1}/docs/datasets_metadata.md +0 -0
  33. {kaggle-2.2.0 → kaggle-2.2.1}/docs/forums.md +0 -0
  34. {kaggle-2.2.0 → kaggle-2.2.1}/docs/index.rst +0 -0
  35. {kaggle-2.2.0 → kaggle-2.2.1}/docs/kernels.md +0 -0
  36. {kaggle-2.2.0 → kaggle-2.2.1}/docs/kernels_metadata.md +0 -0
  37. {kaggle-2.2.0 → kaggle-2.2.1}/docs/make.bat +0 -0
  38. {kaggle-2.2.0 → kaggle-2.2.1}/docs/model_variations.md +0 -0
  39. {kaggle-2.2.0 → kaggle-2.2.1}/docs/model_variations_versions.md +0 -0
  40. {kaggle-2.2.0 → kaggle-2.2.1}/docs/models.md +0 -0
  41. {kaggle-2.2.0 → kaggle-2.2.1}/docs/models_metadata.md +0 -0
  42. {kaggle-2.2.0 → kaggle-2.2.1}/docs/tutorials.md +0 -0
  43. {kaggle-2.2.0 → kaggle-2.2.1}/integration_tests/__init__.py +0 -0
  44. {kaggle-2.2.0 → kaggle-2.2.1}/integration_tests/test_models.py +0 -0
  45. {kaggle-2.2.0 → kaggle-2.2.1}/requirements-lint.in +0 -0
  46. {kaggle-2.2.0 → kaggle-2.2.1}/requirements-lint.lock +0 -0
  47. {kaggle-2.2.0 → kaggle-2.2.1}/requirements-test.in +0 -0
  48. {kaggle-2.2.0 → kaggle-2.2.1}/requirements-test.lock +0 -0
  49. {kaggle-2.2.0 → kaggle-2.2.1}/skills/SKILL.md +0 -0
  50. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/LICENSE +0 -0
  51. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/__main__.py +0 -0
  52. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/api/__init__.py +0 -0
  53. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/api/kaggle_api.py +0 -0
  54. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/models/__init__.py +0 -0
  55. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/models/kaggle_models_extended.py +0 -0
  56. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/models/upload_file.py +0 -0
  57. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/test/conftest.py +0 -0
  58. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/test/test_authenticate.py +0 -0
  59. {kaggle-2.2.0 → kaggle-2.2.1}/src/kaggle/test/test_discussions_cli.py +0 -0
  60. {kaggle-2.2.0 → kaggle-2.2.1}/tests/__init__.py +0 -0
  61. {kaggle-2.2.0 → kaggle-2.2.1}/tests/dataset/data.csv +0 -0
  62. {kaggle-2.2.0 → kaggle-2.2.1}/tests/kernel/testing-x.ipynb +0 -0
  63. {kaggle-2.2.0 → kaggle-2.2.1}/tests/model/instance/data.csv +0 -0
  64. {kaggle-2.2.0 → kaggle-2.2.1}/tests/model/instance/version/metadata.json +0 -0
  65. {kaggle-2.2.0 → kaggle-2.2.1}/tests/run_tests.sh +0 -0
  66. {kaggle-2.2.0 → kaggle-2.2.1}/tests/sample_submission.csv +0 -0
  67. {kaggle-2.2.0 → kaggle-2.2.1}/tests/test_dataset_status.py +0 -0
  68. {kaggle-2.2.0 → kaggle-2.2.1}/tests/test_kernels_logs.py +0 -0
  69. {kaggle-2.2.0 → kaggle-2.2.1}/tests/test_retry_after.py +0 -0
  70. {kaggle-2.2.0 → kaggle-2.2.1}/tests/unit_tests.py +0 -0
  71. {kaggle-2.2.0 → kaggle-2.2.1}/tools/cicd/Dockerfile +0 -0
  72. {kaggle-2.2.0 → kaggle-2.2.1}/tools/cicd/cloudbuild.yaml +0 -0
  73. {kaggle-2.2.0 → kaggle-2.2.1}/tools/cicd/integration-tests.yaml +0 -0
  74. {kaggle-2.2.0 → kaggle-2.2.1}/tools/releases/Dockerfile +0 -0
  75. {kaggle-2.2.0 → kaggle-2.2.1}/tools/releases/cloudbuild.yaml +0 -0
  76. {kaggle-2.2.0 → kaggle-2.2.1}/tools/releases/requirements.in +0 -0
  77. {kaggle-2.2.0 → kaggle-2.2.1}/tools/releases/requirements.txt +0 -0
  78. {kaggle-2.2.0 → kaggle-2.2.1}/tools/use-localhost.sh +0 -0
  79. {kaggle-2.2.0 → kaggle-2.2.1}/tools/use-prod.sh +0 -0
@@ -3,6 +3,16 @@ Changelog
3
3
 
4
4
  ### Next
5
5
 
6
+ ### 2.2.1
7
+
8
+ * Add `kaggle competitions team-submissions` command (#1036)
9
+ * Add `kaggle quota` command for GPU/TPU accelerator quota (#1029)
10
+ * Support optional kernel version in specifier (#1035)
11
+ * feat(benchmarks): Add log and download source files (#1019)
12
+ * Fix benchmarks CLI error handling and UX improvements (#1024, #1026, #1028, #1030, #1032, #1037, #1039)
13
+ * Fix JSON serialization and download label display (#1038, #1040, #1042)
14
+ * Set proper permissions on auth file (#1033)
15
+
6
16
  ### 2.2.0
7
17
 
8
18
  * Add test runner workflow
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: kaggle
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Access Kaggle resources anywhere
5
5
  Project-URL: Homepage, https://github.com/Kaggle/kaggle-cli
6
6
  Project-URL: Issues, https://github.com/Kaggle/kaggle-cli/issues
@@ -214,10 +214,11 @@ Classifier: Programming Language :: Python :: 3
214
214
  Requires-Python: >=3.11
215
215
  Requires-Dist: bleach
216
216
  Requires-Dist: jupytext
217
- Requires-Dist: kagglesdk<1.0,>=0.1.24
217
+ Requires-Dist: kagglesdk<1.0,>=0.1.27
218
218
  Requires-Dist: packaging
219
219
  Requires-Dist: protobuf
220
220
  Requires-Dist: python-dateutil
221
+ Requires-Dist: python-dotenv
221
222
  Requires-Dist: python-slugify
222
223
  Requires-Dist: requests
223
224
  Requires-Dist: tqdm
@@ -329,10 +329,29 @@ Downloads and extracts the output zip archive for each completed run. Files are
329
329
  ├── output files...
330
330
  ```
331
331
 
332
- Already-downloaded runs (where the output directory exists) are automatically skipped unless the `-f` / `--force` flag is used, in which case they are overwritten.
332
+ Progress is rendered as a table with one row per run:
333
+
334
+ ```
335
+ Model File Size Progress
336
+ ──────────────────── ──────────────────────────────────────── ────────── ──────────
337
+ gemini-2.5-pro gemini-2.5-pro/12345/ 1.24MB Done
338
+ claude-sonnet-4 claude-sonnet-4/12346/ 2.10MB Cached
339
+ ```
340
+
341
+ The `Size` column reports the extracted on-disk size of the run's output directory. The `Progress` column is one of `Done` (freshly downloaded), `Cached` (output directory already on disk from a previous download), or `Bad zip` (downloaded archive was corrupt).
342
+
343
+ Already-downloaded runs (where the output directory exists) are automatically skipped — they appear as `Cached` rows — unless the `-f` / `--force` flag is used, in which case they are overwritten.
333
344
 
334
345
  When `--include-source` is used, the downloaded zip also contains the kernel session's source files (e.g., `__notebook__.ipynb` and `__notebook_source__.ipynb`).
335
346
 
347
+ If you re-run with `-s` after a previous download that omitted source notebooks, the cached directories are not re-fetched and the `-s` flag is effectively ignored. The CLI detects this and prints a tip after the summary:
348
+
349
+ ```
350
+ Tip: 2 cached run(s) lack source notebooks. Re-run with -f -s to fetch them.
351
+ ```
352
+
353
+ Use `-f -s` together to force re-download and backfill the source notebooks into the cached runs.
354
+
336
355
  ---
337
356
 
338
357
  ### `kaggle benchmarks tasks log`
@@ -140,6 +140,30 @@ kaggle competitions logs 98765432 1 -p ./logs
140
140
 
141
141
  This downloads the log file as `episode-98765432-agent-0-logs.json`.
142
142
 
143
+ ## 9. Inspect Top Teams' Active Agents
144
+
145
+ You can study how the leading teams' agents are performing — useful for scouting strategies or understanding the metagame. Start from the leaderboard to grab the team ID:
146
+
147
+ ```bash
148
+ kaggle competitions leaderboard connectx -s
149
+ ```
150
+
151
+ This prints a table with columns `teamId`, `teamName`, `submissionDate`, `score`. Take the `teamId` of the team you want to inspect (e.g., first place), then list every active submission they have on the leaderboard:
152
+
153
+ ```bash
154
+ kaggle competitions team-submissions 42
155
+ ```
156
+
157
+ This returns the team's public-safe submissions — `id`, `dateSubmitted`, and `publicScore`. For simulation competitions every leaderboard-eligible submission is listed (not just the best one), so you can see the full rotation of agents a top team is fielding.
158
+
159
+ Pick the submission with the highest `publicScore` and list its episodes, just like you would for your own:
160
+
161
+ ```bash
162
+ kaggle competitions episodes 98765432
163
+ ```
164
+
165
+ From there you can pull replays and agent logs for any episode that submission played in (`kaggle competitions replay <episode_id>` / `kaggle competitions logs <episode_id> <agent_index>`).
166
+
143
167
  ## Putting It All Together
144
168
 
145
169
  Here's a typical workflow for iterating on a simulation competition agent:
@@ -167,4 +191,8 @@ kaggle competitions logs 98765432 0
167
191
 
168
192
  # Check the leaderboard
169
193
  kaggle competitions leaderboard connectx -s
194
+
195
+ # Scout the leader: list their active agents, then pick the best one's episodes
196
+ kaggle competitions team-submissions <leader-team-id>
197
+ kaggle competitions episodes <best-submission-id>
170
198
  ```
@@ -24,7 +24,7 @@ keywords = ["Kaggle", "API"]
24
24
  requires-python = ">= 3.11"
25
25
  dependencies = [
26
26
  "bleach",
27
- "kagglesdk >= 0.1.24, < 1.0", # sync with kagglehub
27
+ "kagglesdk >= 0.1.27, < 1.0", # sync with kagglehub
28
28
  "python-slugify",
29
29
  "requests",
30
30
  "python-dateutil",
@@ -33,6 +33,7 @@ dependencies = [
33
33
  "packaging",
34
34
  "protobuf",
35
35
  "jupytext",
36
+ "python-dotenv",
36
37
  ]
37
38
 
38
39
  [project.scripts]
@@ -97,7 +98,8 @@ module = [
97
98
  # TODO(b/505845982): Generate type hints for kagglesdk
98
99
  "kagglesdk.*",
99
100
  "kaggle_api_extended.*",
100
- "jupytext.*"
101
+ "jupytext.*",
102
+ "dotenv.*"
101
103
  ]
102
104
  ignore_missing_imports = true
103
105
 
@@ -26,7 +26,7 @@ jupyter-core==5.9.1
26
26
  # via nbformat
27
27
  jupytext==1.19.1
28
28
  # via kaggle (pyproject.toml)
29
- kagglesdk==0.1.24
29
+ kagglesdk==0.1.25
30
30
  # via kaggle (pyproject.toml)
31
31
  markdown-it-py==4.0.0
32
32
  # via
@@ -50,6 +50,8 @@ protobuf==7.34.1
50
50
  # kagglesdk
51
51
  python-dateutil==2.9.0.post0
52
52
  # via kaggle (pyproject.toml)
53
+ python-dotenv==1.2.2
54
+ # via kaggle (pyproject.toml)
53
55
  python-slugify==8.0.4
54
56
  # via kaggle (pyproject.toml)
55
57
  pyyaml==6.0.3
@@ -254,8 +254,10 @@ kaggle b t download my-task --include-source
254
254
  **Behavior details:**
255
255
  - Downloads outputs for all runs in a **terminal state** — this includes both `COMPLETED` and `ERRORED` runs (errored runs may still have partial output)
256
256
  - Downloads zip archives and extracts them automatically
257
- - Already-downloaded runs are skipped (use `--force` to re-download): `Skipping gemini-2.5-pro (run 123) — already downloaded to ./my-task/1/gemini-2.5-pro/123`
258
- - Corrupt zips: Warning printed, raw `.zip` file kept, continues with other models
257
+ - Progress is rendered as a table with `Model | File | Size | Progress` columns. `Size` is the extracted on-disk size of the run's output directory.
258
+ - Already-downloaded runs are skipped (use `--force` to re-download) and shown as a `Cached` row in the table
259
+ - Corrupt zips show as a `Bad zip` row; the raw `.zip` is kept on disk and the next run is processed
260
+ - If `-s` is passed but a cached run's directory lacks source notebooks (`__notebook__.ipynb` / `__notebook_source__.ipynb`), the cached row is left untouched and a tip is printed after the summary: `Tip: N cached run(s) lack source notebooks. Re-run with -f -s to fetch them.` — use `-f -s` together to backfill source notebooks into existing cached runs.
259
261
  - No downloadable runs (all still in progress): `No downloadable runs yet — N run(s) still in progress. Use 'kaggle b t status my-task' to check progress.`
260
262
  - No runs at all: `No runs found for task 'my-task'. Use 'kaggle b t run my-task' to start one.`
261
263
 
@@ -2,7 +2,7 @@
2
2
  from __future__ import absolute_import
3
3
  from kaggle.api.kaggle_api_extended import KaggleApi
4
4
 
5
- __version__ = "2.2.0"
5
+ __version__ = "2.2.1"
6
6
 
7
7
  api = KaggleApi()
8
8
  api.authenticate()