Skip to main content
GitHub source

Usage

Usage: put [OPTIONS] PATH

Description

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

Arguments

NameDefaultType
pathSTRNoneTrue

Options

FlagTypeDescription
--name, -nSTRArtifact name in project/artifact_name format. Defaults to the basename of the path. Default: None
--description, -dSTRA description of this artifact. Default: None
--type, -tSTRThe type of the artifact. Defaults to ‘dataset’. Default: dataset
--alias, -aSTRAn alias to apply to this artifact. Can be specified multiple times. Defaults to ‘latest’. Default: [‘latest’]
--idSTRUpload to an existing run with this ID. Default: None
--resumeBOOL FlagResume the last run from your current directory. Default: None
--skip_cacheBOOL FlagSkip caching while uploading artifact files. Default: False
--policyChoiceSet the storage policy for artifact files. Either ‘mutable’ (default) or ‘immutable’. Default: mutable