LoggedArtifact

LoggedArtifact

LoggedArtifact.aliases

The set of logged artifact aliases.

LoggedArtifact.artifact_tags

The set of logged artifact tags.

LoggedArtifact.artifact_type

The logged artifact type.

LoggedArtifact.assets

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

LoggedArtifact.metadata

The logged artifact metadata.

LoggedArtifact.name

The logged artifact name.

LoggedArtifact.remote_assets

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

LoggedArtifact.size

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

LoggedArtifact.source_experiment_key

The experiment key of the experiment that created this LoggedArtifact.

LoggedArtifact.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

The set of logged artifact version tags.

LoggedArtifact.workspace

The logged artifact workspace name.


LoggedArtifact.download

download(self, path=None, overwrite_strategy=False)

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 temporay 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".

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(self, asset_logical_path)

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


LoggedArtifact.get_source_experiment

get_source_experiment(self, 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.