-
Notifications
You must be signed in to change notification settings - Fork 77
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
Single RF loading at training and dl1->dl2 #985
Conversation
|
||
file_reg_energy = path_models + "/reg_energy.sav" | ||
joblib.dump(reg_energy, file_reg_energy, compress=3) | ||
if free_model_memory: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not really a reason to put this behind a flag, is there? The variable is not used after dumping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the function returns the models (probably useful if not saved). I personally don't know if there are any use case. If not we could remove save_models and free_model_memory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is at least used in test currently
Codecov Report
@@ Coverage Diff @@
## master #985 +/- ##
==========================================
+ Coverage 85.69% 85.88% +0.18%
==========================================
Files 78 78
Lines 6572 6645 +73
==========================================
+ Hits 5632 5707 +75
+ Misses 940 938 -2
Continue to review full report at Codecov.
|
…iate betwwen RF file location and already loaded RF
@@ -165,6 +165,7 @@ def test_build_models(simulated_dl1_file, rf_models): | |||
infile, | |||
infile, | |||
save_models=False, | |||
free_model_memory=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe test as well with True
?
If you can just add a test for the new option, otherwise lgtm. |
Thanks @vuillaut. I am not allowed to merge myself so if anyone with merging right can do it would be nice. Else I will ask on slack later. |
To solve #979 and reduce the memory usage during training and usage of random forest.