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()

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

LoggedArtifact.download

download(path=None, overwrite_strategy=False, sync_mode=True)

Download the current Artifact Version assets to a given directory (or the local directory by default). This downloads only non-remote assets. You can access remote assets 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)

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

LoggedArtifact.get_source_experiment

get_source_experiment(api_key=None, cache=True)

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()

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)

Update the logged artifact tags

LoggedArtifact.update_artifact_tags

update_artifact_tags(new_artifact_tags)

Update the logged artifact tags

LoggedArtifact.update_version_tags

update_version_tags(new_version_tags)

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.

Nov. 27, 2022