fix: correct swapped val_acc / val_f1 labels in the training log - #14
Open
JOhnsonKC201 wants to merge 1 commit into
Open
JOhnsonKC201 wants to merge 1 commit into
JOhnsonKC201 wants to merge 1 commit into
Conversation
calc_metrics returns (roc, ap, acc, f1), so val_acc holds accuracy and val_f1 holds F1 (see the print on the line above and the W&B log below, both of which pair them correctly). The tab-separated log line formatted 'val_f1' with val_acc and 'val_acc' with val_f1, so every epoch written to <save_prefix>_gnn_train.log reports the two metrics under each other's names. Swap them back so the log matches the print/W&B ordering. No effect on training or model selection, which already use the values directly.
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.
calc_metricsreturns(roc, ap, acc, f1), so intrain,val_accis accuracy andval_f1is F1. Theprintjust above and thewandb.logjust below both pair them correctly, but the tab-separated log line has them transposed:So every epoch written to
<save_prefix>_gnn_train.logreports accuracy underval_f1and F1 underval_acc. Anyone reading that log to compare epochs gets the two metrics mislabeled.This swaps them back so the log agrees with the
printand W&B output. Nothing else changes — training and best-model selection already read the values directly, not the log string.