Skip to content

comet_ml.artifacts.LoggedArtifactAsset ¶

LoggedArtifactAsset(
    remote: bool,
    logical_path: str,
    size: int,
    link: str,
    metadata: Dict[str, Any],
    asset_type: str,
    id: str,
    artifact_version_id: str,
    artifact_id: str,
    source_experiment_key: str,
    verify_tls: bool,
    rest_api_client: RestApiClient = None,
    download_timeout: float = None,
    logged_artifact_repr: str = None,
    logged_artifact_str: str = None,
    experiment_key: str = None,
)

Represent assets logged to an Artifact

Attributes¶

artifact_id property ¶

artifact_id

Artifact id, str

artifact_version_id property ¶

artifact_version_id

Artifact version id, str

asset_type property ¶

asset_type

Asset type, str

id property ¶

id

Asset unique id, str

link

Asset remote link if the asset is remote, str or None

logical_path property ¶

logical_path

Asset relative logical_path, str or None

metadata property ¶

metadata

Asset metadata, dict

remote property ¶

remote

Is the asset a remote asset or not, boolean

size property ¶

size

Asset size if the asset is a non-remote asset, int

source_experiment_key property ¶

source_experiment_key

The experiment key of the experiment that logged this asset, str

Functions¶

download ¶

download(local_path=None, logical_path=None, overwrite_strategy=False)

Download the asset to a given full path or directory

Returns:

  • ArtifactAsset –

    The artifact asset downloaded

Parameters:

  • local_path –

    the root folder to which to download. if None, will download to a tmp path if str, will be either a root local path or a full local path

  • logical_path –

    the path relative to the root local_path to use. If None and local_path==None then no relative path is used, file would just be a tmp path on local disk. If None and local_path!=None then the local_path will be treated as a root path, and the asset's logical_path will be appended to the root path to form a full local path. If "" or False then local_path will be used as a full path (local_path can also be None)

  • overwrite_strategy –

    can be False, "FAIL", "PRESERVE" or "OVERWRITE" and follows the same semantics for overwrite strategy as artifact.download()

Dec. 17, 2024