-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Added overlap accessors to spatial_pooler.py #3153
Conversation
…ss plus unit tests.
By analyzing the blame information on this pull request, we identified @scottpurdy, @subutai and @chetan51 to be potential reviewers |
@hernandezurbina Hey Victor, please have a quick read: https://github.com/numenta/nupic/wiki/Development-Process You must create a public issue describing the work that needs to be done. Then link to it from this PR description with |
@hernandezurbina There is already an existing issue that you should link to: |
@hernandezurbina Please see the details of the #3148 - you need to handle backward compatibility with pickling. @mrcslws might be able to help you with the details. |
@rhyolight @subutai @mrcslws I think it's done. Could you please have a look? Cheers! |
def getOverlaps(self): | ||
"""Returns the overlap score for each column.""" | ||
return self._overlaps | ||
|
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.
Two blank lines between methods.
@hernandezurbina Looks good. Left a few minor comments. Please read through our Python style guide: |
if state['_version'] < 3: | ||
# the overlaps and boostedOverlaps properties were added in version 3, | ||
state['_overlaps'] = numpy.zeros(self._numColumns) | ||
state['_boostedOverlaps'] = numpy.zeros(self._numColumns) |
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.
We should probably also set the dtype
s here to be consistent.
@subutai OK, it's fixed now. Now I'm reading the Python style guide. |
Really, we don't need to initialize these numpy arrays. We could just set This would save us from having |
@rhyolight Did this PR pass all checks? It only shows the appveyor check. Thanks. @mrcslws Has Victor addressed all your comments? I'm fine with the current status. |
👍 |
@subutai That's strange... No it didn't. I'm not sure why. When something like this happens, I usually have to push a dummy commit to the remote branch to get the builds to re-trigger. @hernandezurbina You can create a dummy commit like this:
|
@rhyolight done |
Still strange... looks like the CI servers are running, but the local validations are not. This smacks of webhook latency from GitHub. |
There we go. I forced a validation manually from the tooling server. |
👍 |
Fixes #3148