> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wandb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# wandb artifact put

export const GitHubLink = ({url}) => <a href={url} target="_blank" rel="noopener noreferrer" className="github-source-link">
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub source
  </a>;

<GitHubLink url="https://github.com/wandb/wandb/blob/v0.26.1/wandb/cli/cli.py#L2812" />

## Usage

```bash theme={null}
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.

For example, to upload all files in a local directory ./data/training as a
dataset artifact in W\&B:

```bash theme={null}
wandb artifact put --type dataset ./data/training
```

To upload model.pt to the "foobar" project and assign "trained-model" as
the artifact name:

```bash theme={null}
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:

```bash theme={null}
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:

```bash theme={null}
wandb artifact put --type dataset s3://my-bucket/datasets/training
```

To attach a human-readable description to a dataset artifact for documentation:

```bash theme={null}
wandb artifact put --type dataset --description "Training data, Jan 2025" ./data/training
```

## Arguments

| Name   | Default | Type |
| ------ | ------- | ---- |
| `path` | STR     | True |

## Options

| Flag                | Type      | Description                                                                                                         |
| ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------- |
| `--name, -n`        | STR       | Artifact name in project/artifact\_name format. Defaults to the basename of the path. **Default**: None             |
| `--description, -d` | STR       | A description of this artifact. **Default**: None                                                                   |
| `--type, -t`        | STR       | The type of the artifact. Defaults to 'dataset'. **Default**: dataset                                               |
| `--alias, -a`       | STR       | An alias to apply to this artifact. Can be specified multiple times. Defaults to 'latest'. **Default**: \['latest'] |
| `--id`              | STR       | Upload to an existing run with this ID. **Default**: None                                                           |
| `--resume`          | BOOL Flag | Resume the last run from your current directory. **Default**: None                                                  |
| `--skip_cache`      | BOOL Flag | Skip caching while uploading artifact files. **Default**: False                                                     |
| `--policy`          | Choice    | Set the storage policy for artifact files. Either 'mutable' (default) or 'immutable'. **Default**: mutable          |
