← 返回命令列表

Linux command

kaggle 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Download competition files

kaggle competitions download -c [competition-name]

Submit to competition

kaggle competitions submit -c [competition-name] -f [submission.csv] -m "[message]"

Search datasets

kaggle datasets list -s "[search-term]"

Download a dataset

kaggle datasets download -d [owner/dataset-name]

List competition leaderboard

kaggle competitions leaderboard [competition-name]

Download model

kaggle models download -m [owner/model-name/framework/variation]

Create new dataset

kaggle datasets create -p [path/to/dataset]

View API credentials

kaggle config view

说明

kaggle is the CLI for Kaggle, a data science competition platform. It manages competition data, datasets, notebooks, and models. Authentication requires API credentials from kaggle.com/account. Place kaggle.json in ~/.kaggle/ with proper permissions (chmod 600). Competition workflow: download gets data files, work locally, submit uploads predictions. leaderboard shows standings; submissions lists your entries. Datasets are versioned. download gets current version; create initializes new dataset; version adds updates. init generates dataset-metadata.json for new datasets. Kernels (notebooks) can be pushed to Kaggle for cloud execution. pull downloads notebooks; push uploads with kernel-metadata.json defining runtime settings.

参数

-c, --competition _name_
Competition name.
-d, --dataset _name_
Dataset in owner/dataset format.
-m, --message _text_
Submission message.
-f, --file _path_
File to submit or upload.
-p, --path _directory_
Local directory path.
-o, --output _directory_
Download output directory.
--unzip
Unzip downloaded files.
-s, --search _term_
Search term for listings.
--sort-by _field_
Sort results by field.
--force
Overwrite existing files without prompting.
-q, --quiet
Suppress verbose output.
-v
Verbose mode for tabular listings.
-h, --help
Show help for the command or subcommand.

FAQ

What is the kaggle command used for?

kaggle is the CLI for Kaggle, a data science competition platform. It manages competition data, datasets, notebooks, and models. Authentication requires API credentials from kaggle.com/account. Place kaggle.json in ~/.kaggle/ with proper permissions (chmod 600). Competition workflow: download gets data files, work locally, submit uploads predictions. leaderboard shows standings; submissions lists your entries. Datasets are versioned. download gets current version; create initializes new dataset; version adds updates. init generates dataset-metadata.json for new datasets. Kernels (notebooks) can be pushed to Kaggle for cloud execution. pull downloads notebooks; push uploads with kernel-metadata.json defining runtime settings.

How do I run a basic kaggle example?

Run `kaggle competitions download -c [competition-name]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -c, --competition _name_ do in kaggle?

Competition name.