mirror of
https://github.com/macaodha/batdetect2.git
synced 2026-08-22 03:00:10 +02:00
fix: validate raw recording metadata on load
This commit is contained in:
parent
8f01a914d7
commit
23ccf7f5d6
@ -204,7 +204,7 @@ class RawFormatter(OutputFormatterProtocol[ClipDetections]):
|
|||||||
def pred_from_xr(self, dataset: xr.Dataset) -> ClipDetections:
|
def pred_from_xr(self, dataset: xr.Dataset) -> ClipDetections:
|
||||||
clip_data = dataset
|
clip_data = dataset
|
||||||
|
|
||||||
recording = data.Recording.model_construct(
|
recording = data.Recording.model_validate(
|
||||||
json.loads(clip_data.attrs["recording"])
|
json.loads(clip_data.attrs["recording"])
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user