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: str

Artifact id, str

artifact_version_id property

artifact_version_id: str

Artifact version id, str

asset_type property

asset_type: str

Asset type, str

id property

id: str

Asset unique id, str

link: str

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

logical_path property

logical_path: str

Asset relative logical_path, str or None

metadata property

metadata: Dict[str, Any]

Asset metadata, dict

remote property

remote: bool

Is the asset a remote asset or not, boolean

size property

size: int

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

source_experiment_key property

source_experiment_key: str

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

Functions

download

download(
    local_path: str = None, logical_path: str = None, overwrite_strategy=False
) -> ArtifactAsset

Download the asset to a given full path or directory

Returns:

Parameters:

  • local_path (str, default: None ) –

    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 (str, default: None ) –

    the path relative to the root local_path to use. If None and local_path==None then no relative path is used, a 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()

is_asset_downloadable

is_asset_downloadable() -> bool

Determines if an asset is downloadable.

This method checks specific conditions to determine whether the asset can be downloaded. If the asset is not remote, it is deemed downloadable. For remote assets, it additionally checks if the asset is both remote and synced, as well as if the remote URI is available for download.

Returns:

  • bool ( bool ) –

    True if the asset is downloadable, False otherwise.

is_remote_and_synced

is_remote_and_synced() -> bool

Is the asset synced or not?

Nov. 5, 2025