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
Copy file name to clipboardExpand all lines: README.md
+4-6Lines changed: 4 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Kaggle API
1
+
# Kaggle CLI
2
2
3
3
The official CLI to interact with [Kaggle](https://www.kaggle.com).
4
4
@@ -90,11 +90,9 @@ hatch run test:local
90
90
91
91
### Integration Tests
92
92
93
-
To run integration tests on your local machine, you need to set up your Kaggle API credentials. You can do this in one of these two ways described [this doc](docs/README.md). Refer to the sections:
94
-
- Using environment variables
95
-
- Using credentials file
93
+
To run integration tests on your local machine, you need to set up your Kaggle credentials. You can do this by following the [authentication instructions](docs/README.md).
96
94
97
-
After setting up your credentials by any of these methods, you can run the integration tests as follows:
95
+
After setting up your credentials, you can run the integration tests as follows:
98
96
99
97
```sh
100
98
hatch run test:integration
@@ -110,6 +108,6 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md).
110
108
111
109
## License
112
110
113
-
The Kaggle API is released under the [Apache 2.0 license](LICENSE.txt).
111
+
The Kaggle CLI is released under the [Apache 2.0 license](LICENSE.txt).
Copy file name to clipboardExpand all lines: docs/model_instances.md
+8-7Lines changed: 8 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,7 @@ Commands for interacting with variations of Kaggle Models. A model variation typ
5
5
## `kaggle models variations init`
6
6
7
7
Initializes a metadata file (`model-instance-metadata.json`) for creating a new model variation.
8
+
Note that the name of the file reflects the old name for a variation, which was "instance".
8
9
9
10
**Usage:**
10
11
@@ -52,7 +53,7 @@ Create a new model variation using the metadata and files in the `tmp` folder, q
52
53
# Example: Edit model-instance-metadata.json first
53
54
# sed -i 's/INSERT_OWNER_SLUG_HERE/your-username/' tmp/model-instance-metadata.json
54
55
# sed -i 's/INSERT_EXISTING_MODEL_SLUG_HERE/parent-model-slug/' tmp/model-instance-metadata.json
55
-
# sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-instance-slug/' tmp/model-instance-metadata.json
56
+
# sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-variation-slug/' tmp/model-instance-metadata.json
56
57
# sed -i 's/INSERT_FRAMEWORK_HERE/jax/' tmp/model-instance-metadata.json
57
58
# echo "a,b,c,d" > tmp/data.csv # Example model file
58
59
@@ -70,12 +71,12 @@ Downloads the `model-instance-metadata.json` file for an existing model variatio
70
71
**Usage:**
71
72
72
73
```bash
73
-
kaggle models variations get <MODEL_INSTANCE> -p <FOLDER_PATH>
74
+
kaggle models variations get <MODEL_VARIATION> -p <FOLDER_PATH>
74
75
```
75
76
76
77
**Arguments:**
77
78
78
-
*`<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
79
+
*`<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
79
80
80
81
**Options:**
81
82
@@ -100,12 +101,12 @@ Lists files for the current version of a model variation.
*`<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
167
+
*`<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
*`<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`).
17
+
*`<MODEL_VARIATION>`: The target model variation URL suffix for the new version (format: `owner/model-slug/framework/variation-slug`, e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`).
18
18
19
19
**Options:**
20
20
@@ -45,12 +45,12 @@ Downloads files for a specific version of a model variation.
*`<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`).
53
+
*`<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
54
54
55
55
**Options:**
56
56
@@ -79,12 +79,12 @@ Lists files for a specific version of a model variation.
*`<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`).
119
+
*`<MODEL_VARIATION_VERSION>`: Model variation version URL suffix in the format `owner/model-slug/framework/variation-slug/version-number` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main/1`).
Copy file name to clipboardExpand all lines: docs/models_metadata.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
1
A full model is composed of 3 types of entities:
2
2
3
3
1. The model
4
-
2. The instances
5
-
3. The instance versions
4
+
2. The variations
5
+
3. The variation versions
6
6
7
7
Let's take the example of [efficientnet](https://www.kaggle.com/models/tensorflow/efficientnet) to explain these entities.
8
8
9
-
A model like `efficientnet` contains multiple instances.
9
+
A model like `efficientnet` contains multiple variations.
10
10
11
-
An instance is a specific variation of the model (e.g. B0, B1, ...) with a certain framework (e.g. TensorFlow2).
11
+
A variation is a specific variation of the model (e.g. B0, B1, ...) with a certain framework (e.g. TensorFlow2).
12
12
13
13
## Model
14
14
@@ -44,9 +44,9 @@ We currently support the following metadata fields for models.
44
44
*`publishTime`: the original publishing time of the model
45
45
*`provenanceSources`: the provenance of the model
46
46
47
-
## Model Instance
47
+
## Model Variation
48
48
49
-
To create a model instance, a special `model-instance-metadata.json` file must be specified.
49
+
To create a model variation, a special `model-instance-metadata.json` file must be specified.
50
50
51
51
Here's a basic example for `model-instance-metadata.json`:
52
52
```
@@ -66,22 +66,22 @@ Here's a basic example for `model-instance-metadata.json`:
66
66
}
67
67
```
68
68
69
-
You can also use the API command `kaggle models instances init -p /path/to/model-instance` to have the API create this file for you for a new model instance.
69
+
You can also use the API command `kaggle models variations init -p /path/to/model-variation` to have the API create this file for you for a new model variation.
70
70
71
71
### Contents
72
72
73
-
We currently support the following metadata fields for model instances.
73
+
We currently support the following metadata fields for model variations.
74
74
75
75
*`ownerSlug`: the slug of the user or organization of the model
76
76
*`modelSlug`: the existing model's slug
77
-
*`instanceSlug`: the slug of the instance
78
-
*`framework`: the instance's framework (possible options: `tensorFlow1`,`tensorFlow2`,`tfLite`,`tfJs`,`pyTorch`,`jax`,`coral`, ...)
79
-
*`overview`: a short overview of the instance
80
-
*`usage`: the instance's usage in markdown syntax (see the template below)
81
-
*`fineTunable`: whether the instance is fine tunable
77
+
*`instanceSlug`: the slug of the variation
78
+
*`framework`: the variation's framework (possible options: `tensorFlow1`,`tensorFlow2`,`tfLite`,`tfJs`,`pyTorch`,`jax`,`coral`, ...)
79
+
*`overview`: a short overview of the variation
80
+
*`usage`: the variation's usage in markdown syntax (see the template below)
81
+
*`fineTunable`: whether the variation is fine tunable
82
82
*`trainingData`: a list of training data in the form of strings, URLs, Kaggle Datasets, etc...
83
-
*`modelInstanceType`: whether the model instance is a base model, external variant, internal variant, or unspecified
84
-
*`baseModelInstance`: if this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance
83
+
*`modelInstanceType`: whether the model variation is a base model, external variant, internal variant, or unspecified
84
+
*`baseModelInstance`: if this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{variation-slug}` of the base model variation
85
85
*`externalBaseModelUrl`: if this is an external variant, a URL to the base model
0 commit comments