-
Notifications
You must be signed in to change notification settings - Fork 16
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
Get artifact version registered at commit #312
Comments
I like that the artifact name is optional. Because all I need is the revision, and navigate the git repo to that revision to find the artifact (e.g. a model) version in the dvc.lock file.
Having the
That would give me a clean model name to save to the database. And it makes it easy to find the model code with the tag, regardless of its stage - which from what I understand, stages don't map to different versions of the model, code and data; they just tell you "where" they have been deployed to. @aguschin that was a late reply, my bad! Right now I am using a mix of |
Ok, I think I came up with a decent way to include this in Please let me know what do you think) $ git clone https://github.com/iterative/example-gto
$ cd example-gto
$ gto show
╒══════════╤══════════╤════════╤═════════╤════════════╕
│ name │ latest │ #dev │ #prod │ #staging │
╞══════════╪══════════╪════════╪═════════╪════════════╡
│ churn │ v3.1.1 │ v3.1.1 │ v3.0.0 │ v3.1.0 │
│ cv-class │ v0.1.13 │ - │ - │ - │
│ segment │ v0.4.1 │ v0.4.1 │ - │ - │
╘══════════╧══════════╧════════╧═════════╧════════════╛
$ gto show nn:HEAD # show versions for nn in HEAD
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact │ version │ stage │ created_at │ ref │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn │ v3.1.0 │ staging │ 2022-11-20 09:36:38 │ churn@v3.1.0 │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show nn:HEAD --ref
churn@v3.1.0
$ gto show :HEAD # show all artifacts that have versions/assignments in HEAD
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact │ version │ stage │ created_at │ ref │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn │ v3.1.0 │ staging │ 2022-11-20 09:36:38 │ churn@v3.1.0 │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show @v3.1.0 # show all v3.1.0 versions for all artifacts
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact │ version │ stage │ created_at │ ref │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn │ v3.1.0 │ staging │ 2022-11-20 09:36:38 │ churn@v3.1.0 │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show "#staging" # show all versions in staging for all artifacts
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact │ version │ stage │ created_at │ ref │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn │ v3.1.0 │ staging │ 2022-11-20 09:36:38 │ churn@v3.1.0 │
╘════════════╧═══════════╧═════════╧═════════════════════╧══════════════╛
$ gto show --long # alternative way to show the registry
╒════════════╤═══════════╤═════════╤═════════════════════╤══════════════╕
│ artifact │ version │ stage │ created_at │ ref │
╞════════════╪═══════════╪═════════╪═════════════════════╪══════════════╡
│ churn │ v3.1.1 │ dev │ 2022-11-27 08:16:38 │ churn@v3.1.1 │
│ churn │ v3.1.0 │ staging │ 2022-11-20 09:36:38 │ churn@v3.1.0 │
│ churn │ v3.0.0 │ prod │ 2022-11-15 18:29:58 │ churn@v3.0.0 │
│ cv-class │ v0.1.13 │ │ 2022-11-18 02:03:18 │ cv-class@v0.1.13 │
│ cv-class │ 793ff78 │ │ 2022-11-19 05:49:58 │ 793ff78 │
│ segment │ v0.4.1 │ dev │ 2022-11-16 22:16:38 │ segment@v0.4.1 │
│ segment │ 793ff78 │ │ 2022-11-19 05:49:58 │ 793ff78 │
╘════════════╧═══════════╧═════════╧═════════════════════╧════════════════╛ For the record, this design doesn't allow to get Git tags that assigned stages in HEAD (all or for a specific artifact), but that's not required currently and can be ignored I assume. |
Well it is good enough for my use case: I only need a gto controlled version-tag so that it matches predictions I am saving in the database with the tags in the git repository. So, on my end, I'd say this is a good addition for me already 😄 |
@aguschin hey, I would like to request to have this accesible from Python, if possible :D |
From discord:
Now it can be achieved with something like:
We can add a command to GTO, but I need to better understand how it should work first.
Specifically for this case:
If we try to generalize a bit:
Then it can look like
WDYT? Maybe there are some simpler options or this can be included in existing commands (like
gto show
orgto check-ref
?)The text was updated successfully, but these errors were encountered: