> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-weave-wal-docs-1993.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Artifact

export const GitHubLink = ({url}) => <a href={url} target="_blank" rel="noopener noreferrer" className="github-source-link">
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub source
  </a>;

<GitHubLink url="https://github.com/wandb/wandb/blob/main/wandb/sdk/artifacts/artifact.py" />

## <kbd>class</kbd> `Artifact`

Flexible and lightweight building block for dataset and model versioning.

Construct an empty W\&B Artifact. Populate an artifacts contents with methods that begin with `add`. Once the artifact has all the desired files, you can call `run.log_artifact()` to log it.

### <kbd>method</kbd> `Artifact.__init__`

```python  theme={null}
__init__(
    name: 'str',
    type: 'str',
    description: 'str | None' = None,
    metadata: 'dict[str, Any] | None' = None,
    incremental: 'bool' = False,
    use_as: 'str | None' = None,
    storage_region: 'str | None' = None
) → None
```

**Args:**

* `name` (str):  A human-readable name for the artifact. Use the name to identify  a specific artifact in the W\&B App UI or programmatically. You can  interactively reference an artifact with the `use_artifact` Public API.  A name can contain letters, numbers, underscores, hyphens, and dots.  The name must be unique across a project.
* `type` (str):  The artifact's type. Use the type of an artifact to both organize  and differentiate artifacts. You can use any string that contains letters,  numbers, underscores, hyphens, and dots. Common types include `dataset` or  `model`. Include `model` within your type string if you want to link the  artifact to the W\&B Model Registry.  Note that some types reserved for internal use and cannot be set by users.  Such types include `job` and types that start with `wandb-`.
* `description (str | None) = None`:  A description of the artifact. For Model or  Dataset Artifacts, add documentation for your standardized team model or  dataset card. View an artifact's description programmatically with the  `Artifact.description` attribute or programmatically with the W\&B App UI.  W\&B renders the description as markdown in the W\&B App.
* `metadata (dict[str, Any] | None) = None`:  Additional information about an artifact.  Specify metadata as a dictionary of key-value pairs. You can specify no more  than 100 total keys.
* `incremental`:  Use `Artifact.new_draft()` method instead to modify an  existing artifact.
* `use_as`:  Deprecated.

**Returns:**
An `Artifact` object.

***

### <kbd>property</kbd> Artifact.aliases

List of one or more semantically-friendly references or

identifying "nicknames" assigned to an artifact version.

Aliases are mutable references that you can programmatically reference. Change an artifact's alias with the W\&B App UI or programmatically. See [Create new artifact versions](https://docs.wandb.ai/guides/artifacts/create-a-new-artifact-version) for more information.

**Returns:**

* `list[str]`: The aliases property value.

***

### <kbd>property</kbd> Artifact.collection

The collection this artifact is retrieved from.

A collection is an ordered group of artifact versions. If this artifact is retrieved from a collection that it is linked to, return that collection. Otherwise, return the collection that the artifact version originates from.

The collection that an artifact originates from is known as the source sequence.

**Returns:**

* `ArtifactCollection`: The collection property value.

***

### <kbd>property</kbd> Artifact.commit\_hash

The hash returned when this artifact was committed.

**Returns:**

* `str`: The commit\_hash property value.

***

### <kbd>property</kbd> Artifact.created\_at

Timestamp when the artifact was created.

**Returns:**

* `str`: The created\_at property value.

***

### <kbd>property</kbd> Artifact.description

A description of the artifact.

**Returns:**

* `str | None`: The description property value.

***

### <kbd>property</kbd> Artifact.digest

The logical digest of the artifact.

The digest is the checksum of the artifact's contents. If an artifact has the same digest as the current `latest` version, then `log_artifact` is a no-op.

**Returns:**

* `str`: The digest property value.

***

### <kbd>property</kbd> Artifact.entity

The name of the entity that the artifact collection belongs to.

If the artifact is a link, the entity will be the entity of the linked artifact.

**Returns:**

* `str`: The entity property value.

***

### <kbd>property</kbd> Artifact.file\_count

The number of files (including references).

**Returns:**

* `int`: The file\_count property value.

***

### <kbd>property</kbd> Artifact.history\_step

The nearest step which logged history metrics for this artifact's source run.

**Examples:**

```python  theme={null}
run = artifact.logged_by()
if run and (artifact.history_step is not None):
    history = run.sample_history(
        min_step=artifact.history_step,
        max_step=artifact.history_step + 1,
        keys=["my_metric"],
    )
```

**Returns:**

* `int | None`: The history\_step property value.

***

### <kbd>property</kbd> Artifact.id

The artifact's ID.

**Returns:**

* `str | None`: The id property value.

***

### <kbd>property</kbd> Artifact.is\_link

Boolean flag indicating if the artifact is a link artifact.

True: The artifact is a link artifact to a source artifact. False: The artifact is a source artifact.

**Returns:**

* `bool`: The is\_link property value.

***

### <kbd>property</kbd> Artifact.linked\_artifacts

Returns a list of all the linked artifacts of a source artifact.

If this artifact is a link artifact (`artifact.is_link == True`), it will return an empty list.

Limited to 500 results.

**Returns:**

* `list[Artifact]`: The linked\_artifacts property value.

***

### <kbd>property</kbd> Artifact.manifest

The artifact's manifest.

The manifest lists all of its contents, and can't be changed once the artifact has been logged.

**Returns:**

* `ArtifactManifest`: The manifest property value.

***

### <kbd>property</kbd> Artifact.metadata

User-defined artifact metadata.

Structured data associated with the artifact.

**Returns:**

* `dict`: The metadata property value.

***

### <kbd>property</kbd> Artifact.name

The artifact name and version of the artifact.

A string with the format `{collection}:{alias}`. If fetched before an artifact is logged/saved, the name won't contain the alias. If the artifact is a link, the name will be the name of the linked artifact.

**Returns:**

* `str`: The name property value.

***

### <kbd>property</kbd> Artifact.project

The name of the project that the artifact collection belongs to.

If the artifact is a link, the project will be the project of the linked artifact.

**Returns:**

* `str`: The project property value.

***

### <kbd>property</kbd> Artifact.qualified\_name

The entity/project/name of the artifact.

If the artifact is a link, the qualified name will be the qualified name of the linked artifact path.

**Returns:**

* `str`: The qualified\_name property value.

***

### <kbd>property</kbd> Artifact.size

The total size of the artifact in bytes.

Includes any references tracked by this artifact.

**Returns:**

* `int`: The size property value.

***

### <kbd>property</kbd> Artifact.source\_artifact

Returns the source artifact, which is the original logged artifact.

If this artifact is a source artifact (`artifact.is_link == False`), it will return itself.

**Returns:**

* `Artifact`: The source\_artifact property value.

***

### <kbd>property</kbd> Artifact.source\_collection

The artifact's source collection.

The source collection is the collection that the artifact was logged from.

**Returns:**

* `ArtifactCollection`: The source\_collection property value.

***

### <kbd>property</kbd> Artifact.source\_entity

The name of the entity of the source artifact.

**Returns:**

* `str`: The source\_entity property value.

***

### <kbd>property</kbd> Artifact.source\_name

The artifact name and version of the source artifact.

A string with the format `{source_collection}:{alias}`. Before the artifact is saved, contains only the name since the version is not yet known.

**Returns:**

* `str`: The source\_name property value.

***

### <kbd>property</kbd> Artifact.source\_project

The name of the project of the source artifact.

**Returns:**

* `str`: The source\_project property value.

***

### <kbd>property</kbd> Artifact.source\_qualified\_name

The source\_entity/source\_project/source\_name of the source artifact.

**Returns:**

* `str`: The source\_qualified\_name property value.

***

### <kbd>property</kbd> Artifact.source\_version

The source artifact's version.

A string with the format `v{number}`.

**Returns:**

* `str`: The source\_version property value.

***

### <kbd>property</kbd> Artifact.state

The status of the artifact. One of: "PENDING", "COMMITTED", or "DELETED".

