-
Notifications
You must be signed in to change notification settings - Fork 1.3k
More renaming of instance #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | |
| ## `kaggle models variations init` | ||
|
|
||
| Initializes a metadata file (`model-instance-metadata.json`) for creating a new model variation. | ||
| Note that the name of the file reflects the old name for a variation, which was "instance". | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add support for either Can be addressed in a separate PR.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not a bad idea. I'm planning to not change any more code for this release.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On the flip-side, having a new metadata filename (even though would not be a breaking if implemented as described above) might be better to do at a major version bump. Agree that we want to limit scope creep but can be likely addressed in a separate PR of <10 lines of code. |
||
|
|
||
| **Usage:** | ||
|
|
||
|
|
@@ -52,7 +53,7 @@ Create a new model variation using the metadata and files in the `tmp` folder, q | |
| # Example: Edit model-instance-metadata.json first | ||
| # sed -i 's/INSERT_OWNER_SLUG_HERE/your-username/' tmp/model-instance-metadata.json | ||
| # sed -i 's/INSERT_EXISTING_MODEL_SLUG_HERE/parent-model-slug/' tmp/model-instance-metadata.json | ||
| # sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-instance-slug/' tmp/model-instance-metadata.json | ||
| # sed -i 's/INSERT_INSTANCE_SLUG_HERE/my-variation-slug/' tmp/model-instance-metadata.json | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should it be INSERT_VARIATION_SLUG? (may need to update the init command to set the proper value).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That would require a change in the code. |
||
| # sed -i 's/INSERT_FRAMEWORK_HERE/jax/' tmp/model-instance-metadata.json | ||
| # echo "a,b,c,d" > tmp/data.csv # Example model file | ||
|
|
||
|
|
@@ -70,12 +71,12 @@ Downloads the `model-instance-metadata.json` file for an existing model variatio | |
| **Usage:** | ||
|
|
||
| ```bash | ||
| kaggle models variations get <MODEL_INSTANCE> -p <FOLDER_PATH> | ||
| kaggle models variations get <MODEL_VARIATION> -p <FOLDER_PATH> | ||
| ``` | ||
|
|
||
| **Arguments:** | ||
|
|
||
| * `<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
| * `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
|
|
||
| **Options:** | ||
|
|
||
|
|
@@ -100,12 +101,12 @@ Lists files for the current version of a model variation. | |
| **Usage:** | ||
|
|
||
| ```bash | ||
| kaggle models variations files <MODEL_INSTANCE> [options] | ||
| kaggle models variations files <MODEL_VARIATION> [options] | ||
| ``` | ||
|
|
||
| **Arguments:** | ||
|
|
||
| * `<MODEL_INSTANCE>`: Model variation URL suffix (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
| * `<MODEL_VARIATION>`: Model variation URL suffix (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
|
|
||
| **Options:** | ||
|
|
||
|
|
@@ -158,12 +159,12 @@ Deletes a model variation from Kaggle. | |
| **Usage:** | ||
|
|
||
| ```bash | ||
| kaggle models variations delete <MODEL_INSTANCE> [options] | ||
| kaggle models variations delete <MODEL_VARIATION> [options] | ||
| ``` | ||
|
|
||
| **Arguments:** | ||
|
|
||
| * `<MODEL_INSTANCE>`: Model variation URL suffix in the format `owner/model-slug/framework/instance-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
| * `<MODEL_VARIATION>`: Model variation URL suffix in the format `owner/model-slug/framework/variation-slug` (e.g., `$KAGGLE_DEVELOPER/test-model/jax/main`). | ||
|
|
||
| **Options:** | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,14 @@ | ||
| A full model is composed of 3 types of entities: | ||
|
|
||
| 1. The model | ||
| 2. The instances | ||
| 3. The instance versions | ||
| 2. The variations | ||
| 3. The variation versions | ||
|
|
||
| Let's take the example of [efficientnet](https://www.kaggle.com/models/tensorflow/efficientnet) to explain these entities. | ||
|
|
||
| A model like `efficientnet` contains multiple instances. | ||
| A model like `efficientnet` contains multiple variations. | ||
|
|
||
| An instance is a specific variation of the model (e.g. B0, B1, ...) with a certain framework (e.g. TensorFlow2). | ||
| A variation is a specific variation of the model (e.g. B0, B1, ...) with a certain framework (e.g. TensorFlow2). | ||
|
|
||
| ## Model | ||
|
|
||
|
|
@@ -44,9 +44,9 @@ We currently support the following metadata fields for models. | |
| * `publishTime`: the original publishing time of the model | ||
| * `provenanceSources`: the provenance of the model | ||
|
|
||
| ## Model Instance | ||
| ## Model Variation | ||
|
|
||
| To create a model instance, a special `model-instance-metadata.json` file must be specified. | ||
| To create a model variation, a special `model-instance-metadata.json` file must be specified. | ||
|
|
||
| Here's a basic example for `model-instance-metadata.json`: | ||
| ``` | ||
|
|
@@ -66,22 +66,22 @@ Here's a basic example for `model-instance-metadata.json`: | |
| } | ||
| ``` | ||
|
|
||
| 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. | ||
| 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. | ||
|
|
||
| ### Contents | ||
|
|
||
| We currently support the following metadata fields for model instances. | ||
| We currently support the following metadata fields for model variations. | ||
|
|
||
| * `ownerSlug`: the slug of the user or organization of the model | ||
| * `modelSlug`: the existing model's slug | ||
| * `instanceSlug`: the slug of the instance | ||
| * `framework`: the instance's framework (possible options: `tensorFlow1`,`tensorFlow2`,`tfLite`,`tfJs`,`pyTorch`,`jax`,`coral`, ...) | ||
| * `overview`: a short overview of the instance | ||
| * `usage`: the instance's usage in markdown syntax (see the template below) | ||
| * `fineTunable`: whether the instance is fine tunable | ||
| * `variationSlug`: the slug of the variation | ||
|
||
| * `framework`: the variation's framework (possible options: `tensorFlow1`,`tensorFlow2`,`tfLite`,`tfJs`,`pyTorch`,`jax`,`coral`, ...) | ||
| * `overview`: a short overview of the variation | ||
| * `usage`: the variation's usage in markdown syntax (see the template below) | ||
| * `fineTunable`: whether the variation is fine tunable | ||
| * `trainingData`: a list of training data in the form of strings, URLs, Kaggle Datasets, etc... | ||
| * `modelInstanceType`: whether the model instance is a base model, external variant, internal variant, or unspecified | ||
| * `baseModelInstance`: if this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance | ||
| * `modelInstanceType`: whether the model variation is a base model, external variant, internal variant, or unspecified | ||
| * `baseModelInstance`: if this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{variation-slug}` of the base model variation | ||
| * `externalBaseModelUrl`: if this is an external variant, a URL to the base model | ||
|
|
||
| ### Licenses | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sections have been renamed. We now have 3 ways. I wouldn't list then here given more may be added (like OAuth).
I would simply change the link & phrasing: