An artifact object you can write files into, and pass to log_artifact.
| add_reference(uri, name=None, checksum=True, max_objects=None)
uri to the artifact via a reference, located at
name. You can use Artifact#get_path(
name) to retrieve this object.
uri:str - the URI path of the reference to add. Can be an object returned from
Artifact.get_path to store a reference to another artifact's entry.
name:str - the path to save
| add(obj, name)
obj to the artifact, located at
name. You can use Artifact#get(
name) after downloading the artifact to retrieve this object.
obj wandb.WBValue - The object to save in an artifact
name str - The path to save
If local_path was already added to artifact, return its internal name.
This is the JSON that's stored in wandb_manifest.json
If include_local is True we also include the local paths to files. This is used to represent an artifact that's waiting to be saved on the current system. We don't need to include the local paths in the artifact manifest contents.
Tracks paths as is, with no modification or special processing. Useful when paths being tracked are on file systems mounted at a standardized location.
For example, if the data to track is located on an NFS share mounted on /data, then it is sufficient to just track the paths.
Handles file:// references
Tracks files or directories on a local filesystem. Directories are expanded to create an entry for each file contained within.
Handles loading and storing Artifact reference-type files
| @property| scheme()
overrides parent scheme
The scheme to which this handler applies. :rtype: str
| load_path(artifact, manifest_entry, local=False)
Loads the file within the specified artifact given its corresponding entry. In this case, the referenced artifact is downloaded and a new symlink is created and returned to the caller.
manifest_entry: The index entry to load
:type manifest_entry: ArtifactManifestEntry
A path to the file represented by
index_entry :rtype: os.PathLike
| store_path(artifact, path, name=None, checksum=True, max_objects=None)
Stores the file or directory at the given path within the specified artifact. In this case we recursively resolve the reference until the result is a concrete asset so that we don't have multiple hops. TODO: This resolution could be done in the server for performance improvements.
artifact: The artifact doing the storing
path: The path to store
:type path: str
name: If specified, the logical name that should map to
:type name: str
A list of manifest entries to store within the artifact :rtype: list(ArtifactManifestEntry)