**Returns:**

* `str`: The state property value.

***

### <kbd>property</kbd> Artifact.tags

List of one or more tags assigned to this artifact version.

**Returns:**

* `list[str]`: The tags property value.

***

### <kbd>property</kbd> Artifact.ttl

The time-to-live (TTL) policy of an artifact.

Artifacts are deleted shortly after a TTL policy's duration passes. If set to `None`, the artifact deactivates TTL policies and will be not scheduled for deletion, even if there is a team default TTL. An artifact inherits a TTL policy from the team default if the team administrator defines a default TTL and there is no custom policy set on an artifact.

**Raises:**

* `ArtifactNotLoggedError`:  Unable to fetch inherited TTL if the artifact has not been logged or saved.

**Returns:**

* `timedelta | None`: The ttl property value.

***

### <kbd>property</kbd> Artifact.type

The artifact's type. Common types include `dataset` or `model`.

**Returns:**

* `str`: The type property value.

***

### <kbd>property</kbd> Artifact.updated\_at

The time when the artifact was last updated.

**Returns:**

* `str`: The updated\_at property value.

***

### <kbd>property</kbd> Artifact.url

Constructs the URL of the artifact.

**Returns:**

* `str`:  The URL of the artifact.

**Returns:**

* `str`: The url property value.

***

### <kbd>property</kbd> Artifact.use\_as

Deprecated.

**Returns:**

* `str | None`: The use\_as property value.

***

### <kbd>property</kbd> Artifact.version

The artifact's version.

A string with the format `v{number}`. If this is a link artifact, the version will be from the linked collection.

**Returns:**

* `str`: The version property value.

***

### <kbd>method</kbd> `Artifact.add`

```python  theme={null}
add(
    obj: 'WBValue',
    name: 'StrPath',
    overwrite: 'bool' = False
) → ArtifactManifestEntry
```

Add wandb.WBValue `obj` to the artifact.

**Args:**

* `obj`:  The object to add. Currently support one of Bokeh, JoinedTable,  PartitionedTable, Table, Classes, ImageMask, BoundingBoxes2D,  Audio, Image, Video, Html, Object3D
* `name`:  The path within the artifact to add the object.
* `overwrite`:  If True, overwrite existing objects with the same file  path if applicable.

**Returns:**
The added manifest entry

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead.

***

### <kbd>method</kbd> `Artifact.add_dir`

```python  theme={null}
add_dir(
    local_path: 'str',
    name: 'str | None' = None,
    skip_cache: 'bool | None' = False,
    policy: "Literal['mutable', 'immutable'] | None" = 'mutable',
    merge: 'bool' = False
) → None
```

Add a local directory to the artifact.

**Args:**

* `local_path`:  The path of the local directory.
* `name`:  The subdirectory name within an artifact. The name you  specify appears in the W\&B App UI nested by artifact's `type`.  Defaults to the root of the artifact.
* `skip_cache`:  If set to `True`, W\&B will not copy/move files to  the cache while uploading
* `policy`:  By default, "mutable".
  * mutable: Create a temporary copy of the file to prevent  corruption during upload.
  * immutable: Disable protection, rely on the user not to delete  or change the file.
* `merge`:  If `False` (default), throws ValueError if a file was already added  in a previous add\_dir call and its content has changed. If `True`,  overwrites existing files with changed content. Always adds new files  and never removes files. To replace an entire directory, pass a name  when adding the directory using `add_dir(local_path, name=my_prefix)`  and call `remove(my_prefix)` to remove the directory, then add it again.

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current  artifact version because it is finalized. Log a new artifact  version instead.
* `ValueError`:  Policy must be "mutable" or "immutable"

***

### <kbd>method</kbd> `Artifact.add_file`

```python  theme={null}
add_file(
    local_path: 'str',
    name: 'str | None' = None,
    is_tmp: 'bool | None' = False,
    skip_cache: 'bool | None' = False,
    policy: "Literal['mutable', 'immutable'] | None" = 'mutable',
    overwrite: 'bool' = False
) → ArtifactManifestEntry
```

