-
Notifications
You must be signed in to change notification settings - Fork 47
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
Minor fixups ensembles #568
Conversation
…bug which may yield to incorrect predictions if using of chunk size
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 rdata in chunk[RDATAS]: | ||
amici_outputs.append({AMICI_STATUS: rdata[AMICI_STATUS], | ||
AMICI_T: rdata[AMICI_T], | ||
AMICI_X: rdata[AMICI_X], | ||
AMICI_SX: rdata[AMICI_SX], | ||
AMICI_Y: rdata[AMICI_Y], | ||
AMICI_SY: rdata[AMICI_SY]}) | ||
amici_outputs.append({ | ||
output_field: deepcopy(rdata[output_field]) | ||
for output_field in self.amici_output_fields | ||
}) | ||
del chunk |
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.
Is deepcopy
used because chunk
remained in memory (or I guess, because after del chunk
, maybe the value in amici_outputs
is also deleted without deepcopy
)? If so, is both deepcopy
and del
necessary? Since chunk
should get garbage collected I guess, if there are no references to it? Just curious, fine to leave as-is
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.
I actually intended t go without the deepcopy and the del, and it seemed to work fine. However, in my debugger I experienced that chunk was still present i nthe memory at a later call of the function and just got overwritten... That puzzled me extremely...
Might be, that this is really only due to the debugger. However, I wanted make really, really safe that chunk is dead, dead, DEAD! 🦇 No, not undead, dead. ⚰️ ... That's why deepcopy and del... 🤷♂️
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
Codecov Report
@@ Coverage Diff @@
## develop #568 +/- ##
===========================================
- Coverage 88.57% 88.56% -0.01%
===========================================
Files 79 79
Lines 5243 5257 +14
===========================================
+ Hits 4644 4656 +12
- Misses 599 601 +2
Continue to review full report at Codecov.
|
Making the predictor more flexible and fixing a bug in the parameter mapping...