-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix: added save and read functionality in SSD issue #13328 #13589
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
base: main
Are you sure you want to change the base?
Conversation
for more information, see https://pre-commit.ci
|
@larsoner @mscheltienne Kindly review this PR and let me know if any changes are required |
…/mne-python into fix-ssd-save-load merge branches .
|
I'm happy to look over this @larsoner |
|
@Anushreebasics Thanks for opening the PR. It would be good to set some explicit Additionally, we should really also add this save/load behaviour to Please have a think about adding |
for more information, see https://pre-commit.ci
|
@tsbinns please review the changes |
issue #13328
Summary
This PR fixes the SSD serialization logic so that objects saved with SSD.save() can be fully restored using SSD.read() without losing internal state.
Previously, some fitted attributes required to reconstruct a trained SSD instance were not persisted, which caused test_ssd_save_load to fail during deserialization.
What was changed?
Refactored the SSD.save() method to persist all fitted attributes required to restore a trained instance.
Updated the corresponding SSD.read() logic to correctly re-initialize these attributes when loading from disk.
Ensured that save/load performs a true round-trip and yields an SSD instance equivalent to the original fitted object.