Fix evaluation metrics bugs: micro_auroc NaN, softmax dim, hardcoded …#195
Open
Ganglet wants to merge 1 commit intoML4SCI:mainfrom
Open
Fix evaluation metrics bugs: micro_auroc NaN, softmax dim, hardcoded …#195Ganglet wants to merge 1 commit intoML4SCI:mainfrom
Ganglet wants to merge 1 commit intoML4SCI:mainfrom
Conversation
…W&B entity Fixes ML4SCI#192: - Fix micro_auroc never appended in eval loop - Add dim=-1 to softmax call on eval.py:172 - Replace hardcoded entity with --entity CLI arg and WANDB_ENTITY env var
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #192
What this PR does
Fixes 3 evaluation pipeline bugs in Classification Transformers.
Changes
1. Fixed micro_auroc always NaN (eval.py:61)
micro_auroc list was declared but never appended to. Added
micro_auroc.append(auroc_fn(..., average="micro")).
2. Fixed softmax missing dim= (eval.py:173)
Added dim=-1 to softmax call. Line 158 already did it correctly,
line 173 didn't.
3. Replaced hardcoded W&B entity (train.py, eval.py)
Replaced hardcoded entity="_archil" with --entity CLI arg
defaulting to WANDB_ENTITY env var. Prevents auth errors for
other contributors.