The syntax and available operators you can use to query W&B Registry is similar, but not identical, to MongoDB queries.
Search for registry items
Use the search bar on the W&B Registry homepage to find collections and registries by name. Use the advanced search to find registries, collections, or artifact versions with specific attributes such as name, tag, description, creation date, and more.Basic search
Search for registries and collections from the W&B Registry homepage:- Navigate to the W&B Registry.
- Enter a search term in the search bar at the top of the page.
- Press Enter to search.
Advanced search
Use the advanced search to search for registries, collections, or artifact versions. Use filters to search for specific registry items based on attributes such as name, tag, description, creation date, and more.- Navigate to the W&B Registry.
- Click Advanced at the top of the homepage.
- Select Registries, Collections, or Versions button.
- Click Filters.
- From left to right, select the attribute you want to filter by, the operator, and the value. You can add multiple filters to narrow down your search results.
- Press Enter to apply the filter.
Query registry items
Usewandb.Api().registries() and query predicates to filter registries, collections, and artifact versions. A query predicate is a condition that specifies the criteria that returned items must meet.
To create a query predicate, use a JSON-like dictionary that consists of query name, one or more operators, and values. The following code snippet shows the general structure of a query predicate:
Filterable fields
The following table lists query names you can use based on the type of item you want to filter:Supported operators
W&B supports the following comparison and logical operators for filtering registry items:Comparison operators
Logical operators
Other operators
Example queries
The following code examples demonstrate some common search scenarios. To use thewandb.Api().registries() method, first import the W&B Python SDK (wandb) library:
model:
yolo in the collection name:
yolo in the collection name and possesses cnn as a tag:
model and has either the tag image-classification or an latest alias:
artifacts iterable in the previous code snippet is an instance of the Artifact class. This means that you can access each artifact’s attributes, such as name, collection, aliases, tags, created_at, and more:
Specify the date and time in
YYYY-MM-DD HH:MM:SS format for created_at and updated_at queries. You can omit the hours, minutes, and seconds if you want to filter by date only.