Skip to content

Fix model_formats arg missing in cli - #942

Merged
Josef-Haupt merged 1 commit into
mainfrom
train-cli-fix
Jul 6, 2026
Merged

Fix model_formats arg missing in cli#942
Josef-Haupt merged 1 commit into
mainfrom
train-cli-fix

Conversation

@Josef-Haupt

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 6, 2026 09:41
@Josef-Haupt
Josef-Haupt merged commit 165fb7b into main Jul 6, 2026
8 checks passed
@Josef-Haupt
Josef-Haupt deleted the train-cli-fix branch July 6, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the training interface to use model_formats consistently and exposes that option in the CLI so users can select one or more trained-model output formats.

Changes:

  • Rename/align the training API parameter from model_format to model_formats and pass it through to train_model.
  • Update the allowed TRAINED_MODEL_OUTPUT_FORMATS to include detached (and remove both) to match the implementation.
  • Add --model_formats to the CLI training command and validate values via TRAINED_MODEL_OUTPUT_FORMATS.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
birdnet_analyzer/train/core.py Renames the training wrapper arg to model_formats and forwards it to train_model.
birdnet_analyzer/config.py Updates the TRAINED_MODEL_OUTPUT_FORMATS literal set to include detached.
birdnet_analyzer/cli.py Adds --model_formats argument for the training CLI and ties choices to config.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread birdnet_analyzer/cli.py
Comment on lines +891 to +895
"--model_formats",
nargs="+",
default=["tflite"],
choices=get_args(TRAINED_MODEL_OUTPUT_FORMATS),
help="Model output format(s). One or more of 'tflite', 'raven', 'detached'.",
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.

2 participants