[FIX] CN2 Rule Induction: handling memory error#2397
[FIX] CN2 Rule Induction: handling memory error#2397janezd merged 1 commit intobiolab:masterfrom jerneju:memory-rules
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2397 +/- ##
==========================================
+ Coverage 73.88% 73.92% +0.03%
==========================================
Files 322 322
Lines 55843 55855 +12
==========================================
+ Hits 41262 41289 +27
+ Misses 14581 14566 -15 |
lanzagar
left a comment
There was a problem hiding this comment.
@markotoplak brought up a good point.
CN2 rules shouldn't really use a huge amount of ram (or at least they could be implemented in a way that they don't).
Maybe we should investigate why memory errors happen here, before adding a try/except which will show error messages to the user but hide the problems from us.
Orange/widgets/model/owrules.py
Outdated
| self.model = None | ||
| try: | ||
| self.model = self.learner(self.data) | ||
| print(type(self.learner)) |
There was a problem hiding this comment.
This is probably a leftover debug print.
|
@jerneju, can you perhaps finish this? That is, discover how CN2 runs out of memory? If you don't succeed, let's merge this PR. |
|
I did some tests using |
|
It will always be possible to cause MemoryError in CN2 even with reasonably sized data by using unreasonable settings. Even if CN2 can be optimized, the checks in this PR won't hurt. We're thus merging this, and leave any optimization of CN2 as further work. |
Issue
Description of changes
Includes