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

name

Artifact name in project/artifact_name format. Defaults to the basename of the path.
FlagDefaultType
-n, --nameNoneSTRING

description

A description of this artifact.
FlagDefaultType
-d, --descriptionNoneSTRING

type

The type of the artifact. Defaults to ‘dataset’.
FlagDefaultType
-t, --typedatasetSTRING

alias

An alias to apply to this artifact. Can be specified multiple times. Defaults to ‘latest’.
FlagDefaultType
-a, --alias[‘latest’]STRING

run_id

Upload to an existing run with this ID.
FlagDefaultType
--idNoneSTRING

resume

Resume the last run from your current directory.
FlagDefaultType
--resumeNoneBOOL

skip_cache

Skip caching while uploading artifact files.
FlagDefaultType
--skip_cacheFalseBOOL

policy

Set the storage policy for artifact files. Either ‘mutable’ (default) or ‘immutable’.
FlagDefaultType
--policymutableChoice([‘mutable’, ‘immutable’])

help

Show this message and exit.
FlagDefaultType
--helpFalseBOOL

CLI Help

Usage: artifact put [OPTIONS] PATH

  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.

  ```bash wandb artifact put --type dataset ./data/training ```

  Upload "model.pt" to the "foobar" project and assign "trained-model" as the
  artifact name.

  ```bash 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.

  ```bash 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.

  ```bash 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 ```

Options:
-n, --name TEXT               Artifact name in project/artifact_name format.
                              Defaults to the basename of the path.
-d, --description TEXT        A description of this artifact.
-t, --type TEXT               The type of the artifact. Defaults to
                              'dataset'.
-a, --alias TEXT              An alias to apply to this artifact. Can be
                              specified multiple times. Defaults to
                              'latest'.
--id TEXT                     Upload to an existing run with this ID.
--resume                      Resume the last run from your current
                              directory.
--skip_cache                  Skip caching while uploading artifact files.
--policy [mutable|immutable]  Set the storage policy for artifact files.
                              Either 'mutable' (default) or 'immutable'.
--help                        Show this message and exit.