Skip to main content

How can I find the artifacts logged or consumed by a run? How can I find the runs that produced or consumed an artifact?

W&B tracks artifacts logged by each run and those used by each run to construct an artifact graph. This graph is a bipartite, directed, acyclic graph with nodes representing runs and artifacts. An example can be viewed here (click "Explode" to expand the graph).

Use the Public API to navigate the graph programmatically, starting from either an artifact or a run.

api = wandb.Api()

artifact = api.artifact("project/artifact:alias")

# Walk up the graph from an artifact:
producer_run = artifact.logged_by()
# Walk down the graph from an artifact:
consumer_runs = artifact.used_by()

# Walk down the graph from a run:
next_artifacts = consumer_runs[0].logged_artifacts()
# Walk up the graph from a run:
previous_artifacts = producer_run.used_artifacts()
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž