X Tutup
Skip to content

Latest commit

 

History

History
840 lines (565 loc) · 24 KB

File metadata and controls

840 lines (565 loc) · 24 KB
title
Artifacts

wandb.sdk.wandb_artifacts

[view_source]

ArtifactsCache Objects

class ArtifactsCache(object)

[view_source]

__init__

 | __init__(cache_dir)

[view_source]

check_md5_obj_path

 | check_md5_obj_path(b64_md5, size)

[view_source]

check_etag_obj_path

 | check_etag_obj_path(etag, size)

[view_source]

get_artifacts_cache

get_artifacts_cache()

[view_source]

Artifact Objects

class Artifact(object)

[view_source]

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

__init__

 | __init__(name, type, description=None, metadata=None)

[view_source]

id

 | @property
 | id()

[view_source]

entity

 | @property
 | entity()

[view_source]

project

 | @property
 | project()

[view_source]

manifest

 | @property
 | manifest()

[view_source]

digest

 | @property
 | digest()

[view_source]

new_file

 | new_file(name, mode="w")

[view_source]

add_file

 | add_file(local_path, name=None)

[view_source]

add_dir

 | add_dir(local_path, name=None)

[view_source]

add_reference

 | add_reference(uri, name=None, checksum=True, max_objects=None)

[view_source]

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.

get_path

 | get_path(name)

[view_source]

download

 | download()

[view_source]

finalize

 | finalize()

[view_source]

ArtifactManifestV1 Objects

class ArtifactManifestV1(ArtifactManifest)

[view_source]

version

 | @classmethod
 | version(cls)

[view_source]

from_manifest_json

 | @classmethod
 | from_manifest_json(cls, artifact, manifest_json)

[view_source]

__init__

 | __init__(artifact, storage_policy, entries=None)

[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.

digest

 | digest()

[view_source]

ArtifactManifestEntry Objects

class ArtifactManifestEntry(object)

[view_source]

__init__

 | __init__(path, ref, digest, birth_artifact_id=None, size=None, extra=None, local_path=None)

[view_source]

__repr__

 | __repr__()

[view_source]

WandbStoragePolicy Objects

class WandbStoragePolicy(StoragePolicy)

[view_source]

name

 | @classmethod
 | name(cls)

[view_source]

from_config

 | @classmethod
 | from_config(cls, config)

[view_source]

__init__

 | __init__(config=None)

[view_source]

config

 | config()

[view_source]

load_file

 | load_file(artifact, name, manifest_entry)

[view_source]

store_reference

 | store_reference(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

load_reference

 | load_reference(artifact, name, manifest_entry, local=False)

[view_source]

store_file

 | store_file(artifact_id, entry, preparer, progress_callback=None)

[view_source]

__S3BucketPolicy Objects

class __S3BucketPolicy(StoragePolicy)

[view_source]

name

 | @classmethod
 | name(cls)

[view_source]

from_config

 | @classmethod
 | from_config(cls, config)

[view_source]

__init__

 | __init__(bucket)

[view_source]

config

 | config()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

MultiHandler Objects

class MultiHandler(StorageHandler)

[view_source]

__init__

 | __init__(handlers=None, default_handler=None)

[view_source]

scheme

 | @property
 | scheme()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

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.

scheme

 | @property
 | scheme()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=False, max_objects=None)

[view_source]

DEFAULT_MAX_OBJECTS

[view_source]

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.

scheme

 | @property
 | scheme()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

S3Handler Objects

class S3Handler(StorageHandler)

[view_source]

__init__

 | __init__(scheme=None)

[view_source]

scheme

 | @property
 | scheme()

[view_source]

init_boto

 | init_boto()

[view_source]

versioning_enabled

 | versioning_enabled(bucket)

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

GCSHandler Objects

class GCSHandler(StorageHandler)

[view_source]

__init__

 | __init__(scheme=None)

[view_source]

versioning_enabled

 | versioning_enabled(bucket)

[view_source]

scheme

 | @property
 | scheme()

[view_source]

init_gcs

 | init_gcs()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

HTTPHandler Objects

class HTTPHandler(StorageHandler)

[view_source]

__init__

 | __init__(session, scheme=None)

[view_source]

scheme

 | @property
 | scheme()

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

WBArtifactHandler Objects

class WBArtifactHandler(StorageHandler)

[view_source]

Handles loading and storing Artifact reference-type files

__init__

 | __init__(scheme=None)

[view_source]

scheme

 | @property
 | scheme()

[view_source]

parse_path

 | @staticmethod
 | parse_path(path)

[view_source]

load_path

 | load_path(artifact, manifest_entry, local=False)

[view_source]

store_path

 | store_path(artifact, path, name=None, checksum=True, max_objects=None)

[view_source]

X Tutup