spyglass
spyglass copied to clipboard
Incorrect Delete propagation in decoding
Describe the bug
Running a delete in UnitWaveformFeaturesGroup
is trying to delete entries in DecodingOutput.SortedSpikesDecoding
(which is not dependent on this table).
Note:
The attempted deletes in DecodingOutput.SortedSpikesDecoding
correspond to those matching the deletion key restriction
To Reproduce
from spyglass.decoding.v1.clusterless import UnitWaveformFeaturesGroup
key = {'nwb_file_name': 'Totoro20220607_.nwb',
'waveform_features_group_name': '04_lineartrack'}
(UnitWaveformFeaturesGroup() & key).delete(key)
Output:
[11:24:24][INFO] Spyglass: Building merge cache for unit_waveform_features_group. Found 1 downstream merge tables [2024-05-08 11:24:24,592][INFO]: Merge: Deleting 20 rows from
decoding_merge
.decoding_output
[2024-05-08 11:24:24,613][INFO]: Deleting 20 rows fromdecoding_merge
.decoding_output__sorted_spikes_decoding_v1
[2024-05-08 11:24:24,623][INFO]: Deleting 20 rows fromdecoding_merge
.decoding_output
[2024-05-08 11:24:41,145][WARNING]: Deletes cancelled [2024-05-08 11:24:41,170][INFO]: Deleting 30 rows fromdecoding_clusterless_v1
.unit_waveform_features_group__unit_features
[2024-05-08 11:24:41,180][INFO]: Deleting 1 rows fromdecoding_clusterless_v1
.unit_waveform_features_group
[2024-05-08 11:24:43,562][WARNING]: Deletes cancelled
Expected behavior No deletes from the sorted decoding merge table