-
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
Merged
+56
−57
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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". | ||
|
|
||
| **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:** | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Should we add support for either
model-instance-metadata.jsonormodel-variation-metadata.json. The latter always having priority over the former. And documentation should mention usingmodel-variation-metadata.jsonwith maybe a small note about the former name.Can be addressed in a separate PR.
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.
Not a bad idea. I'm planning to not change any more code for this release.
Uh oh!
There was an error while loading. Please reload this page.
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.
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.