From 3b47c688dda44f20effe12742274a827236c81a8 Mon Sep 17 00:00:00 2001 From: mbsantiago Date: Tue, 17 Mar 2026 22:25:41 +0000 Subject: [PATCH] Update api_v2 --- src/batdetect2/api_v2.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/batdetect2/api_v2.py b/src/batdetect2/api_v2.py index d3c1e95..b9c3b8c 100644 --- a/src/batdetect2/api_v2.py +++ b/src/batdetect2/api_v2.py @@ -88,7 +88,9 @@ class BatDetect2API: train_annotations=train_annotations, val_annotations=val_annotations, targets=self.targets, - config=self.config, + model_config=self.config.model, + train_config=self.config.train, + audio_config=self.config.audio, audio_loader=self.audio_loader, preprocessor=self.preprocessor, train_workers=train_workers, @@ -298,9 +300,8 @@ class BatDetect2API: evaluator = build_evaluator(config=config.evaluation, targets=targets) - # NOTE: Better to have a separate instance of - # preprocessor and postprocessor as these may be moved - # to another device. + # NOTE: Better to have a separate instance of preprocessor and + # postprocessor as these may be moved to another device. model = build_model(config=config.model) formatter = build_output_formatter(targets, config=config.output)