use_artifact
less than a minute
function wandb.use_artifact
wandb.use_artifact(
artifact_or_name: 'str | Artifact',
type: 'str | None' = None,
aliases: 'list[str] | None' = None,
use_as: 'str | None' = None
) → Artifact
Declare an artifact as an input to a run.
Call download or file on the returned object to get the contents locally.
Args:
artifact_or_name: An artifact name. May be prefixed with project/ or entity/project/. You can also pass an Artifact object created by callingwandb.Artifact. If no entity is specified in the name, the Run or API setting’s entity is used. Valid names can be in the following forms:- name:version
- name:alias
type: The type of artifact to use.aliases: Aliases to apply to this artifactuse_as: Optional string indicating what purpose the artifact was used with. Will be shown in UI.
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.