summary
dictionary. A Run’s summary dictionary can handle numpy arrays, PyTorch tensors or TensorFlow tensors. When a value is one of these types we persist the entire tensor in a binary file and store high level metrics in the summary object, such as min, mean, variance, percentiles, and more.
The last value logged with wandb.Run.log()
is automatically set as the summary dictionary in a W&B Run. If a summary metric dictionary is modified, the previous value is lost.
The following code snippet demonstrates how to provide a custom summary metric to W&B:
Customize summary metrics
Custom summary metrics are useful for capturing model performance at the best step of training in yourrun.summary
. For example, you might want to capture the maximum accuracy or the minimum loss value, instead of the final value.
By default, the summary uses the final value from history. To customize summary metrics, pass the summary
argument in define_metric
. It accepts the following values:
"min"
"max"
"mean"
"best"
"last"
"none"
"best"
only when you also set the optional objective
argument to "minimize"
or "maximize"
.
The following example adds the min and max values of loss and accuracy to the summary:
View summary metrics
View summary values in a run’s Overview page or the project’s runs table.- Run Overview
- Run Table
- W&B Public API
- Navigate to the W&B App.
- Select the Workspace tab.
- From the list of runs, click the name of the run that logged the summary values.
- Select the Overview tab.
- View the summary values in the Summary section.
