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¶
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:
ArtifactAsset–The artifact asset downloaded
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.