-
Notifications
You must be signed in to change notification settings - Fork 74
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
RDSE: serialization for py bindings #608
Conversation
This is waiting for @leonardbcm for the tests, but if we don't hear from him, can be merged as is |
Hi, thanks for the support again. I tried serializing and deserializing rdse objects with pickle and it worked fine. I have written this following piece of code :
Which gives the following logs :
The loaded encoder does not seems to be able to encoder values anymore. |
the test looks good, please add it to this PR. |
Hi, while trying to push comited changes on "serialization_rdse', the permission is denied. |
yes, you don't have push access to this repo. The work flow should be:
The problem is because I've started a branch from this repo, instead of a PR from your repo which would normally occur. |
Unit test for python rdse 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.
With these changes, this looks good to me 👍
Ping @Leonardbcm , please test the code |
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.
After spending most of 2 days struggling with pickle on SP I can give you what I found out as it relates to your class.
SDR_original = rdse.encode(value_to_encode) | ||
SDR_loaded = rdse_loaded.encode(value_to_encode) | ||
|
||
assert(SDR_original == SDR_loaded) |
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.
Also add a test for saveToFile() and loadFromFile()
See end of spatial_pooler_test.py in branch sp_save.
thanks to @dkeeney who solved the issue!
@Leonardbcm @dkeeney can you ACK the code, please? There's a remaining test, but I don't think I'll have time to write it in near future, so I'd like to merge the fixes as is, which makes the requested serialization for the encoders work. |
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.
The missing tests can be added later.
I am working on a generic Encoder Region which will need to make some changes to this encoder so I can add the tests then.
Thank you!
this will be interesting! |
TODO
Fixes #600