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. For example, to upload all files in a local directory ./data/training as a dataset artifact in W&B:
$ wandb artifact put --type dataset ./data/training
To 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
To 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
To 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
To 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 PATH [OPTIONS]

Arguments

ArgumentDescriptionRequired
PATHNo description availableYes

Options

OptionDescription
--name, -nArtifact name in project/artifact_name format. Defaults to the basename of the path.
--description, -dA description of this artifact.
--type, -tThe type of the artifact. Defaults to ‘dataset’. (default: dataset)
--alias, -aAn alias to apply to this artifact. Can be specified multiple times. Defaults to ‘latest’. (default: [‘latest’])
--idUpload to an existing run with this ID.
--resumeResume the last run from your current directory.
--skip_cacheSkip caching while uploading artifact files. (default: False)
--policySet the storage policy for artifact files. Either ‘mutable’ (default) or ‘immutable’. (default: mutable)