-
Notifications
You must be signed in to change notification settings - Fork 73
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
SP equals #133
SP equals #133
Conversation
based on serialization
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.
Please review
@@ -2020,6 +2020,8 @@ TEST(SpatialPoolerTest, testConstructorVsInitialize) { | |||
|
|||
// The two SP should be the same | |||
check_spatial_eq(sp1, sp2); | |||
EXPECT_EQ(sp1, sp2); |
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.
my question is, if we should delete the method check_spatial_eq()
from SP tests. It is now obsoleted by SP.equals()
, but this method is more verbose (asserts tell you where exactly is the diff. But, the comparison of SP.equals could do that too). On the other hand, the method is some burden to maintain (esp porting to other platforms etc)
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 know from experience that when debugging the SP comparison tests, having something that can tell you what it was that did not match is extremely helpful. There are so many things that must match...all affected by different parts of the code. Without some help it is hard to tell where to start looking.
On the other hand, it is indeed more to maintain. Tough call.
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.
Looks good to me. It would also be ok with me if you want to have some way of being able to display what miss-matched when it fails,.
Thanks! I'll merge now and we can add the |
Aims to implement
equals
for two SpatialPooler instances for more convenient comparisons & tests.Fixes: numenta#1383
Used for numenta#1380
Moved from numenta#1384
replaces #7