Skip to content

Commit

Permalink
chore(artifacts): Add weave support to enable artifact version tags i…
Browse files Browse the repository at this point in the history
…n UI (server) (#1986)

* chore(weave): wip - boilerplate for opArtifactVersionTags

* chore(weave): wip - starter boilerplate for artifact version tags

* chore(weave): add tags field to Artifact gql schema

* chore(weave): autoformatting

* chore(weave): fix returnType for opArtifactVersionTags

* chore(weave): handle 'artifactVersion-tags' in gql.ts

* chore(weave): fix required fragment for artifact vertsion tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): fix python weave op for version tags

* chore(weave): adapt PanelArtifactVersionAliases -> PanelArtifactVersionTags

* chore(weave): fix return type

* chore(weave): adapt PanelArtifactVersionAliases -> PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): fixes for PanelArtifactVersionTags

* chore(weave): drop unused Tag type for artifacts

* chore(ui): cleanup and fixes

* chore(ui): revert returnType for opArtifactRawTags

* chore(weave): fixes for pr comments

* chore(ui): require all Tag fields -- we need them anyway

* chore(ui): fix/simplify/consolidate weave type definitions

* chore(ui): rename artifactVersionTags op -> artifactVersionRawTags op for consistency

* chore(weave): split off changes in weave-js/
  • Loading branch information
tonyyli-wandb authored Aug 5, 2024
1 parent 8b0d509 commit 83efe6f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
1 change: 1 addition & 0 deletions wb_schema.gql
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,7 @@ type Artifact {
currentManifest: ArtifactManifest
historyStep: Int64
ttlDurationSeconds: Int64!
tags: [Tag!]!
}

type ArtifactManifestConnection {
Expand Down
27 changes: 27 additions & 0 deletions weave/legacy/ops_domain/artifact_version_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,33 @@ def metadata(
)


@op(
name="artifactVersion-rawTags",
output_type=types.List(
types.TypedDict(
{
"id": types.String(),
"name": types.String(),
"tagCategoryName": types.String(),
"attributes": types.String(),
}
)
),
plugins=wb_gql_op_plugin(
lambda inputs, inner: """
tags {
id
name
tagCategoryName
attributes
}
"""
),
)
def artifact_version_raw_tags(artifact: wdt.ArtifactVersion):
return artifact["tags"]


@op(
name="artifactVersion-createdBy",
plugins=wb_gql_op_plugin(
Expand Down
1 change: 1 addition & 0 deletions weave/legacy/panels/panel_legacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class LPanel:
LPanel("run-overview", "PanelRunOverview"),
LPanel("none", "PanelNone"),
LPanel("artifactVersionAliases", "PanelArtifactVersionAliases"),
LPanel("artifactVersionTags", "PanelArtifactVersionTags"),
LPanel("netron", "PanelNetron"),
LPanel("object", "PanelObject"),
LPanel("audio-file", "PanelAudioFile"),
Expand Down

0 comments on commit 83efe6f

Please sign in to comment.