artifact_compare_metric(func)

Denotes a custom metric function.

Source code in wt_ml/output/artifacts/artifact_metrics/__init__.py
38
39
40
41
42
def artifact_compare_metric(func: ArtifactCompareMetricFunc) -> ArtifactCompareMetricFunc:
    """Denotes a custom metric function."""
    global ARTIFACT_COMPARE_METRICS
    ARTIFACT_COMPARE_METRICS[func.__name__] = func
    return func

artifact_metric(func)

Denotes a custom metric function.

Source code in wt_ml/output/artifacts/artifact_metrics/__init__.py
20
21
22
23
24
def artifact_metric(func: ArtifactMetricFunc) -> ArtifactMetricFunc:
    """Denotes a custom metric function."""
    global ARTIFACT_METRICS
    ARTIFACT_METRICS[func.__name__] = func
    return func