log_artifact
less than a minute
function wandb.log_artifact
wandb.log_artifact(
artifact_or_path: 'Artifact | StrPath',
name: 'str | None' = None,
type: 'str | None' = None,
aliases: 'list[str] | None' = None,
tags: 'list[str] | None' = None
) → Artifact
Declare an artifact as an output of a run.
Args:
artifact_or_path
: (str or Artifact) A path to the contents of this artifact, can be in the following forms: -/local/directory
-/local/directory/file.txt
-s3://bucket/path
You can also pass an Artifact object created by callingwandb.Artifact
.name
: (str, optional) An artifact name. Valid names can be in the following forms: - name:version - name:alias - digest This will default to the basename of the path prepended with the current run id if not specified.type
: (str) The type of artifact to log, examples includedataset
,model
aliases
: (list, optional) Aliases to apply to this artifact, defaults to["latest"]
tags
: (list, optional) Tags to apply to this artifact, if any.
Returns:
An Artifact
object.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.