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
: A path to the contents of this artifact, can be in the following forms/local/directory
/local/directory/file.txt
s3://bucket/path
name
: An artifact name. Defaults to the basename of the path prepended with the current run id if not specified. Valid names can be in the following forms:- name:version
- name:alias
- digest
type
: The type of artifact to log. Common examples includedataset
andmodel
aliases
: Aliases to apply to this artifact, defaults to["latest"]
tags
: Tags to apply to this artifact, if any.
Returns:
An Artifact
object.
Feedback
Was this page helpful?
Glad to hear it! If you have more to say, please let us know.
Sorry to hear that. Please tell us how we can improve.