Add a local file to the artifact.

**Args:**

* `local_path`:  The path to the file being added.
* `name`:  The path within the artifact to use for the file being added.  Defaults to the basename of the file.
* `is_tmp`:  If true, then the file is renamed deterministically to avoid  collisions.
* `skip_cache`:  If `True`, do not copy files to the cache  after uploading.
* `policy`:  By default, set to "mutable". If set to "mutable",  create a temporary copy of the file to prevent corruption  during upload. If set to "immutable", disable  protection and rely on the user not to delete or change the  file.
* `overwrite`:  If `True`, overwrite the file if it already exists.

**Returns:**
The added manifest entry.

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current  artifact version because it is finalized. Log a new artifact  version instead.
* `ValueError`:  Policy must be "mutable" or "immutable"

***

### <kbd>method</kbd> `Artifact.add_reference`

```python  theme={null}
add_reference(
    uri: 'ArtifactManifestEntry | str',
    name: 'StrPath | None' = None,
    checksum: 'bool' = True,
    max_objects: 'int | None' = None
) → Sequence[ArtifactManifestEntry]
```

Add a reference denoted by a URI to the artifact.

Unlike files or directories that you add to an artifact, references are not uploaded to W\&B. For more information, see [Track external files](https://docs.wandb.ai/guides/artifacts/track-external-files).

By default, the following schemes are supported:

* http(s): The size and digest of the file will be inferred by the  `Content-Length` and the `ETag` response headers returned by the server.
* s3: The checksum and size are pulled from the object metadata.  If bucket versioning is enabled, then the version ID is also tracked.
* gs: The checksum and size are pulled from the object metadata. If bucket  versioning is enabled, then the version ID is also tracked.
* https, domain matching `*.blob.core.windows.net`
* Azure: The checksum and size are be pulled from the blob metadata.  If storage account versioning is enabled, then the version ID is  also tracked.
* file: The checksum and size are pulled from the file system. This scheme  is useful if you have an NFS share or other externally mounted volume  containing files you wish to track but not necessarily upload.

For any other scheme, the digest is just a hash of the URI and the size is left blank.

**Args:**

* `uri`:  The URI path of the reference to add. The URI path can be an object  returned from `Artifact.get_entry` to store a reference to another  artifact's entry.
* `name`:  The path within the artifact to place the contents of this reference.
* `checksum`:  Whether or not to checksum the resource(s) located at the  reference URI. Checksumming is strongly recommended as it enables  automatic integrity validation. Disabling checksumming will speed up  artifact creation but reference directories will not iterated through so  the objects in the directory will not be saved to the artifact.  We recommend setting `checksum=False` when adding reference objects,  in which case a new version will only be created if the reference URI  changes.
* `max_objects`:  The maximum number of objects to consider when adding a  reference that points to directory or bucket store prefix.  By default, the maximum number of objects allowed for Amazon S3,  GCS, Azure, and local files is 10,000,000. Other URI schemas  do not have a maximum.

**Returns:**
The added manifest entries.

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead.

***

### <kbd>method</kbd> `Artifact.checkout`

```python  theme={null}
checkout(root: 'str | None' = None) → str
```

Replace the specified root directory with the contents of the artifact.

WARNING: This will delete all files in `root` that are not included in the artifact.

**Args:**

* `root`:  The directory to replace with this artifact's files.

**Returns:**
The path of the checked out contents.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.delete`

```python  theme={null}
delete(delete_aliases: 'bool' = False) → None
```

Delete an artifact and its files.

If called on a linked artifact, only the link is deleted, and the source artifact is unaffected.

Use `Artifact.unlink()` instead of `Artifact.delete()` to remove a link between a source artifact and a collection.

**Args:**

* `delete_aliases`:  If set to `True`, delete all aliases associated  with the artifact. If `False`, raise an exception if  the artifact has existing aliases. This parameter is ignored  if the artifact is retrieved from a collection it is linked to.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.download`

```python  theme={null}
download(
    root: 'StrPath | None' = None,
    allow_missing_references: 'bool' = False,
    skip_cache: 'bool | None' = None,
    path_prefix: 'StrPath | None' = None,
    multipart: 'bool | None' = None
) → FilePathStr
```

Download the contents of the artifact to the specified root directory.

Existing files located within `root` are not modified. Explicitly delete `root` before you call `download` if you want the contents of `root` to exactly match the artifact.

**Args:**

* `root`:  The directory W\&B stores the artifact's files.
* `allow_missing_references`:  If set to `True`, any invalid reference paths  will be ignored while downloading referenced files.
* `skip_cache`:  If set to `True`, the artifact cache will be skipped when  downloading and W\&B will download each file into the default root or  specified download directory.
* `path_prefix`:  If specified, only files with a path that starts with the given  prefix will be downloaded. Uses unix format (forward slashes).
* `multipart`:  If set to `None` (default), the artifact will be downloaded  in parallel using multipart download if individual file size is greater  than 2GB. If set to `True` or `False`, the artifact will be downloaded in  parallel or serially regardless of the file size.

**Returns:**
The path to the downloaded contents.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.file`

```python  theme={null}
file(root: 'str | None' = None) → StrPath
```

Download a single file artifact to the directory you specify with `root`.

**Args:**

* `root`:  The root directory to store the file. Defaults to  `./artifacts/self.name/`.

**Returns:**
The full path of the downloaded file.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.
* `ValueError`:  If the artifact contains more than one file.

***

### <kbd>method</kbd> `Artifact.files`

```python  theme={null}
files(names: 'list[str] | None' = None, per_page: 'int' = 50) → ArtifactFiles
```

Iterate over all files stored in this artifact.

**Args:**

* `names`:  The filename paths relative to the root of the artifact you wish to  list.
* `per_page`:  The number of files to return per request.

**Returns:**
An iterator containing `File` objects.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.finalize`

```python  theme={null}
finalize() → None
```

Finalize the artifact version.

You cannot modify an artifact version once it is finalized because the artifact is logged as a specific artifact version. Create a new artifact version to log more data to an artifact. An artifact is automatically finalized when you log the artifact with `log_artifact`.

***

### <kbd>method</kbd> `Artifact.get`

```python  theme={null}
get(name: 'str') → WBValue | None
```

Get the WBValue object located at the artifact relative `name`.

**Args:**

* `name`:  The artifact relative name to retrieve.

**Returns:**
W\&B object that can be logged with `run.log()` and visualized in the W\&B UI.

**Raises:**

* `ArtifactNotLoggedError`:  if the artifact isn't logged or the  run is offline.

***

### <kbd>method</kbd> `Artifact.get_added_local_path_name`

```python  theme={null}
get_added_local_path_name(local_path: 'str') → str | None
```

Get the artifact relative name of a file added by a local filesystem path.

**Args:**

* `local_path`:  The local path to resolve into an artifact relative name.

**Returns:**
The artifact relative name.

***

### <kbd>method</kbd> `Artifact.get_entry`

```python  theme={null}
get_entry(name: 'StrPath') → ArtifactManifestEntry
```

Get the entry with the given name.

**Args:**

* `name`:  The artifact relative name to get

**Returns:**
A `W&B` object.

**Raises:**

* `ArtifactNotLoggedError`:  if the artifact isn't logged or the run is offline.
* `KeyError`:  if the artifact doesn't contain an entry with the given name.

***

### <kbd>method</kbd> `Artifact.get_path`

```python  theme={null}
get_path(name: 'StrPath') → ArtifactManifestEntry
```

Deprecated. Use `get_entry(name)`.

***

### <kbd>method</kbd> `Artifact.is_draft`

```python  theme={null}
is_draft() → bool
```

Check if artifact is not saved.

**Returns:**
Boolean. `False` if artifact is saved. `True` if artifact is not saved.

***

### <kbd>method</kbd> `Artifact.json_encode`

```python  theme={null}
json_encode() → dict[str, Any]
```

Returns the artifact encoded to the JSON format.

**Returns:**
A `dict` with `string` keys representing attributes of the artifact.

***

### <kbd>method</kbd> `Artifact.link`

```python  theme={null}
link(target_path: 'str', aliases: 'Iterable[str] | None' = None) → Artifact
```

Link this artifact to a collection.

**Args:**

* `target_path`:  The path of the collection. Path consists of the prefix  "wandb-registry-" along with the registry name and the  collection name `wandb-registry-{REGISTRY_NAME}/{COLLECTION_NAME}`.
* `aliases`:  Add one or more aliases to the linked artifact. The  "latest" alias is automatically applied to the most recent artifact  you link.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

**Returns:**
The linked artifact.

***

### <kbd>method</kbd> `Artifact.logged_by`

```python  theme={null}
logged_by() → Run | None
```

Get the W\&B run that originally logged the artifact.

**Returns:**
The name of the W\&B run that originally logged the artifact.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.new_draft`

```python  theme={null}
new_draft() → Artifact
```

Create a new draft artifact with the same content as this committed artifact.

Modifying an existing artifact creates a new artifact version known as an "incremental artifact". The artifact returned can be extended or modified and logged as a new version.

**Returns:**
An `Artifact` object.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.new_file`

```python  theme={null}
new_file(
    name: 'str',
    mode: 'str' = 'x',
    encoding: 'str | None' = None
) → Iterator[IO]
```

Open a new temporary file and add it to the artifact.

**Args:**

* `name`:  The name of the new file to add to the artifact.
* `mode`:  The file access mode to use to open the new file.
* `encoding`:  The encoding used to open the new file.

**Returns:**
A new file object that can be written to. Upon closing, the file is automatically added to the artifact.

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current artifact version because it is finalized. Log a new artifact version instead.

***

### <kbd>method</kbd> `Artifact.remove`

```python  theme={null}
remove(item: 'StrPath | ArtifactManifestEntry') → None
```

Remove an item from the artifact.

**Args:**

* `item`:  The item to remove. Can be a specific manifest entry  or the name of an artifact-relative path. If the item  matches a directory all items in that directory will be removed.

**Raises:**

* `ArtifactFinalizedError`:  You cannot make changes to the current  artifact version because it is finalized. Log a new artifact  version instead.
* `FileNotFoundError`:  If the item isn't found in the artifact.

***

### <kbd>method</kbd> `Artifact.save`

```python  theme={null}
save(
    project: 'str | None' = None,
    settings: 'wandb.Settings | None' = None
) → None
```

Persist any changes made to the artifact.

If currently in a run, that run will log this artifact. If not currently in a run, a run of type "auto" is created to track this artifact.

**Args:**

* `project`:  A project to use for the artifact in the case that a run is not  already in context.
* `settings`:  A settings object to use when initializing an automatic run. Most  commonly used in testing harness.

***

### <kbd>method</kbd> `Artifact.unlink`

```python  theme={null}
unlink() → None
```

Unlink this artifact if it is a linked member of an artifact collection.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.
* `ValueError`:  If the artifact is not linked to any collection.

***

### <kbd>method</kbd> `Artifact.used_by`

```python  theme={null}
used_by() → list[Run]
```

Get a list of the runs that have used this artifact and its linked artifacts.

**Returns:**
A list of `Run` objects.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.

***

### <kbd>method</kbd> `Artifact.verify`

```python  theme={null}
verify(root: 'str | None' = None) → None
```

Verify that the contents of an artifact match the manifest.

All files in the directory are checksummed and the checksums are then cross-referenced against the artifact's manifest. References are not verified.

**Args:**

* `root`:  The directory to verify. If None artifact will be downloaded to  './artifacts/self.name/'.

**Raises:**

* `ArtifactNotLoggedError`:  If the artifact is not logged.
* `ValueError`:  If the verification fails.

***

### <kbd>method</kbd> `Artifact.wait`

```python  theme={null}
wait(timeout: 'int | None' = None) → Artifact
```

If needed, wait for this artifact to finish logging.

**Args:**

* `timeout`:  The time, in seconds, to wait.

**Returns:**
An `Artifact` object.
