Skip to main content
Upload an artifact to W&B. Upload a file, directory, or URL reference as a versioned artifact. The PATH can be a local file, a local directory, or a URL (containing ://) to log as a reference artifact. If --name is not specified, the artifact name defaults to the basename of the path. If the project cannot be parsed from the name, you are prompted to enter one.

Examples

Upload all files in a local directory ./data/training as a dataset artifact in W&B.
wandb artifact put --type dataset ./data/training
Upload “model.pt” to the “foobar” project and assign “trained-model” as the artifact name.
wandb artifact put --name foobar/trained-model --type model ./model.pt
Tag the artifact with both “latest” and “v2.0” so it can be referenced by either alias.
wandb artifact put --alias latest --alias v2.0 --type model ./model.pt
Record an Amazon S3 path as a reference without downloading or re-uploading the data.
wandb artifact put --type dataset s3://my-bucket/datasets/training
Attach a human-readable description to a dataset artifact for documentation.
wandb artifact put --type dataset --description "Training data, Jan 2025" ./data/training

Usage

wandb artifact put [OPTIONS] PATH

Options

FlagTypeDescription
-n, --nameSTRINGArtifact name in project/artifact_name format. Defaults to the basename of the path. Default: None
-d, --descriptionSTRINGA description of this artifact. Default: None
-t, --typeSTRINGThe type of the artifact. Defaults to ‘dataset’. Default: dataset
-a, --aliasSTRINGAn alias to apply to this artifact. Can be specified multiple times. Defaults to ‘latest’. Default: [‘latest’]
--idSTRINGUpload to an existing run with this ID. Default: None
--resumeBOOLResume the last run from your current directory. Default: None
--skip_cacheBOOLSkip caching while uploading artifact files. Default: False
--policyChoice([‘mutable’, ‘immutable’])Set the storage policy for artifact files. Either ‘mutable’ (default) or ‘immutable’. Default: mutable
--helpBOOLShow this message and exit. Default: False