napistu_torch.utils.labeling_utils

Utilities for creating pretty labels.

Functions

format_metric_label(text)

Format a label by replacing underscores with spaces, title casing, and ensuring AUC is always uppercase.

napistu_torch.utils.labeling_utils.format_metric_label(text: str) str

Format a label by replacing underscores with spaces, title casing, and ensuring AUC is always uppercase.

Parameters:

text (str) – Input text (e.g., ‘val_auc’, ‘test_auc’)

Returns:

Formatted label (e.g., ‘Val AUC’, ‘Test AUC’)

Return type:

str

Examples

>>> format_label('val_auc')
'Val AUC'
>>> format_label('test_auc')
'Test AUC'
>>> format_label('relation_type')
'Relation Type'