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
refactor(artifacts): add programmatic alias addition/removal from SDK on artifacts #4429
Conversation
…db/wandb into modelreg/update-aliases-on-artifacts
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #4429 +/- ##
==========================================
+ Coverage 83.01% 83.02% +0.01%
==========================================
Files 258 258
Lines 32871 32891 +20
==========================================
+ Hits 27288 27308 +20
Misses 5583 5583
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
Looks good, but made a few comments. Overall, reading this again, it seems like we could put this logic in the updateArtifact
gorilla resolver and reduce this back to a single call. for example, we could extend the UpdateArtifact input schema:
input ArtifactAliasInput {
artifactCollectionName: String!
alias: String! @constraints(max: 128)
entityName: String # new, optional field
projectName: String # new, optional field
}
Then in the gorilla resolver, if entityName or projectName are null, then we use the current logic. Else, if present, we calculate the delta and call add/remove aliases internally. This would mean the python client code does not need to do all this extra stuff (other than add new fields if the backend supports it)
…db/wandb into modelreg/update-aliases-on-artifacts
…db/wandb into modelreg/update-aliases-on-artifacts
… after the alias endpoints
…SDK on artifacts (#4429) * add update_aliases method and relevant gql mutations * wip test * added test for public api * removed relay call * code nit * changed to alias updates in pythonic list form rather than separate method * modify test * backwards compatibility * format * collection name * format * modified test to ensure collection-specific alias changes occurred * nit
…SDK on artifacts (#4429) * add update_aliases method and relevant gql mutations * wip test * added test for public api * removed relay call * code nit * changed to alias updates in pythonic list form rather than separate method * modify test * backwards compatibility * format * collection name * format * modified test to ensure collection-specific alias changes occurred * nit
https://wandb.atlassian.net/browse/WB-10249
Description
Current behavior:
Design doc: https://www.notion.so/wandbai/Programmatic-Aliases-Model-Registry-Artifacts-5275e2daca4c4405a525a871d1ff586f
Behavior after the PR (SDK portion):
Testing
How was this PR tested?
Test with Relay.
Checklist