Skip to content

LoggedArtifact

LoggedArtifact.str

__str__()

LoggedArtifact.aliases

aliases()

The set of logged artifact aliases.

LoggedArtifact.artifact_tags

artifact_tags()

The set of logged artifact tags.

LoggedArtifact.artifact_type

artifact_type()

The logged artifact type.

LoggedArtifact.assets

assets() -> List[LoggedArtifactAsset]

The list of LoggedArtifactAsset that have been logged with this LoggedArtifact.

LoggedArtifact.download

download(path: Optional[str] = None, overwrite_strategy: Union[bool,
    str] = False, sync_mode: bool = True) -> Artifact

Download the current Artifact Version assets to a given directory (or the local directory by default).

This method downloads assets and remote assets that were synced from a compatible cloud object storage (AWS S3 or GCP GCS). Other non-remote assets are not downloaded and you can access their link with the artifact.assets property.

Args:

  • path: String, Optional. Where to download artifact version assets. If not provided, a temporary path will be used, the root path can be accessed through the Artifact object which is returned by download under the .download_local_path attribute.
  • overwrite_strategy: String or Boolean. One of the three possible strategies to handle conflict when trying to download an artifact version asset to a path with an existing file. See below for allowed values. Default is False or "FAIL".
  • sync_mode: Boolean. Enables download of remote assets from the cloud storage platforms (AWS S3, GCP GS).

Overwrite strategy allowed values:

  • False or "FAIL": If a file already exists and its content is different, raise the comet_ml.exceptions.ArtifactDownloadException. * "PRESERVE": If a file already exists and its content is different, show a WARNING but preserve the existing content. * True or "OVERWRITE": If a file already exists and its content is different, replace it by the asset version asset.

Returns: Artifact object

LoggedArtifact.get_asset

get_asset(asset_logical_path) -> LoggedArtifactAsset

Returns the LoggedArtifactAsset object matching the given asset_logical_path or raises an Exception

LoggedArtifact.get_source_experiment

get_source_experiment(api_key: Optional[str] = None,
    cache: bool = True) -> APIExperiment

Returns an APIExperiment object pointing to the experiment that created this artifact version, assumes that the API key is set else-where.

LoggedArtifact.metadata

metadata()

The logged artifact metadata.

LoggedArtifact.name

name()

The logged artifact name.

LoggedArtifact.remote_assets

remote_assets() -> List[LoggedArtifactAsset]

The list of remote LoggedArtifactAsset that have been logged with this LoggedArtifact.

LoggedArtifact.size

size()

The total size of logged artifact version; it is the sum of all the artifact version assets.

LoggedArtifact.source_experiment_key

source_experiment_key()

The experiment key of the experiment that created this LoggedArtifact.

LoggedArtifact.update_aliases

update_aliases(new_aliases: Sequence[str]) -> None

Update the logged artifact tags

LoggedArtifact.update_artifact_tags

update_artifact_tags(new_artifact_tags: Sequence[str]) -> None

Update the logged artifact tags

LoggedArtifact.update_version_tags

update_version_tags(new_version_tags: Sequence[str]) -> None

Update the logged artifact version tags

LoggedArtifact.version

version()

The logged artifact version, as a SemanticVersion. See https://python-semanticversion.readthedocs.io/en/latest/reference.html#semantic_version.Version for reference

LoggedArtifact.version_tags

version_tags()

The set of logged artifact version tags.

LoggedArtifact.workspace

workspace()

The logged artifact workspace name.

Apr. 17, 2024