Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow the penalty and class weights in the config to be used #677

Merged
merged 18 commits into from
Jun 15, 2023

Conversation

sarthakpati
Copy link
Collaborator

@sarthakpati sarthakpati commented Jun 12, 2023

Fixes #676

Proposed Changes

  • save previous parameter state, including hash of the training data
  • if previous parameter state contains penalty weight and the training data hash is the same, the use them
  • alternatively, if penalty and class_weights are found in the config, they are used instead of a (re-)computation

Checklist

  • I have read the CONTRIBUTING guide.
  • My PR is based from 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.
  • Code has been blacked for style consistency.
  • 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.
  • History 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 Jun 12, 2023

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

@sarthakpati sarthakpati marked this pull request as draft June 12, 2023 19:59
@codecov
Copy link

codecov bot commented Jun 12, 2023

Codecov Report

Merging #677 (befd790) into master (048722e) will increase coverage by 0.08%.
The diff coverage is 96.49%.

@@            Coverage Diff             @@
##           master     #677      +/-   ##
==========================================
+ Coverage   94.51%   94.59%   +0.08%     
==========================================
  Files         116      116              
  Lines        8006     8017      +11     
==========================================
+ Hits         7567     7584      +17     
+ Misses        439      433       -6     
Flag Coverage Δ
unittests 94.59% <96.49%> (+0.08%) ⬆️

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

Impacted Files Coverage Δ
GANDLF/parseConfig.py 83.78% <ø> (ø)
testing/test_full.py 99.15% <ø> (-0.01%) ⬇️
GANDLF/compute/training_loop.py 83.54% <90.90%> (+0.28%) ⬆️
GANDLF/cli/main_run.py 93.02% <100.00%> (+9.34%) ⬆️
GANDLF/compute/generic.py 94.28% <100.00%> (+0.34%) ⬆️
GANDLF/compute/inference_loop.py 92.94% <100.00%> (+0.69%) ⬆️
GANDLF/utils/tensor.py 87.62% <100.00%> (+0.57%) ⬆️
GANDLF/utils/write_parse.py 96.66% <100.00%> (+0.07%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sarthakpati sarthakpati marked this pull request as ready for review June 15, 2023 03:28
@sarthakpati sarthakpati marked this pull request as draft June 15, 2023 16:00
@sarthakpati sarthakpati marked this pull request as ready for review June 15, 2023 20:26
@Geeks-Sid Geeks-Sid merged commit efb21e2 into mlcommons:master Jun 15, 2023
16 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jun 15, 2023
@sarthakpati sarthakpati deleted the use_saved_penalty branch June 16, 2023 09:53
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.

Allow penalty and class weights to be taken from the config
2 participants