Skip to main content
Metric names in W&B must follow GraphQL naming conventions so that you can sort and filter them in the UI.

Valid metric names

Metric names must follow these rules:
  • Allowed characters: Letters (A-Z, a-z), digits (0-9), and underscores (_).
  • Starting character: Names must start with a letter or underscore.
  • Pattern: Metric names should match /^[_a-zA-Z][_a-zA-Z0-9]*$/.
If metrics don’t follow these rules, you might not be able to sort or filter them in the W&B UI.

Examples

The following examples show metric names that comply with these rules and names that don’t. Valid metric names:
Invalid metric names (avoid these):
Replace invalid characters with valid characters such as underscores:
  • Instead of "test acc", use "test_acc".
  • Instead of "loss-train", use "loss_train".
  • Instead of "acc,val", use "acc_val".
For more information, see Metric naming constraints.
Experiments Metrics