LorenFrankLab / spyglass

Neuroscience data analysis framework for reproducible research built by Loren Frank Lab at UCSF
https://lorenfranklab.github.io/spyglass/
MIT License
94 stars 43 forks source link

`DLCModelSource` uses `fetch1` when restricting by a secondary key #1105

Open CBroz1 opened 2 months ago

CBroz1 commented 2 months ago

This portion of position_dlc_model

  1. Uses a FreeTable to fetch a dependency
  2. Presumes uniqueness of project_name that is not enforced by the DLCModelTraining table

https://github.com/LorenFrankLab/spyglass/blob/a7b13fa1636f0b219fc7d640e25f8269f41ac93e/src/spyglass/position/v1/position_dlc_model.py#L96-L99

These should be removed in favor if restricting by the primary key of the parent, used directly