Command Line Interface

Command line interface for the two top-level commands the package provides.


wandb-utils [OPTIONS] COMMAND1 [ARGS]... [COMMAND2 [ARGS]...]...



Show the version and exit.

-e, --entity <entity>

Wandb entity (username or team)

-p, --project <project>

Wandb project

-s, --sweep <sweep>

Wandb sweep (default:None)


wandb-utils all-data [OPTIONS]


--filters <filters>

Filter used while querying wandb for runs. It uses MongoDB query syntax. See and for how the query is used. See to learn about all the query operators in MongoDB query.


wandb-utils best-model [OPTIONS]


-m, --metric <metric>

Required Name of the metric to sort by. Prepend + or - for maximum or minimum, respectively.

-o, --output-file <output_file>

File to which the run names will be written/appended. If not provided, the name will be printed on the console. (default:None)

-f, --fields <fields>

Fields to keep in the final dataframe.


Skip writing or printing.


Download single run from wandb server.

RUN is the unique run id.

wandb-utils download-run-from-wandb [OPTIONS] RUN


-o, --output_dir <output_dir>

Required Directory in which to save the run data. It will be saved in output_dir/runid

--include_filter <include_filter>

Glob string for files to include (can pass multiple). See for details.

--exclude_filter <exclude_filter>

Glob string for Files to exclude (can pass multiple). See for details.




Required argument


Add new files to an existing run run on wandb or copy files from an existing run to local.

run is the id of an existing. This run should already exist.

If chaining, the run ids can be obtained from the DataFrame of the previoius command. To use chaining, run has to be set to ‘df’ and the DataFrame from the previous command should have a column named ‘run’.

wandb-utils files [OPTIONS] RUN


-f, --files <files>

File globs to include (+) and exclude (-) files split using ‘|’. For example, to include all files with extension .json and important.txt, but ignoring all other .txt files and extra.json, in the ‘serialization_dir’ folder, one can pass –files as ‘+ serialization_dir/.json|serialization_dir/important.txt|- serialization_dir/.txt|- serialization_dir/extra.json’.


  1. There should be exactly one space space between +/- and the glob. If neither + nor - are given,

    we assume it to be +.

  2. There should be no space around the seperator ‘|’.

-F, --files-from-file <files_from_file>

File containing include and/or exclude globs with one glob per line. The format of the globs remains the same as –files option i.e., ‘[+-] glob’.

--base-path <base_path>

By default the full path of the files is preseved on wandb. For instance, if you save ‘serialization_dir/configs/config.json’, it will save config.json under ‘serialization_dir/configs/’ on wandb. If instead, you wish to save config.json in the root directory of the run on wandb, you can provide –base-path=”serialization_dir/configs” and –files=”serialization_dir/configs/config.json”.

--destination <destination>

Wheter to upload to or download from wandb.


wandb | local


What to do when file/folder already exists.

--action <action>

Whether to move the file, delete it or copy. Default is copy.


move | copy | delete



Required argument


Apply a processor using pandas.query, pandas.eval, python eval or python exec.

No more than one of the processors should be provided at a time.

wandb-utils filter-df [OPTIONS]


-f, --fields <fields>

Fields to keep in the final dataframe. If not given, all fields are kept.

-i, --index <index>

Field that is unique and can be used as index.

--query <query>

Query string passed to df.query. See for details

--pd-eval <pd_eval>

String to pass to pd.evalSee for details.

--python-eval <python_eval>

String to passed to python’s eval df = eval(python_eval)

--python-exec <python_exec>

String to pass to python’s exec


Read the data of runs from a input-file created using any wandb-utils command.

input-file is the path to a .csv file.

wandb-utils from-file [OPTIONS] INPUT_FILE


-f, --fields <fields>

Fields to keep in the final dataframe. If not given, all fields are kept.

-i, --index <index>

Field that is unique and can be used as index.

-d, --delimiter <delimiter>

Column delimiter (default: TAB)



Required argument


Print the contents of a df and optionally write to a file.

wandb-utils print [OPTIONS]


-o, --output_file <output_file>

If given the output is written to the file.


wandb-utils run-dir [OPTIONS] RUN


--wandb_dir <wandb_dir>



Required argument