Skip to content

Commit

Permalink
correcting metric that had train loss instead of val metric
Browse files Browse the repository at this point in the history
  • Loading branch information
brandon-edwards committed Oct 8, 2024
1 parent aaf61fa commit 766c177
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/fl_post/fl/project/src/runner_nnunetv1.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,12 @@ def compare_tensor_dicts(td_1, td_2, tag="", epsilon=0.1, verbose=True):
# double check
compare_tensor_dicts(td_1=input_tensor_dict,td_2=checkpoint_dict['state_dict'], tag="checkpoint VS fromOpenFL")

(all_tr_losses, _, _, _) = checkpoint_dict['plot_stuff']
all_tr_losses, \
all_val_losses, \
all_val_losses_tr_mode, \
all_val_eval_metrics = checkpoint_dict['plot_stuff']
# these metrics are appended to the checkpoint each call to train, so it is critical that we are grabbing this right after
metrics = {'train_loss': all_tr_losses[-1]}
metrics = {'val_eval': all_val_eval_metrics[-1]}

######################################################################################################
# TODO: Provide val_completed to be incorporated into the collab weight computation
Expand Down

0 comments on commit 766c177

Please sign in to comment.