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 a directory as a dataset artifact
wandb artifact put ./project/artifact_name --type dataset
Upload a file with a specific name and type
wandb artifact put --name project/artifact_name --type model ./model.pt
Upload with multiple aliases (latest and v1.0 in this example)
wandb artifact put --alias latest --alias v1.0 ./project/artifact_name
Log a URL as a reference artifact
wandb artifact put --type dataset s3://my-bucket/data

Usage

wandb artifact put [OPTIONS] PATH

Options

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 a directory as a dataset artifact

  ```bash wandb artifact put ./project/artifact_name --type dataset ```

  Upload a file with a specific name and type

  ```bash wandb artifact put --name project/artifact_name --type model
  ./model.pt ```

  Upload with multiple aliases (`latest` and `v1.0` in this example)

  ```bash wandb artifact put --alias latest --alias v1.0
  ./project/artifact_name ```

  Log a URL as a reference artifact

  ```bash wandb artifact put --type dataset s3://my-bucket/data ```

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.