Skip to main content
GitHub source Upload existing local W&B run data to the cloud. Sync offline or incomplete runs from the local wandb directory to the W&B server. If PATH is provided, sync runs at that path. If no path is given, search for a ./wandb directory, then a wandb/ subdirectory. Run without arguments to print a summary of synced and unsynced runs without uploading anything. When syncing a specific path, include TensorBoard event files by default. When using --sync-all, disable TensorBoard by default (use --sync-tensorboard to enable it). PATH is a .wandb file or a run directory that contains a .wandb file. A typical path looks like ./wandb/run-YYYYMMDD_HHMMSS-RUN_ID/run-RUN_ID.wandb, where run-YYYYMMDD_HHMMSS-RUN_ID is the run directory and run-RUN_ID.wandb is the .wandb file. YYYYMMDD_HHMMSS is the timestamp of when the run was created and RUN_ID is the unique ID of the run. Examples: Show a summary of local runs and their sync status
wandb sync
Sync a specific run by its directory
wandb sync ./wandb/run-20170617_000000-abcd1234
Sync a specific run by its .wandb filepath
wandb sync ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb
Sync all unsynced runs in the local wandb directory
wandb sync --sync-all
Sync a run to a specific project and entity
wandb sync --project project --entity entity ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb
Delete local data for runs that have already been synced
wandb sync --clean
Delete synced runs older than 48 hours without a confirmation prompt
wandb sync --clean --clean-old-hours 48 --clean-force

Usage

wandb sync [OPTIONS] [PATH]...

Arguments

path

NameDefaultType
pathNoneFile Path

Options

view

View runs.
FlagDefaultType
--viewFalseBOOL

verbose

Enable verbose output.
FlagDefaultType
--verboseFalseBOOL

run_id

Upload to an existing run ID.
FlagDefaultType
--idNoneSTRING

project

Set the project to upload the run to.
FlagDefaultType
-p, --projectNoneSTRING

entity

Set the entity to scope the project to.
FlagDefaultType
-e, --entityNoneSTRING

job_type

Set the job type to group related runs.
FlagDefaultType
--job_typeNoneSTRING

sync_tensorboard

Sync TensorBoard tfevent files. On by default for specific paths, off for —sync-all.
FlagDefaultType
--sync-tensorboardNoneBOOL

include_globs

Include only runs matching these glob patterns (comma-separated).
FlagDefaultType
--include-globsNoneSTRING

exclude_globs

Exclude runs matching these glob patterns (comma-separated).
FlagDefaultType
--exclude-globsNoneSTRING

include_online

Include runs created in online mode.
FlagDefaultType
--include-onlineNoneBOOL

include_offline

Include runs created in offline mode.
FlagDefaultType
--include-offlineNoneBOOL

include_synced

Include runs that are already synced.
FlagDefaultType
--include-syncedNoneBOOL

mark_synced

Mark runs as synced after upload.
FlagDefaultType
--mark-syncedTrueBOOL

sync_all

Sync all unsynced runs in the local wandb directory.
FlagDefaultType
--sync-allFalseBOOL

clean

Delete local data for runs that are already synced.
FlagDefaultType
--cleanFalseBOOL

clean_old_hours

Delete only synced runs older than this many hours (use with —clean).
FlagDefaultType
--clean-old-hours24INT

clean_force

Skip the confirmation prompt if —clean is specified.
FlagDefaultType
--clean-forceFalseBOOL

ignore

No description available.
FlagDefaultType
--ignoreNoneSTRING

show

Set the number of runs to show in the summary.
FlagDefaultType
--show5INT

append

Append data to an existing run instead of creating a new run.
FlagDefaultType
--appendFalseBOOL

skip_console

Skip uploading console logs.
FlagDefaultType
--skip-consoleFalseBOOL

replace_tags

Rename tags during sync. Use ‘old=new’ pairs separated by commas.
FlagDefaultType
--replace-tagsNoneSTRING

help

Show this message and exit.
FlagDefaultType
--helpFalseBOOL

CLI Help

Usage: sync [OPTIONS] [PATH]...

  Upload existing local W&B run data to the cloud.

  Sync offline or incomplete runs from the local `wandb` directory to the W&B
  server. If `PATH` is provided, sync runs at that path. If no path is given,
  search for a `./wandb` directory, then a `wandb/` subdirectory.

  Run without arguments to print a summary of synced and unsynced runs without
  uploading anything.

  When syncing a specific path, include TensorBoard event files by default.
  When using `--sync-all`, disable TensorBoard by default (use `--sync-
  tensorboard` to enable it).

  `PATH` is a `.wandb` file or a run directory that contains a `.wandb` file.
  A typical path looks like `./wandb/run-YYYYMMDD_HHMMSS-RUN_ID/run-
  RUN_ID.wandb`, where `run-YYYYMMDD_HHMMSS-RUN_ID` is the run directory and
  `run-RUN_ID.wandb` is the `.wandb` file. `YYYYMMDD_HHMMSS` is the timestamp
  of when the run was created and `RUN_ID` is the unique ID of the run.

  Examples:

  Show a summary of local runs and their sync status

  ```bash wandb sync ```

  Sync a specific run by its directory

  ```bash wandb sync ./wandb/run-20170617_000000-abcd1234 ```

  Sync a specific run by its `.wandb` filepath

  ```bash wandb sync ./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb
Sync all unsynced runs in the local wandb directory bash wandb sync --sync-all Sync a run to a specific project and entity
wandb sync --project project --entity entity
./wandb/run-20170617_000000-abcd1234/run-abcd1234.wandb ```

Delete local data for runs that have already been synced

```bash wandb sync --clean ```

Delete synced runs older than 48 hours without a confirmation prompt

```bash wandb sync --clean --clean-old-hours 48 --clean-force ```

Options:
--id TEXT                       Upload to an existing run ID.
-p, --project TEXT              Set the project to upload the run to.
-e, --entity TEXT               Set the entity to scope the project to.
--job_type TEXT                 Set the job type to group related runs.
--sync-tensorboard / --no-sync-tensorboard
                                Sync TensorBoard tfevent files. On by
                                default for specific paths, off for --sync-
                                all.
--include-globs TEXT            Include only runs matching these glob
                                patterns (comma-separated).
--exclude-globs TEXT            Exclude runs matching these glob patterns
                                (comma-separated).
--include-online / --no-include-online
                                Include runs created in online mode.
--include-offline / --no-include-offline
                                Include runs created in offline mode.
--include-synced / --no-include-synced
                                Include runs that are already synced.
--mark-synced / --no-mark-synced
                                Mark runs as synced after upload.
--sync-all                      Sync all unsynced runs in the local wandb
                                directory.
--clean                         Delete local data for runs that are already
                                synced.
--clean-old-hours INTEGER       Delete only synced runs older than this many
                                hours (use with --clean).
--clean-force                   Skip the confirmation prompt if --clean is
                                specified.
--show INTEGER                  Set the number of runs to show in the
                                summary.
--append                        Append data to an existing run instead of
                                creating a new run.
--skip-console                  Skip uploading console logs.
--replace-tags TEXT             Rename tags during sync. Use 'old=new' pairs
                                separated by commas.
--help                          Show this message and exit.