Skip to content

Commit 9aca560

Browse files
authored
More instance renaming (#852)
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.
1 parent 9328736 commit 9aca560

File tree

4 files changed

+53
-53
lines changed

4 files changed

+53
-53
lines changed

documentation/model_instances.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Commands for interacting with variations of Kaggle Models. A model variation typ
44

55
## `kaggle models variations init`
66

7-
Initializes a metadata file (`model-instance-metadata.json`) for creating a new model instance.
7+
Initializes a metadata file (`model-instance-metadata.json`) for creating a new model variation.
88

99
**Usage:**
1010

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
# Model Instance Versions Commands
1+
# Model Variation Versions Commands
22

3-
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.
44

5-
## `kaggle models instances versions create`
5+
## `kaggle models variations versions create`
66

7-
Creates a new version of an existing model instance.
7+
Creates a new version of an existing model variation.
88

99
**Usage:**
1010

1111
```bash
12-
kaggle models instances versions create <MODEL_INSTANCE> -p <FOLDER_PATH> [options]
12+
kaggle models variations versions create <MODEL_INSTANCE> -p <FOLDER_PATH> [options]
1313
```
1414

1515
**Arguments:**
1616

17-
* `<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`).
1818

1919
**Options:**
2020

@@ -25,32 +25,32 @@ kaggle models instances versions create <MODEL_INSTANCE> -p <FOLDER_PATH> [optio
2525

2626
**Example:**
2727

28-
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:
2929

3030
```bash
3131
# Ensure tmp folder contains the new files for the version, e.g., data_v2.csv
3232
# echo "e,f,g,h" > tmp/data_v2.csv
3333

34-
kaggle models instances versions create $KAGGLE_DEVELOPER/test-model/jax/main -p tmp -n "Updated model files" -q -r skip
34+
kaggle models variations versions create $KAGGLE_DEVELOPER/test-model/jax/main -p tmp -n "Updated model files" -q -r skip
3535
```
3636

3737
**Purpose:**
3838

39-
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.
4040

41-
## `kaggle models instances versions download`
41+
## `kaggle models variations versions download`
4242

43-
Downloads files for a specific version of a model instance.
43+
Downloads files for a specific version of a model variation.
4444

4545
**Usage:**
4646

4747
```bash
48-
kaggle models instances versions download <MODEL_INSTANCE_VERSION> [options]
48+
kaggle models variations versions download <MODEL_INSTANCE_VERSION> [options]
4949
```
5050

5151
**Arguments:**
5252

53-
* `<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`).
5454

5555
**Options:**
5656

@@ -62,29 +62,29 @@ kaggle models instances versions download <MODEL_INSTANCE_VERSION> [options]
6262

6363
**Example:**
6464

65-
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:
6666

6767
```bash
68-
kaggle models instances versions download $KAGGLE_DEVELOPER/test-model/jax/main/1 -p tmp -q -f --untar
68+
kaggle models variations versions download $KAGGLE_DEVELOPER/test-model/jax/main/1 -p tmp -q -f --untar
6969
```
7070

7171
**Purpose:**
7272

73-
This command allows you to retrieve the specific files associated with a particular version of a model instance.
73+
This command allows you to retrieve the specific files associated with a particular version of a model variation.
7474

75-
## `kaggle models instances versions files`
75+
## `kaggle models variations versions files`
7676

77-
Lists files for a specific version of a model instance.
77+
Lists files for a specific version of a model variation.
7878

7979
**Usage:**
8080

8181
```bash
82-
kaggle models instances versions files <MODEL_INSTANCE_VERSION> [options]
82+
kaggle models variations versions files <MODEL_INSTANCE_VERSION> [options]
8383
```
8484

8585
**Arguments:**
8686

87-
* `<MODEL_INSTANCE_VERSION>`: Model instance version URL suffix (e.g., `google/gemma/pytorch/7b/2`).
87+
* `<MODEL_INSTANCE_VERSION>`: Model variation version URL suffix (e.g., `google/gemma/pytorch/7b/2`).
8888

8989
**Options:**
9090

@@ -94,42 +94,42 @@ kaggle models instances versions files <MODEL_INSTANCE_VERSION> [options]
9494

9595
**Example:**
9696

