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

Add require_prob_for_eval and require_pred_for_eval to optimize score function #92

Merged
merged 13 commits into from Jan 24, 2021

Conversation

senwu
Copy link
Owner

@senwu senwu commented Jan 22, 2021

Description of the problems or issues

During training and inference probs or preds are not always necessary and might cause cpu memory waste.

Description of the proposed changes

Add require_prob_for_eval and require_pred_for_eval in EmmentalTask to let user specify whether those two are necessary.

Test plan

Test when different options.

Checklist

  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated the CHANGELOG.rst accordingly.

@codecov
Copy link

codecov bot commented Jan 22, 2021

Codecov Report

Merging #92 (c34b190) into master (ae511cb) will increase coverage by 0.19%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #92      +/-   ##
==========================================
+ Coverage   87.90%   88.09%   +0.19%     
==========================================
  Files          38       38              
  Lines        1777     1798      +21     
  Branches      385      389       +4     
==========================================
+ Hits         1562     1584      +22     
  Misses        108      108              
+ Partials      107      106       -1     
Flag Coverage Δ
unittests 88.09% <94.11%> (+0.19%) ⬆️

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

Impacted Files Coverage Δ
src/emmental/learner.py 76.06% <ø> (ø)
src/emmental/model.py 82.42% <93.33%> (+1.39%) ⬆️
src/emmental/scorer.py 83.87% <100.00%> (ø)
src/emmental/task.py 84.37% <100.00%> (+1.04%) ⬆️

@senwu senwu merged commit 06657d8 into master Jan 24, 2021
@senwu senwu deleted the require_prob_for_eval branch January 24, 2021 07:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant