Turn on key-based colors
- Navigate to your W&B project.
- Select the Workspace tab from the project sidebar.
- Click on the Settings icon in the top right corner.
- From the drawer, select Runs.
- In the Run colors section, select Key-based colors.
- Configure the following options:
- From the Key dropdown, select the metric you want to use for assigning colors to runs.
- From the Y value dropdown, select the y value you want to use for assigning colors to runs.
- Set the number of buckets to a value from 2 to 8.
When you use key-based colors, the option to customize run colors is not available.
Example: Key-based coloring with loss metric
In this example plot, runs are colored with a gradient where darker colors represent higher loss values and lighter colors represent lower loss values. The Y value is set tolatest
to use the most recent loss value for each run.
Set a metric
The metric options in your Key dropdown are derived from the key-value pairs you log to W&B and default metrics defined by W&B.Default metrics
Relative Time (Process)
: The relative time of the run, measured in seconds since the start of the run.Relative Time (Wall)
: The relative time of the run, measured in seconds since the start of the run, adjusted for wall clock time.Wall Time
: The wall clock time of the run, measured in seconds since the epoch.Step
: The step number of the run, which is typically used to track the progress of training or evaluation.
Custom metrics
Color runs and create meaningful plot legends based on custom metrics logged by your training or evaluation scripts. Custom metrics are logged as key-value pairs, where the key is the name of the metric and the value is the metric value. For example, the following code snippet logs accuracy ("acc"
key) and loss ("loss"
key) during a training loop:
"acc"
and "loss"
are available options.
Set a configuration key
The configuration options in your Key dropdown are derived from the key-value pairs you pass to theconfig
parameter when you initialize a W&B run. Configuration keys are typically used to log hyperparameters or other settings used in your training or evaluation scripts.
"learning_rate"
, "batch_size"
, and "optimizer"
are available options.
Set a y value
You can choose from the following options:- Latest: Determine color based on Y value at last logged step for each line.
- Max: Color based on highest Y value logged against the metric.
- Min: Color based on lowest Y value logged against the metric.
Customize buckets
Buckets are ranges of values that W&B uses to categorize runs based on the metric or configuration key you select. Buckets are evenly distributed across the range of values for the specified metric or configuration key and each bucket is assigned a unique color. Runs that fall within that bucket’s range are displayed in that color. Consider the following:
- Key is set to
"Accuracy"
(abbreviated as"acc"
). - Y value is set to
"Max"
- Bucket 1: (Min - 0.7629)
- Bucket 2: (0.7629 - 0.7824)
- Bucket 3: (0.7824 - 0.8019)
- Bucket 4: (0.8019 - 0.8214)
- Bucket 5: (0.8214 - 0.8409)
- Bucket 6: (0.8409 - Max)