97-
List the first 3 files for version 2 of the model instance `google/gemma/pytorch/7b` in CSV format:
97+
List the first 3 files for version 2 of the model variation `google/gemma/pytorch/7b` in CSV format:
9898

9999
```bash
100-
kaggle models instances versions files google/gemma/pytorch/7b/2 -v --page-size=3
100+
kaggle models variations versions files google/gemma/pytorch/7b/2 -v --page-size=3
101101
```
102102

103103
**Purpose:**
104104

105-
Use this command to see the individual files that constitute a specific version of a model instance before downloading.
105+
Use this command to see the individual files that constitute a specific version of a model variation before downloading.
106106

107-
## `kaggle models instances versions delete`
107+
## `kaggle models variations versions delete`
108108

109-
Deletes a specific version of a model instance from Kaggle.
109+
Deletes a specific version of a model variation from Kaggle.
110110

111111
**Usage:**
112112

113113
```bash
114-
kaggle models instances versions delete <MODEL_INSTANCE_VERSION> [options]
114+
kaggle models variations versions delete <MODEL_INSTANCE_VERSION> [options]
115115
```
116116

117117
**Arguments:**
118118

119-
* `<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`).
120120

121121
**Options:**
122122

123123
* `-y, --yes`: Automatically confirm deletion without prompting.
124124

125125
**Example:**
126126

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:
128128

129129
```bash
130-
kaggle models instances versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y
130+
kaggle models variations versions delete $KAGGLE_DEVELOPER/test-model/jax/main/1 -y
131131
```
132132

133133
**Purpose:**
134134

135-
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.

documentation/models.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ kaggle models create -p <FOLDER_PATH>
7878
7979
**Options:**
8080
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 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.
8282
8383
**Example:**
8484
@@ -95,7 +95,7 @@ kaggle models create -p tmp
9595
9696
**Purpose:**
9797
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.
9999
100100
## `kaggle models get`
101101
@@ -181,4 +181,4 @@ kaggle models delete $KAGGLE_DEVELOPER/test-model -y
181181
182182
**Purpose:**
183183
184-
This command permanently removes one of your models (and all its instances and versions) from Kaggle. Use with caution.
184+
This command permanently removes one of your models (and all its variations and versions) from Kaggle. Use with caution.

documentation/tutorials.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ This tutorial guides you through creating a new model on Kaggle.
139139
cd my-new-model
140140
```
141141

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.
143143
144144
3. **Initialize model metadata.** This creates a `model-metadata.json` file.
145145
@@ -161,64 +161,64 @@ This tutorial guides you through creating a new model on Kaggle.
161161

162162
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".
163163

164-
## Tutorial: Create a Model Instance
164+
## Tutorial: Create a Model Variation
165165

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.
167167

168168
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`.
169169

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.
171171

172172
```bash
173173
# In the my-new-model directory
174174
echo "This is a placeholder for JAX model parameters" > flax_model.params
175175
```
176176

177-
3. **Initialize model instance metadata.** This creates `model-instance-metadata.json`.
177+
3. **Initialize model variation metadata.** This creates `model-instance-metadata.json`.
178178

179179
```bash
180180
# Still in the my-new-model directory
181-
kaggle models instances init
181+
kaggle models variations init
182182
```
183183

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:
185185
* Replace `"INSERT_OWNER_SLUG_HERE"` with your Kaggle username (e.g., `"YOUR_USERNAME"`).
186186
* 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"`).
188188
* Replace `"INSERT_FRAMEWORK_HERE"` with the model framework (e.g., `"jax"`, `"tensorflow"`, `"pytorch"`, `"sklearn"`).
189189
* Update the `"instance_size_bytes"` if known, and add a `"description"`.
190190
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.
192192
193193
```bash
194-
kaggle models instances create -p .
194+
kaggle models variations create -p .
195195
```
196196
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`.
198198

199-
## Tutorial: Create a Model Instance Version
199+
## Tutorial: Create a Model Variation Version
200200

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.
202202

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`.
204204
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`.
206206
207207
```bash
208208
# In the my-new-model directory
209209
echo "Updated JAX model parameters for V2" > flax_model_v2.params
210210
# You might also remove or update flax_model.params if it's being replaced
211211
```
212212
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.
214214
215215
```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"
218218
```
219219
*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.*
220220
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.
222222
223223
## Tutorial: How to Submit to a Competition
224224

0 commit comments

Comments
 (0)