spyglass icon indicating copy to clipboard operation
spyglass copied to clipboard

Incorrect Delete propagation in decoding

Open samuelbray32 opened this issue 9 months ago • 3 comments

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 from decoding_merge.decoding_output__sorted_spikes_decoding_v1 [2024-05-08 11:24:24,623][INFO]: Deleting 20 rows from decoding_merge.decoding_output [2024-05-08 11:24:41,145][WARNING]: Deletes cancelled [2024-05-08 11:24:41,170][INFO]: Deleting 30 rows from decoding_clusterless_v1.unit_waveform_features_group__unit_features [2024-05-08 11:24:41,180][INFO]: Deleting 1 rows from decoding_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

samuelbray32 avatar May 08 '24 18:05 samuelbray32