Skip to content

Conversation

@scap3yvt
Copy link
Collaborator

@scap3yvt scap3yvt commented Mar 27, 2024

Fixes #N.A.

Proposed Changes

  • metrics were getting printed thrice (once before and once after formatting, and once after the training/validation loop), which is now fixed

Checklist

  • CONTRIBUTING guide has been followed.
  • PR is based on the current GaNDLF master .
  • Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change.
  • Function/class source code documentation added/updated (ensure typing is used to provide type hints, including and not limited to using Optional if a variable has a pre-defined value).
  • Code has been blacked for style consistency and linting.
  • If applicable, version information has been updated in GANDLF/version.py.
  • If adding a git submodule, add to list of exceptions for black styling in pyproject.toml file.
  • Usage documentation has been updated, if appropriate.
  • Tests added or modified to cover the changes; if coverage is reduced, please give explanation.
  • If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3].

@github-actions
Copy link
Contributor

github-actions bot commented Mar 27, 2024

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@scap3yvt scap3yvt changed the title removed accidental double print Removing double print of metrics Mar 27, 2024
@scap3yvt
Copy link
Collaborator Author

Previous output:

[SNIP!]
Looping over training data: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19/19 [05:18<00:00, 16.74s/it]
     Epoch Final   train loss :  1.3392270615226345
     Epoch Final   train accuracy :  0.4290512204170227
     Epoch Final   train precision :  0.184084951877594
     Epoch Final   train recall :  0.4290512204170227
     Epoch Final   train f1 :  0.29341151197686005
     Epoch Final   train specificity :  0.5709487795829773
     Epoch Final   train aucroc :  0.5
     Epoch Final   train classification_accuracy :  0.36922233512527064
{'accuracy': 0.4290512204170227, 'precision': 0.184084951877594, 'recall': 0.4290512204170227, 'f1': 0.29341151197686005, 'specificity': 0.5709487795829773, 'aucroc': 0.5, 'classification_accuracy': 0.36922233512527064}
{'accuracy': 0.4290512204170227, 'precision': 0.184084951877594, 'recall': 0.4290512204170227, 'f1': 0.29341151197686005, 'specificity': 0.5709487795829773, 'aucroc': 0.5, 'classification_accuracy': 0.36922233512527064}
[SNIP!]

After this PR:

[SNIP!]
Looping over training data: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 19/19 [05:18<00:00, 16.74s/it]
     Epoch Final   train loss :  1.3392270615226345
     Epoch Final   train accuracy :  0.4290512204170227
     Epoch Final   train precision :  0.184084951877594
     Epoch Final   train recall :  0.4290512204170227
     Epoch Final   train f1 :  0.29341151197686005
     Epoch Final   train specificity :  0.5709487795829773
     Epoch Final   train aucroc :  0.5
     Epoch Final   train classification_accuracy :  0.36922233512527064
[SNIP!]

@scap3yvt scap3yvt requested a review from sarthakpati March 27, 2024 14:46
Copy link
Collaborator

@sarthakpati sarthakpati left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sarthakpati sarthakpati enabled auto-merge March 27, 2024 14:51
@codecov
Copy link

codecov bot commented Mar 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.09%. Comparing base (890f277) to head (baad956).

❗ Current head baad956 differs from pull request most recent head 657f03e. Consider uploading reports for the commit 657f03e to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #838   +/-   ##
=======================================
  Coverage   95.09%   95.09%           
=======================================
  Files         122      122           
  Lines        8344     8344           
=======================================
  Hits         7935     7935           
  Misses        409      409           
Flag Coverage Δ
unittests 95.09% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sarthakpati sarthakpati merged commit d9e4545 into master Mar 27, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2024
@sarthakpati sarthakpati deleted the scap3yvt-patch-1 branch March 27, 2024 19:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants