artifacts
3 minute read
module wandb.apis.public
W&B Public API for Artifact objects.
This module provides classes for interacting with W&B artifacts and their collections.
class ArtifactTypes
An iterable collection of artifact types for a specific project.
class ArtifactType
An artifact object that satisfies query based on the specified type.
Args:
client
: The client instance to use for querying W&B.entity
: The entity (user or team) that owns the project.project
: The name of the project to query for artifact types.type_name
: The name of the artifact type.attrs
: Optional mapping of attributes to initialize the artifact type. If not provided, the object will load its attributes from W&B upon initialization.
property ArtifactType.id
The unique identifier of the artifact type.
property ArtifactType.name
The name of the artifact type.
method ArtifactType.collection
collection(name: 'str') → ArtifactCollection
Get a specific artifact collection by name.
Args:
name
(str): The name of the artifact collection to retrieve.
method ArtifactType.collections
collections(per_page: 'int' = 50) → ArtifactCollections
Get all artifact collections associated with this artifact type.
Args:
per_page
(int): The number of artifact collections to fetch per page. Default is 50.
class ArtifactCollections
Artifact collections of a specific type in a project.
Args:
client
: The client instance to use for querying W&B.entity
: The entity (user or team) that owns the project.project
: The name of the project to query for artifact collections.type_name
: The name of the artifact type for which to fetch collections.per_page
: The number of artifact collections to fetch per page. Default is 50.
property ArtifactCollections.length
class ArtifactCollection
An artifact collection that represents a group of related artifacts.
Args:
client
: The client instance to use for querying W&B.entity
: The entity (user or team) that owns the project.project
: The name of the project to query for artifact collections.name
: The name of the artifact collection.type
: The type of the artifact collection (e.g., “dataset”, “model”).organization
: Optional organization name if applicable.attrs
: Optional mapping of attributes to initialize the artifact collection. If not provided, the object will load its attributes from W&B upon initialization.
property ArtifactCollection.aliases
Artifact Collection Aliases.
property ArtifactCollection.created_at
The creation date of the artifact collection.
property ArtifactCollection.description
A description of the artifact collection.
property ArtifactCollection.id
The unique identifier of the artifact collection.
property ArtifactCollection.name
The name of the artifact collection.
property ArtifactCollection.tags
The tags associated with the artifact collection.
property ArtifactCollection.type
Returns the type of the artifact collection.
method ArtifactCollection.artifacts
artifacts(per_page: 'int' = 50) → Artifacts
Get all artifacts in the collection.
method ArtifactCollection.change_type
change_type(new_type: 'str') → None
Deprecated, change type directly with save
instead.
method ArtifactCollection.delete
delete() → None
Delete the entire artifact collection.
method ArtifactCollection.is_sequence
is_sequence() → bool
Return whether the artifact collection is a sequence.
method ArtifactCollection.save
save() → None
Persist any changes made to the artifact collection.
class Artifacts
An iterable collection of artifact versions associated with a project.
Optionally pass in filters to narrow down the results based on specific criteria.
Args:
client
: The client instance to use for querying W&B.entity
: The entity (user or team) that owns the project.project
: The name of the project to query for artifacts.collection_name
: The name of the artifact collection to query.type
: The type of the artifacts to query. Common examples include “dataset” or “model”.filters
: Optional mapping of filters to apply to the query.order
: Optional string to specify the order of the results.per_page
: The number of artifact versions to fetch per page. Default is 50.tags
: Optional string or list of strings to filter artifacts by tags.
property Artifacts.length
class RunArtifacts
An iterable collection of artifacts associated with a specific run.
property RunArtifacts.length
class ArtifactFiles
A paginator for files in an artifact.
property ArtifactFiles.length
property ArtifactFiles.path
Returns the path of the artifact.
Feedback
Was this page helpful?
Glad to hear it! If you have more to say, please let us know.
Sorry to hear that. Please tell us how we can improve.