google / google/metrax

Add from_logits flag to every Metrax metric

Open
#105 4 comments 0 reactions 1 assignee Claimed by @PavanTummala View on GitHub
good first issue help wanted
Dominant language
Python
Stars
64
Forks
18
Avg merge
4h 46m
Merged PRs (30d)
1

Description

**Current Requirement:**

Currently, Metrax metrics require the user to manually apply the softmax function to their model's output logits first. The user must then pass the resulting probabilities (predictions) and the ground-truth labels into the metric for calculation.

**Proposed Change:**

To improve usability, we will introduce a new boolean flag, from_logits.

When from_logits=False (the default), the behavior will remain the same, expecting pre-computed probabilities.

When from_logits=True, users can pass the raw logits directly to the metric. Metrax will then be responsible for applying the softmax function internally before calculating the metric.

This change simplifies the user's workflow and reduces the chance of errors.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.