kaggle 2.2.0__tar.gz → 2.2.2__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.
- {kaggle-2.2.0 → kaggle-2.2.2}/.gitignore +1 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/CHANGELOG.md +24 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/PKG-INFO +3 -2
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/benchmarks.md +24 -1
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/datasets_metadata.md +2 -2
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/kernels.md +90 -1
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/kernels_metadata.md +2 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/simulation_competitions.md +28 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/pyproject.toml +4 -2
- {kaggle-2.2.0 → kaggle-2.2.2}/requirements.lock +3 -1
- kaggle-2.2.2/skills/SKILL.md +95 -0
- kaggle-2.2.2/skills/references/auth.md +137 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/skills/references/benchmarks.md +293 -33
- kaggle-2.2.2/skills/references/competitions.md +452 -0
- kaggle-2.2.2/skills/references/configuration.md +122 -0
- kaggle-2.2.2/skills/references/datasets.md +346 -0
- kaggle-2.2.2/skills/references/files.md +70 -0
- kaggle-2.2.2/skills/references/forums.md +127 -0
- kaggle-2.2.2/skills/references/kernels.md +273 -0
- kaggle-2.2.2/skills/references/model_variations.md +206 -0
- kaggle-2.2.2/skills/references/model_variations_versions.md +156 -0
- kaggle-2.2.2/skills/references/models.md +250 -0
- kaggle-2.2.2/skills/references/quota.md +65 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/__init__.py +1 -1
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/api/kaggle_api_extended.py +585 -121
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/cli.py +126 -5
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/test/test_benchmarks_cli.py +365 -25
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/test/test_discussions_cli.py +189 -21
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/test_commands.sh +7 -0
- kaggle-2.2.2/tests/test_dataset_metadata_update.py +133 -0
- kaggle-2.2.2/tests/test_kernel_parsing.py +75 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/test_kernels_logs.py +79 -0
- kaggle-2.2.2/tests/test_kernels_pull.py +141 -0
- kaggle-2.2.2/tests/test_quota.py +132 -0
- kaggle-2.2.2/tests/test_team_submissions.py +96 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/unit_tests.py +8 -1
- kaggle-2.2.0/skills/SKILL.md +0 -44
- {kaggle-2.2.0 → kaggle-2.2.2}/.gcloudignore +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/CONTRIBUTING.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/Dockerfile +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/GEMINI.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/LICENSE.txt +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/README.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/SECURITY.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docker-hatch +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/Makefile +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/README.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/competitions.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/conf.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/configuration.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/datasets.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/forums.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/index.rst +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/make.bat +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/model_variations.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/model_variations_versions.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/models.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/models_metadata.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/docs/tutorials.md +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/integration_tests/__init__.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/integration_tests/test_models.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/requirements-lint.in +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/requirements-lint.lock +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/requirements-test.in +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/requirements-test.lock +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/LICENSE +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/__main__.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/api/__init__.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/api/kaggle_api.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/models/__init__.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/models/kaggle_models_extended.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/models/upload_file.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/test/conftest.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/src/kaggle/test/test_authenticate.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/__init__.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/dataset/data.csv +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/kernel/testing-x.ipynb +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/model/instance/data.csv +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/model/instance/version/metadata.json +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/run_tests.sh +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/sample_submission.csv +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/test_dataset_status.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tests/test_retry_after.py +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/cicd/Dockerfile +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/cicd/cloudbuild.yaml +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/cicd/integration-tests.yaml +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/releases/Dockerfile +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/releases/cloudbuild.yaml +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/releases/requirements.in +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/releases/requirements.txt +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/use-localhost.sh +0 -0
- {kaggle-2.2.0 → kaggle-2.2.2}/tools/use-prod.sh +0 -0
|
@@ -3,6 +3,30 @@ Changelog
|
|
|
3
3
|
|
|
4
4
|
### Next
|
|
5
5
|
|
|
6
|
+
### 2.2.2
|
|
7
|
+
|
|
8
|
+
* Clarify LLMS_AVAILABLE vs. full model set in benchmarks docs (#1061)
|
|
9
|
+
* Add kernels topics command (#1056)
|
|
10
|
+
* Improve benchmark task error messages in kaggle CLI (#1057)
|
|
11
|
+
* Fix dataset metadata column/file description updates and docs (#1055)
|
|
12
|
+
* Expand Kaggle CLI skill references (#1054)
|
|
13
|
+
* Tag benchmarks token requests with CLI source for analytics (#1050)
|
|
14
|
+
* Add machine_shape to kernels_initialize metadata template and docs (#1048)
|
|
15
|
+
* Fix 403 for dataset, model, and benchmark topics list (#1051)
|
|
16
|
+
* Fix test_benchmarks_cli.py assertions (#1049)
|
|
17
|
+
* Add paginated downloads for kernel output files (#1046)
|
|
18
|
+
* fix(tests): resolve infinite loop in test_kernels_d_status (#1043)
|
|
19
|
+
|
|
20
|
+
### 2.2.1
|
|
21
|
+
|
|
22
|
+
* Add `kaggle competitions team-submissions` command (#1036)
|
|
23
|
+
* Add `kaggle quota` command for GPU/TPU accelerator quota (#1029)
|
|
24
|
+
* Support optional kernel version in specifier (#1035)
|
|
25
|
+
* feat(benchmarks): Add log and download source files (#1019)
|
|
26
|
+
* Fix benchmarks CLI error handling and UX improvements (#1024, #1026, #1028, #1030, #1032, #1037, #1039)
|
|
27
|
+
* Fix JSON serialization and download label display (#1038, #1040, #1042)
|
|
28
|
+
* Set proper permissions on auth file (#1033)
|
|
29
|
+
|
|
6
30
|
### 2.2.0
|
|
7
31
|
|
|
8
32
|
* Add test runner workflow
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: kaggle
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
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.
|
|
217
|
+
Requires-Dist: kagglesdk<1.0,>=0.1.30
|
|
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
|
|
@@ -77,6 +77,8 @@ In addition to the three credential variables written by `auth`, `init` also wri
|
|
|
77
77
|
* `LLM_DEFAULT_EVAL` — Default model slug for evaluation.
|
|
78
78
|
* `LLMS_AVAILABLE` — Comma-separated list of available model slugs.
|
|
79
79
|
|
|
80
|
+
> **Note:** `LLMS_AVAILABLE` is a curated subset of models intended for local development and testing — it is **not** the full set of available models, and the Model Proxy token itself is not restricted to these models. To see all available models, use `kaggle benchmarks tasks models`. To run a task against any model (including those not in `LLMS_AVAILABLE`), use `kaggle benchmarks tasks run`, which executes on Kaggle's infrastructure with access to the full model catalog.
|
|
81
|
+
|
|
80
82
|
`init` also creates two files alongside the example file:
|
|
81
83
|
|
|
82
84
|
* **`example_task.py`** (or custom name via `--example-file`) — A starter Python script demonstrating how to define a benchmark task using `@task` decorators and the `kaggle_benchmarks` library.
|
|
@@ -271,6 +273,8 @@ kaggle benchmarks tasks status <TASK> [options]
|
|
|
271
273
|
|
|
272
274
|
Prints the task's metadata (slug, creation status, creation time, URL) followed by a table of all runs. Each run row shows the model name, run state, start time, and end time. Any errored runs display their error messages below the table.
|
|
273
275
|
|
|
276
|
+
If task creation itself failed, the `Status:` line shows the failure *kind* — the cleaned creation-state enum, titlecased (e.g. `Kernel_Without_Run`, `No_Model_Specified`, `Validation_Failed`, `Errored`) — and an `Error:` line is appended below it with the server-provided `creation_error_message` explaining what went wrong.
|
|
277
|
+
|
|
274
278
|
---
|
|
275
279
|
|
|
276
280
|
### `kaggle benchmarks tasks download`
|
|
@@ -329,10 +333,29 @@ Downloads and extracts the output zip archive for each completed run. Files are
|
|
|
329
333
|
├── output files...
|
|
330
334
|
```
|
|
331
335
|
|
|
332
|
-
|
|
336
|
+
Progress is rendered as a table with one row per run:
|
|
337
|
+
|
|
338
|
+
```
|
|
339
|
+
Model File Size Progress
|
|
340
|
+
──────────────────── ──────────────────────────────────────── ────────── ──────────
|
|
341
|
+
gemini-2.5-pro gemini-2.5-pro/12345/ 1.24MB Done
|
|
342
|
+
claude-sonnet-4 claude-sonnet-4/12346/ 2.10MB Cached
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
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).
|
|
346
|
+
|
|
347
|
+
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
348
|
|
|
334
349
|
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
350
|
|
|
351
|
+
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:
|
|
352
|
+
|
|
353
|
+
```
|
|
354
|
+
Tip: 2 cached run(s) lack source notebooks. Re-run with -f -s to fetch them.
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
Use `-f -s` together to force re-download and backfill the source notebooks into the cached runs.
|
|
358
|
+
|
|
336
359
|
---
|
|
337
360
|
|
|
338
361
|
### `kaggle benchmarks tasks log`
|
|
@@ -74,7 +74,7 @@ The following metadata is currently supported:
|
|
|
74
74
|
* `schema`: File schema (definition below):
|
|
75
75
|
* `fields`: Array of fields in the dataset. Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly. A later version of the API will fix this bug.
|
|
76
76
|
* `name`: Field name
|
|
77
|
-
* `
|
|
77
|
+
* `description`: Field description (Note: `title` is also accepted for backward compatibility, but `description` is preferred)
|
|
78
78
|
* `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.
|
|
79
79
|
* `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle. If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.
|
|
80
80
|
* `kaggle datasets version` (create a new version for an existing Dataset):
|
|
@@ -88,7 +88,7 @@ The following metadata is currently supported:
|
|
|
88
88
|
* `schema`: File schema (definition below):
|
|
89
89
|
* `fields`: Array of fields in the dataset. Please note that this needs to include ALL of the fields in the data in order or they will not be matched up correctly. A later version of the API will fix this bug.
|
|
90
90
|
* `name`: Field name
|
|
91
|
-
* `
|
|
91
|
+
* `description`: Field description (Note: `title` is also accepted for backward compatibility, but `description` is preferred)
|
|
92
92
|
* `type`: Field type. A best-effort list of types will be kept at the bottom of this page, but new types may be added that are not documented here.
|
|
93
93
|
* `keywords`: Contains an array of strings that correspond to an existing tag on Kaggle. If a specified tag doesn't exist, the upload will continue, but that specific tag won't be added.
|
|
94
94
|
* `kaggle datasets metadata --update` (update metadata for an existing Dataset) supports all fields mentioned above for `kaggle datasets version`, and additionally:
|
|
@@ -226,6 +226,8 @@ kaggle kernels output <KERNEL> [options]
|
|
|
226
226
|
* `-o, --force`: Force download, overwriting existing files.
|
|
227
227
|
* `-q, --quiet`: Suppress verbose output.
|
|
228
228
|
* `--file-pattern <REGEX>`: Regex pattern to match against filenames. Only files matching the pattern will be downloaded.
|
|
229
|
+
* `--page-size <SIZE>`: Number of output files to request per page. Default size is 20, max is 200.
|
|
230
|
+
* `--page-token <TOKEN>`: Download files from a specific output page. If Kaggle returns another page token, it is printed after the download.
|
|
229
231
|
|
|
230
232
|
**Example:**
|
|
231
233
|
|
|
@@ -240,9 +242,27 @@ Download PNG files only:
|
|
|
240
242
|
kaggle kernels output <kernel> --file-pattern ".*\.png$" # Only PNG files
|
|
241
243
|
```
|
|
242
244
|
|
|
245
|
+
Download matching PNG files across all output pages:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
kaggle kernels output <kernel> --file-pattern ".*\.png$"
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
Download files from a specific output page:
|
|
252
|
+
|
|
253
|
+
```bash
|
|
254
|
+
kaggle kernels output <kernel> --page-token <TOKEN>
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
Download files in smaller pages:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
kaggle kernels output <kernel> --page-size 50
|
|
261
|
+
```
|
|
262
|
+
|
|
243
263
|
**Purpose:**
|
|
244
264
|
|
|
245
|
-
Use this command to retrieve the files generated by a kernel run, such as submission files, processed data, or visualizations.
|
|
265
|
+
Use this command to retrieve the files generated by a kernel run, such as submission files, processed data, or visualizations. By default, output downloads scan every available output page, so `--file-pattern` can match files beyond the first page. Use `--page-size` to control how many files are requested on each page, and use `--page-token` when you only want to download files from one specific page.
|
|
246
266
|
|
|
247
267
|
## `kaggle kernels status`
|
|
248
268
|
|
|
@@ -299,3 +319,72 @@ kaggle kernels delete $KAGGLE_DEVELOPER/exercise-delete --yes
|
|
|
299
319
|
**Purpose:**
|
|
300
320
|
|
|
301
321
|
This command permanently removes one of your kernels from Kaggle. Use with caution.
|
|
322
|
+
|
|
323
|
+
## `kaggle kernels topics list`
|
|
324
|
+
|
|
325
|
+
Lists discussion topics for a kernel.
|
|
326
|
+
|
|
327
|
+
**Usage:**
|
|
328
|
+
|
|
329
|
+
```bash
|
|
330
|
+
kaggle kernels topics list <KERNEL> [options]
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
**Arguments:**
|
|
334
|
+
|
|
335
|
+
* `<KERNEL>`: Kernel ref in format `<owner>/<kernel-slug>` (e.g., `owner/kernel-slug`).
|
|
336
|
+
|
|
337
|
+
**Options:**
|
|
338
|
+
|
|
339
|
+
* `--sort-by <SORT_BY>`: Sort order. Valid options: `hot`, `top`, `new`, `recent`, `active`, `relevance`.
|
|
340
|
+
* `-s, --search <SEARCH_TERM>`: Search query to filter topics.
|
|
341
|
+
* `--page-size <PAGE_SIZE>`: Number of items per page.
|
|
342
|
+
* `--page-token <PAGE_TOKEN>`: Page token for pagination.
|
|
343
|
+
* `-v, --csv`: Print results in CSV format.
|
|
344
|
+
* `-q, --quiet`: Suppress verbose output.
|
|
345
|
+
|
|
346
|
+
**Example:**
|
|
347
|
+
|
|
348
|
+
List recent topics for the `owner/kernel-slug` kernel:
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
kaggle kernels topics list owner/kernel-slug --sort-by recent
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
**Purpose:**
|
|
355
|
+
|
|
356
|
+
This command lets you browse discussion topics for a specific kernel.
|
|
357
|
+
|
|
358
|
+
## `kaggle kernels topics show`
|
|
359
|
+
|
|
360
|
+
Displays a kernel discussion topic with all comments in tree form.
|
|
361
|
+
|
|
362
|
+
**Usage:**
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
kaggle kernels topics show <TOPIC_REF> [options]
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Arguments:**
|
|
369
|
+
|
|
370
|
+
* `<TOPIC_REF>`: A topic reference, which can be:
|
|
371
|
+
* `<kernel>/<topic-id>` (e.g., `owner/kernel-slug/12345`)
|
|
372
|
+
* `<kernel> <topic-id>` (two separate arguments, where `<topic-id>` is passed as second argument)
|
|
373
|
+
* `<topic-id>` (bare numeric ID)
|
|
374
|
+
|
|
375
|
+
**Options:**
|
|
376
|
+
|
|
377
|
+
* `--page-size <PAGE_SIZE>`: Number of comments to show per page.
|
|
378
|
+
* `--page-token <PAGE_TOKEN>`: Page token for comment pagination.
|
|
379
|
+
* `-v, --csv`: Print results in CSV format.
|
|
380
|
+
* `-q, --quiet`: Suppress verbose output.
|
|
381
|
+
|
|
382
|
+
**Example:**
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
kaggle kernels topics show owner/kernel-slug/12345
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Purpose:**
|
|
389
|
+
|
|
390
|
+
This command displays a full discussion topic along with all of its comments rendered in an indented tree structure.
|
|
@@ -12,6 +12,7 @@ Here's a basic example for `kernel-metadata.json`:
|
|
|
12
12
|
"is_private": "false",
|
|
13
13
|
"enable_gpu": "false",
|
|
14
14
|
"enable_internet": "false",
|
|
15
|
+
"machine_shape": "",
|
|
15
16
|
"dataset_sources": ["timoboz/my-awesome-dataset"],
|
|
16
17
|
"competition_sources": [],
|
|
17
18
|
"kernel_sources": [],
|
|
@@ -34,6 +35,7 @@ We currently support the following metadata fields for kernels.
|
|
|
34
35
|
* `is_private`: Whether or not the kernel should be private. If not specified, will be `true`.
|
|
35
36
|
* `enable_gpu`: Whether or not the kernel should run on a GPU. If not specified, will be `false`.
|
|
36
37
|
* `enable_internet`: Whether or not the kernel should be able to access the internet. If not specified, will be `false`.
|
|
38
|
+
* `machine_shape`: The accelerator/GPU type to use (e.g., `NvidiaTeslaT4`, `NvidiaTeslaP100`, or `Tpu1VmV38`).
|
|
37
39
|
* `dataset_sources`: A list of dataset sources, specified as `"username/dataset-slug"`
|
|
38
40
|
* `competition_sources`: A list of competition sources, specified as `"competition-slug"`
|
|
39
41
|
* `kernel_sources`: A list of kernel sources, specified as `"username/kernel-slug"`
|
|
@@ -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.
|
|
27
|
+
"kagglesdk >= 0.1.30, < 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.
|
|
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
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: kaggle-cli
|
|
3
|
+
description: >
|
|
4
|
+
Use the local Kaggle CLI skill for command guidance, workflows, and
|
|
5
|
+
troubleshooting across competitions, datasets, kernels/notebooks, models,
|
|
6
|
+
model variations and versions, inbox file uploads, forums/discussions,
|
|
7
|
+
benchmarks, configuration, OAuth/API-token authentication, and accelerator
|
|
8
|
+
quota. Activate this skill when the user asks about kaggle CLI commands,
|
|
9
|
+
examples, flags, metadata files, download/upload flows, submissions,
|
|
10
|
+
benchmark tasks, or Kaggle CLI behavior.
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Kaggle CLI
|
|
14
|
+
|
|
15
|
+
Use this skill to answer or operate on the `kaggle` command-line tool. Treat
|
|
16
|
+
this skill and its references as the available command guide.
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
pip install kaggle
|
|
22
|
+
kaggle --help
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Authentication options:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
kaggle auth login
|
|
29
|
+
# or set KAGGLE_API_TOKEN
|
|
30
|
+
# or place an access token in ~/.kaggle/access_token
|
|
31
|
+
# or use legacy ~/.kaggle/kaggle.json credentials
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Command Tree
|
|
35
|
+
|
|
36
|
+
```text
|
|
37
|
+
kaggle
|
|
38
|
+
├── competitions | c
|
|
39
|
+
│ ├── list, files, download, submit, submissions, leaderboard
|
|
40
|
+
│ ├── team-submissions, episodes, replay, logs, pages
|
|
41
|
+
│ └── topics {list, show}, topic-messages
|
|
42
|
+
├── datasets | d
|
|
43
|
+
│ ├── list, files, download, init, create, version
|
|
44
|
+
│ ├── metadata, status, delete
|
|
45
|
+
│ └── topics {list, show}
|
|
46
|
+
├── kernels | k
|
|
47
|
+
│ └── list, files, init, push|update, pull|get, output, status, logs, delete
|
|
48
|
+
├── models | m
|
|
49
|
+
│ ├── list, init, create, get, update, delete
|
|
50
|
+
│ ├── topics {list, show}
|
|
51
|
+
│ └── variations | instances | v | i
|
|
52
|
+
│ ├── get, init, create, files, list, update, delete
|
|
53
|
+
│ └── versions | v {list, create, download, files, delete}
|
|
54
|
+
├── files {upload}
|
|
55
|
+
├── forums | f {list, topics {list, show}}
|
|
56
|
+
├── benchmarks | b
|
|
57
|
+
│ ├── auth, init
|
|
58
|
+
│ ├── tasks | t {push, run, list, status, download, log|logs, models, delete, publish}
|
|
59
|
+
│ └── topics {list, show}
|
|
60
|
+
├── config {view, set, unset}
|
|
61
|
+
├── auth {login, print-access-token, revoke}
|
|
62
|
+
└── quota
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Note: the CLI accepts aliases such as `kernels get` for `kernels pull` and
|
|
66
|
+
`kernels update` for `kernels push`. Do not recommend
|
|
67
|
+
`models variations versions init`; use `models variations init` for variation
|
|
68
|
+
metadata instead.
|
|
69
|
+
|
|
70
|
+
## Reference Map
|
|
71
|
+
|
|
72
|
+
Read only the reference needed for the user's task:
|
|
73
|
+
|
|
74
|
+
- [Competitions](references/competitions.md) - competition discovery, files, downloads, submissions, leaderboards, simulations, pages, topics.
|
|
75
|
+
- [Datasets](references/datasets.md) - dataset search, files, downloads, metadata, create/version/status/delete, topics.
|
|
76
|
+
- [Kernels](references/kernels.md) - notebook/script discovery, metadata, push/pull, outputs, status, logs, delete.
|
|
77
|
+
- [Models](references/models.md) - model records, metadata, create/get/update/delete, model topics.
|
|
78
|
+
- [Model Variations](references/model_variations.md) - create and manage framework-specific model variations.
|
|
79
|
+
- [Model Variation Versions](references/model_variations_versions.md) - create, list, download, inspect, and delete variation versions.
|
|
80
|
+
- [Files](references/files.md) - inbox uploads, resumable uploads, directory compression behavior.
|
|
81
|
+
- [Forums](references/forums.md) - global discussion forums, topics, and comments.
|
|
82
|
+
- [Benchmarks](references/benchmarks.md) - benchmark auth/init, task push/run/status/download/log/model flows, benchmark topics.
|
|
83
|
+
- [Configuration](references/configuration.md) - config file, default path, proxy, default competition.
|
|
84
|
+
- [Authentication](references/auth.md) - OAuth login, access token printing, revocation, token/key sources.
|
|
85
|
+
- [Quota](references/quota.md) - weekly GPU/TPU accelerator quota.
|
|
86
|
+
|
|
87
|
+
## Operating Guidance
|
|
88
|
+
|
|
89
|
+
- Read only the reference needed for the user's task.
|
|
90
|
+
- Prefer `kaggle <group> --help` or `kaggle <group> <command> --help` when a flag
|
|
91
|
+
is uncertain in the installed CLI.
|
|
92
|
+
- For metadata files, prefer the relevant `init` command to generate a starter
|
|
93
|
+
file before editing it.
|
|
94
|
+
- Do not invent commands that are not listed in this skill. If live `--help`
|
|
95
|
+
output differs, report it as a version-specific difference.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Authentication CLI Reference
|
|
2
|
+
|
|
3
|
+
Use `kaggle auth` to run OAuth login, print an OAuth access token, or revoke the
|
|
4
|
+
active OAuth refresh token. The CLI also supports non-command authentication via
|
|
5
|
+
`KAGGLE_API_TOKEN`, `~/.kaggle/access_token`, and legacy API key credentials.
|
|
6
|
+
|
|
7
|
+
## Prerequisites
|
|
8
|
+
|
|
9
|
+
- Python 3.11+ with the `kaggle` package installed.
|
|
10
|
+
- A Kaggle account.
|
|
11
|
+
- Browser access for the default OAuth login flow, or use `--no-launch-browser`
|
|
12
|
+
to print a URL.
|
|
13
|
+
|
|
14
|
+
## Command Hierarchy
|
|
15
|
+
|
|
16
|
+
```text
|
|
17
|
+
kaggle auth
|
|
18
|
+
├── login
|
|
19
|
+
├── print-access-token
|
|
20
|
+
└── revoke
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Authentication Sources
|
|
24
|
+
|
|
25
|
+
The CLI authentication flow tries these sources:
|
|
26
|
+
|
|
27
|
+
1. Access token sources such as `KAGGLE_API_TOKEN` or
|
|
28
|
+
`~/.kaggle/access_token`.
|
|
29
|
+
2. Legacy API key config from environment/config values `username` and `key`.
|
|
30
|
+
3. OAuth credentials created by `kaggle auth login`.
|
|
31
|
+
|
|
32
|
+
If none succeed, the CLI prints auth help and exits.
|
|
33
|
+
|
|
34
|
+
Some commands are allowed logged out, including help/version and selected
|
|
35
|
+
public dataset file/download flows.
|
|
36
|
+
|
|
37
|
+
## `kaggle auth login`
|
|
38
|
+
|
|
39
|
+
Runs Kaggle OAuth login.
|
|
40
|
+
|
|
41
|
+
**Usage:**
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
kaggle auth login [options]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
**Options:**
|
|
48
|
+
|
|
49
|
+
- `--no-launch-browser`: Do not launch a browser; print an auth URL instead.
|
|
50
|
+
- `--force`: Re-run login even if already logged in.
|
|
51
|
+
|
|
52
|
+
**Examples:**
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
kaggle auth login
|
|
56
|
+
kaggle auth login --no-launch-browser
|
|
57
|
+
kaggle auth login --force
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
**Purpose:** Store OAuth credentials for the active Kaggle account.
|
|
61
|
+
|
|
62
|
+
**Behavior details:**
|
|
63
|
+
|
|
64
|
+
- If credentials already exist and `--force` is not set, the command prints the
|
|
65
|
+
current account and exits with instructions to use `--force`.
|
|
66
|
+
- The OAuth flow requests the default scope `resources.admin:*`.
|
|
67
|
+
|
|
68
|
+
## `kaggle auth print-access-token`
|
|
69
|
+
|
|
70
|
+
Prints an access token for the active OAuth account.
|
|
71
|
+
|
|
72
|
+
**Usage:**
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
kaggle auth print-access-token [options]
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Options:**
|
|
79
|
+
|
|
80
|
+
- `--expiration <DURATION>`: Override token duration.
|
|
81
|
+
|
|
82
|
+
**Examples:**
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
kaggle auth print-access-token
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Purpose:** Emit a token that can be placed in `KAGGLE_API_TOKEN` or another
|
|
89
|
+
supported token source.
|
|
90
|
+
|
|
91
|
+
**Behavior details:**
|
|
92
|
+
|
|
93
|
+
- Requires OAuth credentials from `kaggle auth login`.
|
|
94
|
+
- If no OAuth credentials exist, the command tells the user to run
|
|
95
|
+
`kaggle auth login`.
|
|
96
|
+
- Some CLI help examples use short forms such as `6h`. For automation, omit
|
|
97
|
+
`--expiration` unless the accepted duration format has been verified with
|
|
98
|
+
the installed CLI.
|
|
99
|
+
|
|
100
|
+
## `kaggle auth revoke`
|
|
101
|
+
|
|
102
|
+
Revokes the active OAuth refresh token.
|
|
103
|
+
|
|
104
|
+
**Usage:**
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
kaggle auth revoke [options]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Options:**
|
|
111
|
+
|
|
112
|
+
- `--reason <TEXT>`: Reason sent to the server.
|
|
113
|
+
|
|
114
|
+
**Examples:**
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
kaggle auth revoke
|
|
118
|
+
kaggle auth revoke --reason "rotating credentials"
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Purpose:** Invalidate the active OAuth credential.
|
|
122
|
+
|
|
123
|
+
**Behavior details:**
|
|
124
|
+
|
|
125
|
+
- If no OAuth credentials exist, the command prints `There is no token to
|
|
126
|
+
revoke.` and exits successfully.
|
|
127
|
+
- If no reason is provided, the default reason is
|
|
128
|
+
`Manually revoked by user with kaggle-cli`.
|
|
129
|
+
|
|
130
|
+
## Legacy And Token Auth Notes
|
|
131
|
+
|
|
132
|
+
- `KAGGLE_API_TOKEN` can authenticate without a legacy username/key pair when
|
|
133
|
+
the token introspection succeeds.
|
|
134
|
+
- Legacy config can come from `~/.kaggle/kaggle.json` or environment variables
|
|
135
|
+
such as `KAGGLE_USERNAME` and `KAGGLE_KEY`.
|
|
136
|
+
- Prefer `kaggle auth login` for OAuth credentials or `KAGGLE_API_TOKEN` for
|
|
137
|
+
non-interactive authentication.
|