You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This still does not touch meta-names, like `MODEL_INSTANCE_VERSION`.
There are three categories of them:
1. Names that appear only in docs
2. Names that appear in filenames
3. Names that appear in code
The first should be easy to change. The latter two will require editing
code, which is probably easy, but requires testing.
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.
3
+
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.
4
4
5
-
## `kaggle models instances versions create`
5
+
## `kaggle models variations versions create`
6
6
7
-
Creates a new version of an existing model instance.
7
+
Creates a new version of an existing model variation.
*`<MODEL_INSTANCE>`: 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`).
17
+
*`<MODEL_INSTANCE>`: 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`).
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:
28
+
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:
29
29
30
30
```bash
31
31
# Ensure tmp folder contains the new files for the version, e.g., data_v2.csv
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.
39
+
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.
40
40
41
-
## `kaggle models instances versions download`
41
+
## `kaggle models variations versions download`
42
42
43
-
Downloads files for a specific version of a model instance.
43
+
Downloads files for a specific version of a model variation.
*`<MODEL_INSTANCE_VERSION>`: 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`).
53
+
*`<MODEL_INSTANCE_VERSION>`: 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`).
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:
65
+
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:
*`<MODEL_INSTANCE_VERSION>`: 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`).
119
+
*`<MODEL_INSTANCE_VERSION>`: 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`).
120
120
121
121
**Options:**
122
122
123
123
*`-y, --yes`: Automatically confirm deletion without prompting.
124
124
125
125
**Example:**
126
126
127
-
Delete version 1 of the model instance`$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm:
127
+
Delete version 1 of the model variation`$KAGGLE_DEVELOPER/test-model/jax/main` and automatically confirm:
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.
135
+
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.
* `-p, --path <FOLDER_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.
81
+
* `-p, --path <FOLDER_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.
82
82
83
83
**Example:**
84
84
@@ -95,7 +95,7 @@ kaggle models create -p tmp
95
95
96
96
**Purpose:**
97
97
98
-
This command registers a new model on Kaggle using the provided metadata. After this, you will typically create model instances and versions.
98
+
This command registers a new model on Kaggle using the provided metadata. After this, you will typically create model variations and versions.
Copy file name to clipboardExpand all lines: documentation/tutorials.md
+19-19Lines changed: 19 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -139,7 +139,7 @@ This tutorial guides you through creating a new model on Kaggle.
139
139
cd my-new-model
140
140
```
141
141
142
-
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.
142
+
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.
143
143
144
144
3. **Initialize model metadata.** This creates a `model-metadata.json` file.
145
145
@@ -161,64 +161,64 @@ This tutorial guides you through creating a new model on Kaggle.
161
161
162
162
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".
163
163
164
-
## Tutorial: Create a Model Instance
164
+
## Tutorial: Create a Model Variation
165
165
166
-
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.
166
+
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.
167
167
168
168
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`.
169
169
170
-
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.
170
+
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.
171
171
172
172
```bash
173
173
# In the my-new-model directory
174
174
echo"This is a placeholder for JAX model parameters"> flax_model.params
175
175
```
176
176
177
-
3. **Initialize model instance metadata.** This creates `model-instance-metadata.json`.
177
+
3. **Initialize model variation metadata.** This creates `model-instance-metadata.json`.
178
178
179
179
```bash
180
180
# Still in the my-new-model directory
181
-
kaggle models instances init
181
+
kaggle models variations init
182
182
```
183
183
184
-
4. **Edit the instance metadata file.** Open `model-instance-metadata.json` and make changes:
184
+
4. **Edit the variation metadata file.** Open `model-instance-metadata.json` and make changes:
185
185
* Replace `"INSERT_OWNER_SLUG_HERE"` with your Kaggle username (e.g., `"YOUR_USERNAME"`).
186
186
* Replace `"INSERT_EXISTING_MODEL_SLUG_HERE"` with your parent model's slug (e.g., `"my-awesome-ai-model"`).
187
-
* Replace `"INSERT_INSTANCE_SLUG_HERE"` with a slug for this instance (e.g., `"jax-implementation"`).
187
+
* Replace `"INSERT_INSTANCE_SLUG_HERE"` with a slug for this variation (e.g., `"jax-implementation"`).
188
188
* Replace `"INSERT_FRAMEWORK_HERE"` with the model framework (e.g., `"jax"`, `"tensorflow"`, `"pytorch"`, `"sklearn"`).
189
189
* Update the `"instance_size_bytes"` if known, and add a `"description"`.
190
190
191
-
5. **Create the model instance.** This uploads the files in the current directory (e.g., `flax_model.params`) along with the instance metadata.
191
+
5. **Create the model variation.** This uploads the files in the current directory (e.g., `flax_model.params`) along with the variation metadata.
192
192
193
193
```bash
194
-
kaggle models instances create -p .
194
+
kaggle models variations create -p .
195
195
```
196
196
197
-
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`.
197
+
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`.
198
198
199
-
## Tutorial: Create a Model Instance Version
199
+
## Tutorial: Create a Model Variation Version
200
200
201
-
This tutorial explains how to add a new version to an existing model instance, for example, when you have updated model weights or files.
201
+
This tutorial explains how to add a new version to an existing model variation, for example, when you have updated model weights or files.
202
202
203
-
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`.
203
+
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`.
204
204
205
-
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`.
205
+
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`.
206
206
207
207
```bash
208
208
# In the my-new-model directory
209
209
echo "Updated JAX model parameters for V2" > flax_model_v2.params
210
210
# You might also remove or update flax_model.params if it's being replaced
211
211
```
212
212
213
-
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.
213
+
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.
214
214
215
215
```bash
216
-
# Replace YOUR_USERNAME and model/instance slugs accordingly
217
-
kaggle models instances versions create YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation -p . -n "Second version with updated parameters"
216
+
# Replace YOUR_USERNAME and the slugs for model and variation accordingly
217
+
kaggle models variations versions create YOUR_USERNAME/my-awesome-ai-model/jax/jax-implementation -p . -n "Second version with updated parameters"
218
218
```
219
219
*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.*
220
220
221
-
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.
221
+
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.
0 commit comments