From 5247d2cf52eb9f9136e0e977fd72574fb277fb1c Mon Sep 17 00:00:00 2001 From: Steve Messick Date: Fri, 24 Oct 2025 21:02:53 +0000 Subject: [PATCH 1/3] More instance renaming --- documentation/model_instances.md | 2 +- documentation/model_instances_versions.md | 60 +++++++++++------------ documentation/models.md | 6 +-- documentation/tutorials.md | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/documentation/model_instances.md b/documentation/model_instances.md index d0d6a66..eb1d37e 100644 --- a/documentation/model_instances.md +++ b/documentation/model_instances.md @@ -4,7 +4,7 @@ Commands for interacting with variations of Kaggle Models. A model variation typ ## `kaggle models variations init` -Initializes a metadata file (`model-instance-metadata.json`) for creating a new model instance. +Initializes a metadata file (`model-instance-metadata.json`) for creating a new model variation. **Usage:** diff --git a/documentation/model_instances_versions.md b/documentation/model_instances_versions.md index adb9560..9640216 100644 --- a/documentation/model_instances_versions.md +++ b/documentation/model_instances_versions.md @@ -1,20 +1,20 @@ -# Model Instance Versions Commands +# Model Variation Versions Commands -Commands for managing versions of a specific Kaggle Model Instance. Each version represents a snapshot of the model instance files at a point in time. +Commands for managing versions of a specific Kaggle Model Variation. Each version represents a snapshot of the model variation files at a point in time. -## `kaggle models instances versions create` +## `kaggle models variations versions create` -Creates a new version of an existing model instance. +Creates a new version of an existing model variation. **Usage:** ```bash -kaggle models instances versions create -p [options] +kaggle models variations versions create -p [options] ``` **Arguments:** -* ``: The target model instance URL suffix for the new version (format: `owner/model-slug/framework/instance-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). +* ``: The target model variation URL suffix for the new version (format: `owner/model-slug/framework/instance-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). **Options:** @@ -25,32 +25,32 @@ kaggle models instances versions create -p [optio **Example:** -Create a new version for the model instance `$KAGGLE_DEVELOPER/test-model/jax/main` using files from the `tmp` folder, with version notes "Updated model files", quietly, and skipping subdirectories: +Create a new version for the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` using files from the `tmp` folder, with version notes "Updated model files", quietly, and skipping subdirectories: ```bash # Ensure tmp folder contains the new files for the version, e.g., data_v2.csv # echo "e,f,g,h" > tmp/data_v2.csv -kaggle models instances versions create $KAGGLE_DEVELOPER/test-model/jax/main -p tmp -n "Updated model files" -q -r skip +kaggle models variations versions create $KAGGLE_DEVELOPER/test-model/jax/main -p tmp -n "Updated model files" -q -r skip ``` **Purpose:** -This command uploads a new set of files to an existing model instance, creating a new, numbered version. This allows you to track changes and revert to previous versions of your model instance files. +This command uploads a new set of files to an existing model variation, creating a new, numbered version. This allows you to track changes and revert to previous versions of your model variation files. -## `kaggle models instances versions download` +## `kaggle models variations versions download` -Downloads files for a specific version of a model instance. +Downloads files for a specific version of a model variation. **Usage:** ```bash -kaggle models instances versions download [options] +kaggle models variations versions download [options] ``` **Arguments:** -* ``: Model instance version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`). +* ``: Model variation version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`). **Options:** @@ -62,29 +62,29 @@ kaggle models instances versions download [options] **Example:** -Download version 1 of the model instance `$KAGGLE_DEVELOPER/test-model/jax/main` into the `tmp` folder, untar if applicable, force overwrite, and do it quietly: +Download version 1 of the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` into the `tmp` folder, untar if applicable, force overwrite, and do it quietly: ```bash -kaggle models instances versions download $KAGGLE_DEVELOPER/test-model/jax/main/1 -p tmp -q -f --untar +kaggle models variations versions download $KAGGLE_DEVELOPER/test-model/jax/main/1 -p tmp -q -f --untar ``` **Purpose:** -This command allows you to retrieve the specific files associated with a particular version of a model instance. +This command allows you to retrieve the specific files associated with a particular version of a model variation. -## `kaggle models instances versions files` +## `kaggle models variations versions files` -Lists files for a specific version of a model instance. +Lists files for a specific version of a model variation. **Usage:** ```bash -kaggle models instances versions files [options] +kaggle models variations versions files [options] ``` **Arguments:** -* ``: Model instance version URL suffix (e.g., `google/gemma/pytorch/7b/2`). +* ``: Model variation version URL suffix (e.g., `google/gemma/pytorch/7b/2`). **Options:** @@ -94,29 +94,29 @@ kaggle models instances versions files [options] **Example:** -List the first 3 files for version 2 of the model instance `google/gemma/pytorch/7b` in CSV format: +List the first 3 files for version 2 of the model variation `google/gemma/pytorch/7b` in CSV format: ```bash -kaggle models instances versions files google/gemma/pytorch/7b/2 -v --page-size=3 +kaggle models variations versions files google/gemma/pytorch/7b/2 -v --page-size=3 ``` **Purpose:** -Use this command to see the individual files that constitute a specific version of a model instance before downloading. +Use this command to see the individual files that constitute a specific version of a model variation before downloading. -## `kaggle models instances versions delete` +## `kaggle models variations versions delete` -Deletes a specific version of a model instance from Kaggle. +Deletes a specific version of a model variation from Kaggle. **Usage:** ```bash -kaggle models instances versions delete [options] +kaggle models variations versions delete [options] ``` **Arguments:** -* ``: Model instance version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`). +* ``: Model variation version URL suffix in the format `owner/model-slug/framework/instance-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`). **Options:** @@ -124,12 +124,12 @@ kaggle models instances versions delete [options] **Example:** -Delete version 1 of the model instance `$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm: +Delete version 1 of the model variation `$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm: ```bash -kaggle models instances versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y +kaggle models variations versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y ``` **Purpose:** -This command permanently removes a specific version of your model instance from Kaggle. Use with caution. If it's the only version, this may lead to the deletion of the model instance itself if no other versions exist. +This command permanently removes a specific version of your model variation from Kaggle. Use with caution. If it's the only version, this may lead to the deletion of the model variation itself if no other versions exist. diff --git a/documentation/models.md b/documentation/models.md index 6ac1489..70921a2 100644 --- a/documentation/models.md +++ b/documentation/models.md @@ -78,7 +78,7 @@ kaggle models create -p **Options:** -* `-p, --path `: Path to the folder containing the `model-metadata.json` file (defaults to the current directory). This folder should also contain your model files that you intend to upload as part of the first model instance. +* `-p, --path `: Path to the folder containing the `model-metadata.json` file (defaults to the current directory). This folder should also contain your model files that you intend to upload as part of the first model variation. **Example:** @@ -95,7 +95,7 @@ kaggle models create -p tmp **Purpose:** -This command registers a new model on Kaggle using the provided metadata. After this, you will typically create model instances and versions. +This command registers a new model on Kaggle using the provided metadata. After this, you will typically create model variations and versions. ## `kaggle models get` @@ -181,4 +181,4 @@ kaggle models delete $KAGGLE_DEVELOPER/test-model -y **Purpose:** -This command permanently removes one of your models (and all its instances and versions) from Kaggle. Use with caution. +This command permanently removes one of your models (and all its variations and versions) from Kaggle. Use with caution. diff --git a/documentation/tutorials.md b/documentation/tutorials.md index 5bd5b4c..e658f0b 100644 --- a/documentation/tutorials.md +++ b/documentation/tutorials.md @@ -1,4 +1,4 @@ -# Kaggle CLI Tutorials +eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee# Kaggle CLI Tutorials These tutorials illustrate how to use a sequence of Kaggle CLI commands to accomplish common tasks. From 8ef5d1ac0fb1ed0cabbf8bf47cb26acabbcb7d26 Mon Sep 17 00:00:00 2001 From: Steve Messick Date: Fri, 24 Oct 2025 21:05:04 +0000 Subject: [PATCH 2/3] cleanup --- documentation/tutorials.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/tutorials.md b/documentation/tutorials.md index e658f0b..5bd5b4c 100644 --- a/documentation/tutorials.md +++ b/documentation/tutorials.md @@ -1,4 +1,4 @@ -eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee# Kaggle CLI Tutorials +# Kaggle CLI Tutorials These tutorials illustrate how to use a sequence of Kaggle CLI commands to accomplish common tasks. From 4f1375740656e01507f0de8fc1fdf0063c3ae070 Mon Sep 17 00:00:00 2001 From: Steve Messick Date: Fri, 24 Oct 2025 21:39:46 +0000 Subject: [PATCH 3/3] Finish up --- documentation/tutorials.md | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/documentation/tutorials.md b/documentation/tutorials.md index 5bd5b4c..4b9c293 100644 --- a/documentation/tutorials.md +++ b/documentation/tutorials.md @@ -139,7 +139,7 @@ This tutorial guides you through creating a new model on Kaggle. cd my-new-model ``` -2. **Copy your model definition files (optional for this step).** If you have files that define your model (e.g., Python scripts, model weights), copy them into this directory. For the `kaggle models create` step, only the metadata is strictly required, but you'll need files when you create a model instance. +2. **Copy your model definition files (optional for this step).** If you have files that define your model (e.g., Python scripts, model weights), copy them into this directory. For the `kaggle models create` step, only the metadata is strictly required, but you'll need files when you create a model variation. 3. **Initialize model metadata.** This creates a `model-metadata.json` file. @@ -161,48 +161,48 @@ This tutorial guides you through creating a new model on Kaggle. 6. **Verify on Kaggle.com.** Refresh the [`Models` tab in `Your Work`](https://www.kaggle.com/work/models). You should see "My Awesome AI Model". -## Tutorial: Create a Model Instance +## Tutorial: Create a Model Variation -This tutorial shows how to create an instance under an existing model. A model instance usually represents the model implemented in a specific framework (like TensorFlow, PyTorch, JAX, etc.) and includes the actual model files. +This tutorial shows how to create a variation under an existing model. A model variation usually represents the model implemented in a specific framework (like TensorFlow, PyTorch, JAX, etc.) and includes the actual model files. 1. **Ensure you have a parent model.** Follow the "Create a Model" tutorial if you haven't already. Let's assume your model slug is `my-awesome-ai-model` and your username is `YOUR_USERNAME`. -2. **Prepare your model instance files.** In your model directory (e.g., `my-new-model`), create or place the files for this specific instance. For example, a JAX model might have a `flax_model.params` file. +2. **Prepare your model variation files.** In your model directory (e.g., `my-new-model`), create or place the files for this specific variation. For example, a JAX model might have a `flax_model.params` file. ```bash # In the my-new-model directory echo "This is a placeholder for JAX model parameters" > flax_model.params ``` -3. **Initialize model instance metadata.** This creates `model-instance-metadata.json`. +3. **Initialize model variation metadata.** This creates `model-instance-metadata.json`. ```bash # Still in the my-new-model directory - kaggle models instances init + kaggle models variations init ``` -4. **Edit the instance metadata file.** Open `model-instance-metadata.json` and make changes: +4. **Edit the variation metadata file.** Open `model-instance-metadata.json` and make changes: * Replace `"INSERT_OWNER_SLUG_HERE"` with your Kaggle username (e.g., `"YOUR_USERNAME"`). * Replace `"INSERT_EXISTING_MODEL_SLUG_HERE"` with your parent model's slug (e.g., `"my-awesome-ai-model"`). - * Replace `"INSERT_INSTANCE_SLUG_HERE"` with a slug for this instance (e.g., `"jax-implementation"`). + * Replace `"INSERT_INSTANCE_SLUG_HERE"` with a slug for this variation (e.g., `"jax-implementation"`). * Replace `"INSERT_FRAMEWORK_HERE"` with the model framework (e.g., `"jax"`, `"tensorflow"`, `"pytorch"`, `"sklearn"`). * Update the `"instance_size_bytes"` if known, and add a `"description"`. -5. **Create the model instance.** This uploads the files in the current directory (e.g., `flax_model.params`) along with the instance metadata. +5. **Create the model variation.** This uploads the files in the current directory (e.g., `flax_model.params`) along with the variation metadata. ```bash - kaggle models instances create -p . + kaggle models variations create -p . ``` -6. **Verify on Kaggle.com.** Go to your model's page on Kaggle by clicking on the model under in the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new "jax-implementation" instance listed, and it will have one version containing `flax_model.params`. +6. **Verify on Kaggle.com.** Go to your model's page on Kaggle by clicking on the model under in the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new "jax-implementation" variation listed, and it will have one version containing `flax_model.params`. -## Tutorial: Create a Model Instance Version +## Tutorial: Create a Model Variation Version -This tutorial explains how to add a new version to an existing model instance, for example, when you have updated model weights or files. +This tutorial explains how to add a new version to an existing model variation, for example, when you have updated model weights or files. -1. **Ensure you have a model instance.** Follow the "Create a Model Instance" tutorial. Let's assume your instance is `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`. +1. **Ensure you have a model variation.** Follow the "Create a Model Variation" tutorial. Let's assume your variation is `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`. -2. **Prepare your updated files.** In your model instance directory (e.g., `my-new-model`), update or add new files for this version. For example, create `flax_model_v2.params`. +2. **Prepare your updated files.** In your model variation directory (e.g., `my-new-model`), update or add new files for this version. For example, create `flax_model_v2.params`. ```bash # In the my-new-model directory @@ -210,15 +210,15 @@ This tutorial explains how to add a new version to an existing model instance, f # You might also remove or update flax_model.params if it's being replaced ``` -3. **Create the new model instance version.** You need to specify the parent model instance and provide version notes. The files from the `-p` path will form the contents of this new version. +3. **Create the new model variation version.** You need to specify the parent model variation and provide version notes. The files from the `-p` path will form the contents of this new version. ```bash - # Replace YOUR_USERNAME and model/instance slugs accordingly - kaggle models instances versions create YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation -p . -n "Second version with updated parameters" + # Replace YOUR_USERNAME and the slugs for model and variation accordingly + kaggle models variations versions create YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation -p . -n "Second version with updated parameters" ``` *Note: The `-p .` means all files in the current directory will be uploaded as part of this new version. If you only want to upload `flax_model_v2.params`, ensure only it (and any other V2 files) are in a directory and point `-p` to that directory, or manage your files carefully.* -4. **Verify on Kaggle.com.** Go to your model instance page on Kaggle (e.g., `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`) by clicking on the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new version (e.g., version 2) listed with your notes and the new files. +4. **Verify on Kaggle.com.** Go to your model variation page on Kaggle (e.g., `YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation`) by clicking on the [`Models` tab on `Your Work`](https://www.kaggle.com/work/models). You should see a new version (e.g., version 2) listed with your notes and the new files. ## Tutorial: How to Submit to a Competition