Skip to content

Feat new train defaults#1214

Open
sammlapp wants to merge 25 commits intodevelopfrom
feat_new_train_defaults
Open

Feat new train defaults#1214
sammlapp wants to merge 25 commits intodevelopfrom
feat_new_train_defaults

Conversation

@sammlapp
Copy link
Collaborator

No description provided.

sammlapp added 25 commits August 7, 2025 14:46
this doesn't seem ideal, but we can't add "inf" values to the hoplite db, and don't want to rescale or normalize because the hoplite db doesn't contain any additional scaling metadata
untested! need to check implementation and see how it works
this is a pretty big refactor aimed at making things like the BMZ Perch2/Birdnet/TF models and ONNXModel only need to implement batch_forward() and otherwise be able to use SpectrogramPreprocessor methods like .predict() and .embed()

The strategy is that you implement batch_forward as appropraite for the class, and it returns a dictionary of outputs. Then predict() and embed() just need to make the dataloader with self.predict_dataloader(), iterate the dataloader to get batches, call batch_forward() on each batch, and aggregate the results across batches.

Some things in the tutorials are likely broken after this refactor, I haven't run/tested/checked them.
the DataLoader needs to return lists of AudioSample anyways for other parts of the code to work, so we can specify using collate_audio_samples to get the sample.data and sample.labels of each sample after getting a batch of AudioSamples from a dataloader. This reduces complexity/confusion.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments