Artifacts

wandb.sdk.wandb_artifacts

[view_source]

Artifact Objects

class Artifact(object)

[view_source]

An artifact object you can write files into, and pass to log_artifact.

add

| add(obj, name)

[view_source]

Adds obj to the artifact, located at name. You can use Artifact#get(name) after downloading the artifact to retrieve this object.

Arguments:

  • obj wandb.Media - The object to save in an artifact

  • name str - The path to save

get_added_local_path_name

| get_added_local_path_name(local_path)

[view_source]

If local_path was already added to artifact, return its internal name.

ArtifactManifestV1 Objects

class ArtifactManifestV1(ArtifactManifest)

[view_source]

to_manifest_json

| to_manifest_json()

[view_source]

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.

TrackingHandler Objects

class TrackingHandler(StorageHandler)

[view_source]

__init__

| __init__(scheme=None)

[view_source]

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.

LocalFileHandler Objects

class LocalFileHandler(StorageHandler)

[view_source]

Handles file:// references

__init__

| __init__(scheme=None)

[view_source]

Tracks files or directories on a local filesystem. Directories are expanded to create an entry for each file contained within.

WBArtifactHandler Objects

class WBArtifactHandler(StorageHandler)

[view_source]

Handles loading and storing Artifact reference-type files